Re: [PATCH v5 2/3] media: synopsys: add driver for the designware mipi csi-2 receiver
From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: 2026-01-19 09:56:33
Also in:
linux-arm-kernel, linux-media, linux-rockchip, lkml
Hi Michael, On Mon, Jan 19, 2026 at 10:49:20AM +0100, Michael Riesch wrote:
Hi Frank, Thanks for your review. On 1/16/26 17:08, Frank Li wrote:quoted
On Fri, Jan 16, 2026 at 02:02:47PM +0100, Michael Riesch wrote:quoted
The Synopsys DesignWare MIPI CSI-2 Receiver is a CSI-2 bridge with one input port and one output port. It receives the data with the help of an external MIPI PHY (C-PHY or D-PHY) and passes it to e.g., the Rockchip Video Capture (VICAP) block on recent Rockchip SoCs. Add a V4L2 subdevice driver for this unit. Signed-off-by: Michael Riesch <redacted> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com> Signed-off-by: Michael Riesch <michael.riesch@collabora.com> ---...quoted
+ +static inline struct dw_mipi_csi2_device *to_csi2(struct v4l2_subdev *sd) +{ + return container_of(sd, struct dw_mipi_csi2_device, sd); +} + +static inline __maybe_unused voidwhy need '__maybe_unused', needn't inline. compiler can auto decide and report unused function if no 'inline'.The __maybe_unused was helpful during development and is not really required now. It doesn't hurt either, so I left it in. I can remove it if you wish.
Please. :-)
quoted
quoted
+static int dw_mipi_csi2_register_notifier(struct dw_mipi_csi2_device *csi2) +{ + struct v4l2_async_connection *asd; + struct v4l2_async_notifier *ntf = &csi2->notifier; + struct v4l2_fwnode_endpoint vep; + struct v4l2_subdev *sd = &csi2->sd; + struct device *dev = csi2->dev; + struct fwnode_handle *ep; + int ret; + + ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), 0, 0, 0);use struct fwnode_handle *ep __free(fwnode_handle) can simplify err handler.Sorry, I don't see the benefit of that.
I'd prefer this, too, when you unconditionally need to release or put something. It'll make error handling simpler, too. -- Kind regards, Sakari Ailus