Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: i2c: imx290: Create controls for fwnode properties

Create the V4L2_CID_ORIENTATION and V4L2_CID_ROTATION controls to
expose the corresponding fwnode properties.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

authored by

Laurent Pinchart and committed by
Sakari Ailus
4c9c93cf 0c3b56c9

+9 -1
+9 -1
drivers/media/i2c/imx290.c
··· 896 896 897 897 static int imx290_ctrl_init(struct imx290 *imx290) 898 898 { 899 + struct v4l2_fwnode_device_properties props; 899 900 unsigned int blank; 900 901 int ret; 901 902 902 - v4l2_ctrl_handler_init(&imx290->ctrls, 7); 903 + ret = v4l2_fwnode_device_parse(imx290->dev, &props); 904 + if (ret < 0) 905 + return ret; 906 + 907 + v4l2_ctrl_handler_init(&imx290->ctrls, 9); 903 908 imx290->ctrls.lock = &imx290->lock; 904 909 905 910 /* ··· 958 953 blank); 959 954 if (imx290->vblank) 960 955 imx290->vblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; 956 + 957 + v4l2_ctrl_new_fwnode_properties(&imx290->ctrls, &imx290_ctrl_ops, 958 + &props); 961 959 962 960 imx290->sd.ctrl_handler = &imx290->ctrls; 963 961