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: ov8856: parse and register V4L2 device tree properties

Parse V4L2 device tree properties and register controls for them.

Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

Alexander Koskovich and committed by
Hans Verkuil
1b065199 78c7ab8a

+12 -1
+12 -1
drivers/media/i2c/ov8856.c
··· 1887 1887 1888 1888 static int ov8856_init_controls(struct ov8856 *ov8856) 1889 1889 { 1890 + struct i2c_client *client = v4l2_get_subdevdata(&ov8856->sd); 1891 + struct v4l2_fwnode_device_properties props; 1890 1892 struct v4l2_ctrl_handler *ctrl_hdlr; 1891 1893 s64 exposure_max, h_blank; 1892 1894 int ret; 1893 1895 1894 1896 ctrl_hdlr = &ov8856->ctrl_handler; 1895 - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8); 1897 + ret = v4l2_ctrl_handler_init(ctrl_hdlr, 10); 1896 1898 if (ret) 1897 1899 return ret; 1898 1900 ··· 1957 1955 ret = ctrl_hdlr->error; 1958 1956 goto err_ctrl_handler_free; 1959 1957 } 1958 + 1959 + ret = v4l2_fwnode_device_parse(&client->dev, &props); 1960 + if (ret) 1961 + goto err_ctrl_handler_free; 1962 + 1963 + ret = v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &ov8856_ctrl_ops, 1964 + &props); 1965 + if (ret) 1966 + goto err_ctrl_handler_free; 1960 1967 1961 1968 ov8856->sd.ctrl_handler = ctrl_hdlr; 1962 1969