[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aR8L9kIFcRJoWQUi@kekkonen.localdomain>
Date: Thu, 20 Nov 2025 14:39:18 +0200
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Rishikesh Donadkar <r-donadkar@...com>
Cc: jai.luthra@...ux.dev, laurent.pinchart@...asonboard.com,
mripard@...nel.org, y-abhilashchandra@...com, devarsht@...com,
s-jain1@...com, vigneshr@...com, mchehab@...nel.org,
robh@...nel.org, krzk+dt@...nel.org, p.zabel@...gutronix.de,
conor+dt@...nel.org, hverkuil-cisco@...all.nl,
tomi.valkeinen@...asonboard.com, jai.luthra@...asonboard.com,
changhuang.liang@...rfivetech.com, jack.zhu@...rfivetech.com,
sjoerd@...labora.com, dan.carpenter@...aro.org,
hverkuil+cisco@...nel.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v8 06/18] media: ti: j721e-csi2rx: add a subdev for the
core device
Hi Rishikesh,
On Wed, Nov 12, 2025 at 05:24:47PM +0530, Rishikesh Donadkar wrote:
> +static int ti_csi2rx_sd_s_stream(struct v4l2_subdev *sd, int enable)
Could you instead implement enable_streams and disable_streams pad ops,
please, and use v4l2_subdev_enable_streams() from there?
> +{
> + struct ti_csi2rx_dev *csi = to_csi2rx_dev(sd);
> + int ret = 0;
> +
> + mutex_lock(&csi->mutex);
> +
> + if (enable) {
> + if (csi->enable_count > 0) {
> + csi->enable_count++;
> + goto out;
> + }
> +
> + ret = v4l2_subdev_call(csi->source, video, s_stream, 1);
> + if (ret)
> + goto out;
> +
> + csi->enable_count++;
> + } else {
> + if (csi->enable_count == 0) {
> + ret = -EINVAL;
> + goto out;
> + }
> +
> + if (--csi->enable_count > 0)
> + goto out;
> +
> + ret = v4l2_subdev_call(csi->source, video, s_stream, 0);
> + }
> +
> +out:
> + mutex_unlock(&csi->mutex);
> + return ret;
> +}
--
Regards,
Sakari Ailus
Powered by blists - more mailing lists