.s_ctrl = ov5647_s_ctrl,
};
-static int ov5647_init_controls(struct ov5647 *sensor)
+static int ov5647_init_controls(struct ov5647 *sensor, struct device *dev)
{
struct i2c_client *client = v4l2_get_subdevdata(&sensor->sd);
int hblank, exposure_max, exposure_def;
+ struct v4l2_fwnode_device_properties props;
v4l2_ctrl_handler_init(&sensor->ctrls, 9);
ARRAY_SIZE(ov5647_test_pattern_menu) - 1,
0, 0, ov5647_test_pattern_menu);
+ v4l2_fwnode_device_parse(dev, &props);
+
+ v4l2_ctrl_new_fwnode_properties(&sensor->ctrls, &ov5647_ctrl_ops,
+ &props);
+
if (sensor->ctrls.error)
goto handler_free;
sensor->mode = OV5647_DEFAULT_MODE;
- ret = ov5647_init_controls(sensor);
+ ret = ov5647_init_controls(sensor, dev);
if (ret)
goto mutex_destroy;