lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4rkbs3adnnxalbi237u5anydgm326nvu2ztgiyzufpl6r23vc5@d345nvc4zdqc>
Date: Wed, 24 Jul 2024 09:31:34 +0200
From: Jacopo Mondi <jacopo.mondi@...asonboard.com>
To: Robert Mader <robert.mader@...labora.com>
Cc: linux-kernel@...r.kernel.org, jacopo@...ndi.org, 
	sakari.ailus@...ux.intel.com, javierm@...hat.com
Subject: Re: [PATCH] media: i2c: imx355: Parse and register properties

Hi Robert

On Tue, Jul 23, 2024 at 08:58:56PM GMT, Robert Mader wrote:
> Analogous to e.g. the imx219. This enables propagating
> V4L2_CID_CAMERA_SENSOR_ROTATION values so that libcamera

and V4L2_CID_CAMERA_ORIENTATION

> can detect the correct rotation from the device tree
> and propagate it further to e.g. Pipewire.

Well, yes, that's a consequence. As long as Linux is concerned, this
serves to register the two above mentioned controls.

>
> Signed-off-by: Robert Mader <robert.mader@...labora.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi@...asonboard.com>

Thanks
  j

> ---
>  drivers/media/i2c/imx355.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
> index 7e9c2f65fa08..0dd25eeea60b 100644
> --- a/drivers/media/i2c/imx355.c
> +++ b/drivers/media/i2c/imx355.c
> @@ -1520,6 +1520,7 @@ static const struct v4l2_subdev_internal_ops imx355_internal_ops = {
>  static int imx355_init_controls(struct imx355 *imx355)
>  {
>  	struct i2c_client *client = v4l2_get_subdevdata(&imx355->sd);
> +	struct v4l2_fwnode_device_properties props;
>  	struct v4l2_ctrl_handler *ctrl_hdlr;
>  	s64 exposure_max;
>  	s64 vblank_def;
> @@ -1531,7 +1532,7 @@ static int imx355_init_controls(struct imx355 *imx355)
>  	int ret;
>
>  	ctrl_hdlr = &imx355->ctrl_handler;
> -	ret = v4l2_ctrl_handler_init(ctrl_hdlr, 10);
> +	ret = v4l2_ctrl_handler_init(ctrl_hdlr, 12);
>  	if (ret)
>  		return ret;
>
> @@ -1603,6 +1604,15 @@ static int imx355_init_controls(struct imx355 *imx355)
>  		goto error;
>  	}
>
> +	ret = v4l2_fwnode_device_parse(&client->dev, &props);
> +	if (ret)
> +		goto error;
> +
> +	ret = v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &imx355_ctrl_ops,
> +					      &props);
> +	if (ret)
> +		goto error;
> +
>  	imx355->sd.ctrl_handler = ctrl_hdlr;
>
>  	return 0;
> --
> 2.45.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ