Re: [PATCH 2/4] media: i2c: Add driver for Sony IMX728

Markus Elfring
2025-02-19T17:52:52Z

> Adds a driver for the Sony IMX728 image sensor.

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.14-rc3#n94

…
> +++ b/drivers/media/i2c/imx728.c
> @@ -0,0 +1,9655 @@
…
> +static int imx728_set_stream(struct v4l2_subdev *sd, int enable)
> +{
> + struct imx728 *imx728 = to_imx728(sd);
> + int ret;
> +
> + mutex_lock(&imx728->lock);
…
> + __v4l2_ctrl_grab(imx728->ctrl.v_flip, enable);
> +
> + mutex_unlock(&imx728->lock);
…

Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&imx728->lock);”?
https://elixir.bootlin.com/linux/v6.14-rc3/source/include/linux/mutex.h#L201

Regards,
Markus