lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250902083952.GE13448@pendragon.ideasonboard.com>
Date: Tue, 2 Sep 2025 10:39:52 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
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" <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

On Tue, Sep 02, 2025 at 02:21:58AM +0000, G.N. Zhou wrote:
> On Monday, September 1, 2025 11:37 PM, Laurent Pinchart wrote:
> > 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..6b83aa85af42e1dac25cf29056863680c1f89402
> > > 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.

I'm OK with that.

> > > -      */
> > >       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

Powered by Openwall GNU/*/Linux Powered by OpenVZ