Commit 4c9c93cf authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Sakari Ailus

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
parent 0c3b56c9
...@@ -896,10 +896,15 @@ static const struct media_entity_operations imx290_subdev_entity_ops = { ...@@ -896,10 +896,15 @@ static const struct media_entity_operations imx290_subdev_entity_ops = {
static int imx290_ctrl_init(struct imx290 *imx290) static int imx290_ctrl_init(struct imx290 *imx290)
{ {
struct v4l2_fwnode_device_properties props;
unsigned int blank; unsigned int blank;
int ret; int ret;
v4l2_ctrl_handler_init(&imx290->ctrls, 7); ret = v4l2_fwnode_device_parse(imx290->dev, &props);
if (ret < 0)
return ret;
v4l2_ctrl_handler_init(&imx290->ctrls, 9);
imx290->ctrls.lock = &imx290->lock; imx290->ctrls.lock = &imx290->lock;
/* /*
...@@ -954,6 +959,9 @@ static int imx290_ctrl_init(struct imx290 *imx290) ...@@ -954,6 +959,9 @@ static int imx290_ctrl_init(struct imx290 *imx290)
if (imx290->vblank) if (imx290->vblank)
imx290->vblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; imx290->vblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
v4l2_ctrl_new_fwnode_properties(&imx290->ctrls, &imx290_ctrl_ops,
&props);
imx290->sd.ctrl_handler = &imx290->ctrls; imx290->sd.ctrl_handler = &imx290->ctrls;
if (imx290->ctrls.error) { if (imx290->ctrls.error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment