[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AS8PR04MB9080AD8135277660ACE41FF0FA06A@AS8PR04MB9080.eurprd04.prod.outlook.com>
Date: Tue, 2 Sep 2025 02:21:58 +0000
From: "G.N. Zhou" <guoniu.zhou@....com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
CC: Rui Miguel Silva <rmfrfs@...il.com>, Martin Kepplinger
<martink@...teo.de>, Purism Kernel Team <kernel@...i.sm>, Mauro Carvalho
Chehab <mchehab@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof
Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Shawn Guo
<shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix
Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>, Frank Li <frank.li@....com>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [EXT] Re: [PATCH v5 3/4] media: imx8mq-mipi-csi2: Explicitly
release reset
Hi Laurent,
Thanks for your review.
> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Sent: Monday, September 1, 2025 11:37 PM
> To: G.N. Zhou <guoniu.zhou@....com>
> Cc: Rui Miguel Silva <rmfrfs@...il.com>; Martin Kepplinger
> <martink@...teo.de>; Purism Kernel Team <kernel@...i.sm>; Mauro
> Carvalho Chehab <mchehab@...nel.org>; Rob Herring <robh@...nel.org>;
> Krzysztof Kozlowski <krzk+dt@...nel.org>; Conor Dooley
> <conor+dt@...nel.org>; Shawn Guo <shawnguo@...nel.org>; Sascha Hauer
> <s.hauer@...gutronix.de>; Pengutronix Kernel Team
> <kernel@...gutronix.de>; Fabio Estevam <festevam@...il.com>; Philipp
> Zabel <p.zabel@...gutronix.de>; Frank Li <frank.li@....com>; linux-
> media@...r.kernel.org; devicetree@...r.kernel.org; imx@...ts.linux.dev; linux-
> arm-kernel@...ts.infradead.org; linux-kernel@...r.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@....com>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@....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
Powered by blists - more mailing lists