Lines Matching refs:v4l2_subdev

73 struct for the device instance data, a v4l2_subdev struct to refer to
206 struct v4l2_subdev
215 driver with a consistent interface to these sub-devices the v4l2_subdev struct
218 Each sub-device driver must have a v4l2_subdev struct. This struct can be
223 data of v4l2_subdev using v4l2_set_subdevdata(). That makes it easy to go
224 from a v4l2_subdev to the actual low-level bus-specific device data.
226 You also need a way to go from the low-level struct to v4l2_subdev. For the
228 v4l2_subdev pointer, for other busses you may have to use other methods.
231 bridge-specific per-subdev private data. The v4l2_subdev structure provides
236 obtain the v4l2_subdev pointer. For i2c devices this is easy: you call
241 Each v4l2_subdev contains function pointers that sub-device drivers can
253 int (*log_status)(struct v4l2_subdev *sd);
254 int (*init)(struct v4l2_subdev *sd, u32 val);
289 A sub-device driver initializes the v4l2_subdev struct using:
297 media_entity struct embedded in the v4l2_subdev struct (entity field) by
352 v4l2_subdev with the v4l2_device:
412 The advantage of using v4l2_subdev is that it is a generic struct and does
484 V4L2_SUBDEV_USES_EVENTS v4l2_subdev::flags and initialize
485 v4l2_subdev::nevents to events queue depth before registering the
487 v4l2_subdev::devnode device node.
504 The recommended method of adding v4l2_subdev support to an I2C driver is to
505 embed the v4l2_subdev struct into the state struct that is created for each
507 you can just create a v4l2_subdev directly.
513 struct v4l2_subdev sd;
517 Initialize the v4l2_subdev struct as follows:
521 This function will fill in all the fields of v4l2_subdev and ensure that the
522 v4l2_subdev and i2c_client both point to one another.
524 You should also add a helper inline function to go from a v4l2_subdev pointer
527 static inline struct chipname_state *to_state(struct v4l2_subdev *sd)
532 Use this to go from the v4l2_subdev struct to the i2c_client struct:
536 And this to go from an i2c_client to a v4l2_subdev struct:
538 struct v4l2_subdev *sd = i2c_get_clientdata(client);
546 After that the corresponding v4l2_subdev structures are invalid, so they
553 struct v4l2_subdev *sd = v4l2_i2c_new_subdev(v4l2_dev, adapter,
584 struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter,