From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Michael Riesch <michael.riesch@collabora.com>
Cc: Mehdi Djait <mehdi.djait@linux.intel.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans Verkuil <hverkuil@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Philipp Zabel <p.zabel@pengutronix.de>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Collabora Kernel Team <kernel@collabora.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/3] media: rockchip: add driver for the rockchip mipi csi-2 receiver
Date: Fri, 16 Jan 2026 14:15:22 +0200 [thread overview]
Message-ID: <aWor2m3TNJ-kHJha@kekkonen.localdomain> (raw)
In-Reply-To: <fc15b8e5-c7ae-4e0e-b3b7-7ce5b5139455@collabora.com>
Hi Michael,
On Thu, Jan 15, 2026 at 03:50:59PM +0100, Michael Riesch wrote:
> >> + /* set mult and div to 0, thus completely rely on V4L2_CID_LINK_FREQ */
> >> + link_freq = v4l2_get_link_freq(source_pad, 0, 0);
> >> + if (link_freq <= 0)
> >> + return -EINVAL;
> >
> > Could you return link_freq here?
>
> Ack.
You should also test for < 0; v4l2_get_link_freq() returns the frequency or
an error (and 0 isn't valid).
...
> >> +static int rkcsi_register(struct rkcsi_device *csi_dev)
> >> +{
> >> + struct media_pad *pads = csi_dev->pads;
> >> + struct v4l2_subdev *sd = &csi_dev->sd;
> >> + int ret;
> >> +
> >> + ret = rkcsi_register_notifier(csi_dev);
> >> + if (ret)
> >> + goto err;
> >> +
> >> + v4l2_subdev_init(sd, &rkcsi_ops);
> >> + sd->dev = csi_dev->dev;
> >> + sd->entity.ops = &rkcsi_media_ops;
> >> + sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE;
> >> + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_STREAMS;
> >> + sd->internal_ops = &rkcsi_internal_ops;
> >> + sd->owner = THIS_MODULE;
> >> + snprintf(sd->name, sizeof(sd->name), "rockchip-mipi-csi %s",
> >> + dev_name(csi_dev->dev));
> >
> > Do you need to give it an explicit name? (v4l2_i2c_subdev_init() already
> > does that.)
>
> I do, actually. I don't call the _i2c_ variant. This is a platform device.
Ah, I somehow thought this would be an I²C device. Please ignore the
comment then.
...
> >> + pm_runtime_enable(dev);
> >
> > You're not resuming the device in probe(). I guess you depend on CONFIG_PM?
>
> I do depend on CONFIG_PM.
>
> I don't think there is need to resume in probe -> resume in
> _enable_streams should do the trick, right?
Ack; that's fine with CONFIG_PM.
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2026-01-16 12:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 21:09 [PATCH v3 0/3] " Michael Riesch via B4 Relay
2026-01-13 21:09 ` [PATCH v3 1/3] media: dt-bindings: add " Michael Riesch via B4 Relay
2026-01-13 21:09 ` [PATCH v3 2/3] media: rockchip: add driver for the " Michael Riesch via B4 Relay
2026-01-13 21:59 ` Frank Li
2026-01-13 22:44 ` Michael Riesch
2026-01-13 23:00 ` Frank Li
2026-01-14 9:34 ` Sakari Ailus
2026-01-15 14:50 ` Michael Riesch
2026-01-16 12:15 ` Sakari Ailus [this message]
2026-01-13 21:09 ` [PATCH v3 3/3] arm64: defconfig: enable " Michael Riesch via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWor2m3TNJ-kHJha@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=hverkuil@kernel.org \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=michael.riesch@collabora.com \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sebastian.reichel@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®