drivers/media/usb/gspca/m5602/m5602_bridge.h

Source file repositories/reference/linux-study-clean/drivers/media/usb/gspca/m5602/m5602_bridge.h

File Facts

System
Linux kernel
Corpus path
drivers/media/usb/gspca/m5602/m5602_bridge.h
Extension
.h
Size
4868 bytes
Lines
162
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 sd {
	struct gspca_dev gspca_dev;

	/* A pointer to the currently connected sensor */
	const struct m5602_sensor *sensor;

	/* The current frame's id, used to detect frame boundaries */
	u8 frame_id;

	/* The current frame count */
	u32 frame_count;

	/* Camera rotation polling thread for "flipable" cams */
	struct task_struct *rotation_thread;

	struct { /* auto-white-bal + green/red/blue balance control cluster */
		struct v4l2_ctrl *auto_white_bal;
		struct v4l2_ctrl *red_bal;
		struct v4l2_ctrl *blue_bal;
		struct v4l2_ctrl *green_bal;
	};
	struct { /* autoexpo / expo cluster */
		struct v4l2_ctrl *autoexpo;
		struct v4l2_ctrl *expo;
	};
	struct { /* autogain / gain cluster */
		struct v4l2_ctrl *autogain;
		struct v4l2_ctrl *gain;
	};
	struct { /* hflip/vflip cluster */
		struct v4l2_ctrl *hflip;
		struct v4l2_ctrl *vflip;
	};
};

int m5602_read_bridge(
	struct sd *sd, const u8 address, u8 *i2c_data);

int m5602_write_bridge(
	struct sd *sd, const u8 address, const u8 i2c_data);

int m5602_write_sensor(struct sd *sd, const u8 address,
		       u8 *i2c_data, const u8 len);

int m5602_read_sensor(struct sd *sd, const u8 address,
		      u8 *i2c_data, const u8 len);

#endif

Annotation

Implementation Notes