[EXT] Re: [PATCH v5 3/4] media: imx8mq-mipi-csi2: Explicitly release reset
G.N. Zhou
guoniu.zhou at nxp.com
Mon Sep 1 19:21:58 PDT 2025
Hi Laurent,
Thanks for your review.
> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Sent: Monday, September 1, 2025 11:37 PM
> To: G.N. Zhou <guoniu.zhou at nxp.com>
> Cc: Rui Miguel Silva <rmfrfs at gmail.com>; Martin Kepplinger
> <martink at posteo.de>; Purism Kernel Team <kernel at puri.sm>; Mauro
> Carvalho Chehab <mchehab at kernel.org>; Rob Herring <robh at kernel.org>;
> Krzysztof Kozlowski <krzk+dt at kernel.org>; Conor Dooley
> <conor+dt at kernel.org>; Shawn Guo <shawnguo at kernel.org>; Sascha Hauer
> <s.hauer at pengutronix.de>; Pengutronix Kernel Team
> <kernel at pengutronix.de>; Fabio Estevam <festevam at gmail.com>; Philipp
> Zabel <p.zabel at pengutronix.de>; Frank Li <frank.li at nxp.com>; linux-
> media at vger.kernel.org; devicetree at vger.kernel.org; imx at lists.linux.dev; linux-
> arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: [EXT] Re: [PATCH v5 3/4] media: imx8mq-mipi-csi2: Explicitly release
> reset
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
>
>
> Hi Guoniu,
>
> Thank you for the patch.
>
> On Mon, Sep 01, 2025 at 02:25:31PM +0800, Guoniu Zhou wrote:
> > Call reset_control_deassert() to explicitly release reset to make sure
> > reset bits are cleared since platform like i.MX8ULP can't clear reset
> > bits automatically.
> >
> > Reviewed-by: Frank Li <Frank.Li at nxp.com>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou at nxp.com>
> > ---
> > drivers/media/platform/nxp/imx8mq-mipi-csi2.c | 8 ++------
> > 1 file changed, 2 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
> > b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
> > index
> >
> 2bf11984690af2e687a3217e465697333d9d995d..6b83aa85af42e1dac25cf29
> 05686
> > 3680c1f89402 100644
> > --- a/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
> > +++ b/drivers/media/platform/nxp/imx8mq-mipi-csi2.c
> > @@ -337,18 +337,14 @@ static int imx8mq_mipi_csi_sw_reset(struct
> > csi_state *state) {
> > int ret;
> >
> > - /*
> > - * these are most likely self-clearing reset bits. to make it
> > - * more clear, the reset-imx7 driver should implement the
> > - * .reset() operation.
>
> What happened to this plan, would it be feasible to implement the
Since reset in ULP isn't self-clearing, so need to release the reset before return.
And I think it's no side effect to call reset_control_deassert() here since it makes
more clear and readable about software reset implementation.
> .reset() operation in the relevant drivers to be able to use
> reset_control_reset() here ?
Implement the .reset() operation in in the relevant drivers should have same effect
like here. If you agree, I prefer to use the patch here since less changes usually mean
low risk.
>
> > - */
> > ret = reset_control_assert(state->rst);
> > if (ret < 0) {
> > dev_err(state->dev, "Failed to assert resets: %d\n", ret);
> > return ret;
> > }
> >
> > - return 0;
> > + /* Explicitly release reset to make sure reset bits are cleared. */
> > + return reset_control_deassert(state->rst);
> > }
> >
> > static void imx8mq_mipi_csi_set_params(struct csi_state *state)
>
> --
> Regards,
>
> Laurent Pinchart
More information about the linux-arm-kernel
mailing list