[PATCH v5 2/3] media: synopsys: add driver for the designware mipi csi-2 receiver
Sakari Ailus
sakari.ailus at linux.intel.com
Mon Jan 19 01:56:21 PST 2026
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:
> > On Fri, Jan 16, 2026 at 02:02:47PM +0100, Michael Riesch wrote:
> >> 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 <michael.riesch at wolfvision.net>
> >> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
> >> Reviewed-by: Mehdi Djait <mehdi.djait at linux.intel.com>
> >> Signed-off-by: Michael Riesch <michael.riesch at collabora.com>
> >> ---
> > ...
> >> +
> >> +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 void
> >
> > why 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. :-)
> >> +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
More information about the linux-arm-kernel
mailing list