Re: [PATCH v8 06/18] media: ti: j721e-csi2rx: add a subdev for the core device
From: Rishikesh Donadkar
Date: Fri Nov 21 2025 - 02:00:08 EST
On 20/11/25 18:09, Sakari Ailus wrote:
Hi Rishikesh,
Hi Sakari,
Thank you for the review.
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?
This is done in 08/18, I will merge changes form 08/18 in to this patch.
Rishikesh
+{
+ 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;
+}