drivers/media/platform/microchip/microchip-isc.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/microchip/microchip-isc.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/microchip/microchip-isc.h
Extension
.h
Size
11168 bytes
Lines
401
Domain
Driver Families
Bucket
drivers/media
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct isc_clk {
	struct clk_hw   hw;
	struct clk      *clk;
	struct regmap   *regmap;
	spinlock_t	lock;	/* serialize access to clock registers */
	u8		id;
	u8		parent_id;
	u32		div;
	struct device	*dev;
};

#define to_isc_clk(v) container_of(v, struct isc_clk, hw)

struct isc_buffer {
	struct vb2_v4l2_buffer  vb;
	struct list_head	list;
};

struct isc_subdev_entity {
	struct v4l2_subdev		*sd;
	struct v4l2_async_connection	*asd;
	struct device_node		*epn;
	struct v4l2_async_notifier      notifier;

	u32 pfe_cfg0;

	struct list_head list;
};

/*
 * struct isc_format - ISC media bus format information
			This structure represents the interface between the ISC
			and the sensor. It's the input format received by
			the ISC.
 * @fourcc:		Fourcc code for this format
 * @mbus_code:		V4L2 media bus format code.
 * @cfa_baycfg:		If this format is RAW BAYER, indicate the type of bayer.
			this is either BGBG, RGRG, etc.
 * @pfe_cfg0_bps:	Number of hardware data lines connected to the ISC
 * @raw:		If the format is raw bayer.
 */

struct isc_format {
	u32	fourcc;
	u32	mbus_code;
	u32	cfa_baycfg;
	u32	pfe_cfg0_bps;

	bool	raw;
};

/* Pipeline bitmap */
#define DPC_DPCENABLE	BIT(0)
#define DPC_GDCENABLE	BIT(1)
#define DPC_BLCENABLE	BIT(2)
#define WB_ENABLE	BIT(3)
#define CFA_ENABLE	BIT(4)
#define CC_ENABLE	BIT(5)
#define GAM_ENABLE	BIT(6)
#define GAM_BENABLE	BIT(7)
#define GAM_GENABLE	BIT(8)
#define GAM_RENABLE	BIT(9)
#define VHXS_ENABLE	BIT(10)
#define CSC_ENABLE	BIT(11)
#define CBC_ENABLE	BIT(12)
#define SUB422_ENABLE	BIT(13)
#define SUB420_ENABLE	BIT(14)

#define GAM_ENABLES	(GAM_RENABLE | GAM_GENABLE | GAM_BENABLE | GAM_ENABLE)

/*
 * struct fmt_config - ISC format configuration and internal pipeline
			This structure represents the internal configuration
			of the ISC.
			It also holds the format that ISC will present to v4l2.
 * @sd_format:		Pointer to an isc_format struct that holds the sensor
			configuration.
 * @fourcc:		Fourcc code for this format.
 * @bpp:		Bytes per pixel in the current format.
 * @bpp_v4l2:		Bytes per pixel in the current format, for v4l2.
			This differs from 'bpp' in the sense that in planar
			formats, it refers only to the first plane.
 * @rlp_cfg_mode:	Configuration of the RLP (rounding, limiting packaging)
 * @dcfg_imode:		Configuration of the input of the DMA module
 * @dctrl_dview:	Configuration of the output of the DMA module
 * @bits_pipeline:	Configuration of the pipeline, which modules are enabled
 */
struct fmt_config {
	struct isc_format	*sd_format;

Annotation

Implementation Notes