Allow parsing of the v4l2_fwnode properties from the DT and addition
of those properties (such as orientation, rotation).
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
        const struct v4l2_ctrl_ops *ops = &vgxy61_ctrl_ops;
        struct v4l2_ctrl_handler *hdl = &sensor->ctrl_handler;
        const struct vgxy61_mode_info *cur_mode = sensor->current_mode;
+       struct v4l2_fwnode_device_properties props;
        struct v4l2_ctrl *ctrl;
        int ret;
 
                goto free_ctrls;
        }
 
+       ret = v4l2_fwnode_device_parse(&sensor->i2c_client->dev, &props);
+       if (ret)
+               goto free_ctrls;
+
+       ret = v4l2_ctrl_new_fwnode_properties(hdl, ops, &props);
+       if (ret)
+               goto free_ctrls;
+
        sensor->sd.ctrl_handler = hdl;
        return 0;