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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240930-amaranth-stallion-of-fantasy-67701d-mkl@pengutronix.de>
Date: Mon, 30 Sep 2024 11:25:50 +0200
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Fabio Estevam <festevam@...il.com>, Michael Walle <mwalle@...nel.org>, 
	Vignesh Raghavendra <vigneshr@...com>, devicetree@...r.kernel.org, imx@...ts.linux.dev, 
	Richard Weinberger <richard@....at>, Sascha Hauer <s.hauer@...gutronix.de>, 
	Marco Felsch <m.felsch@...gutronix.de>, linux-kernel@...r.kernel.org, 
	Tudor Ambarus <tudor.ambarus@...aro.org>, linux-mtd@...ts.infradead.org, 
	linux-arm-kernel@...ts.infradead.org, Pengutronix Kernel Team <kernel@...gutronix.de>, 
	Miquel Raynal <miquel.raynal@...tlin.com>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
	Shawn Guo <shawnguo@...nel.org>, Peng Fan <peng.fan@....com>, 
	Pratyush Yadav <pratyush@...nel.org>
Subject: Re: [PATCH v2 2/3] mtd: spi-nor: support vcc-supply regulator

On 30.09.2024 11:21:27, Marc Kleine-Budde wrote:
> On 30.09.2024 17:22:25, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@....com>
> > 
> > SPI NOR flashes needs power supply to work properly. The power supply
> > maybe software controllable per board design. So add the support
> > for an vcc-supply regulator.
> > 
> > Signed-off-by: Peng Fan <peng.fan@....com>
> > ---
> >  drivers/mtd/spi-nor/core.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> > index 9d6e85bf227b..5249c8b13916 100644
> > --- a/drivers/mtd/spi-nor/core.c
> > +++ b/drivers/mtd/spi-nor/core.c
> > @@ -17,6 +17,7 @@
> >  #include <linux/mtd/spi-nor.h>
> >  #include <linux/mutex.h>
> >  #include <linux/of_platform.h>
> > +#include <linux/regulator/consumer.h>
> >  #include <linux/sched/task_stack.h>
> >  #include <linux/sizes.h>
> >  #include <linux/slab.h>
> > @@ -3462,6 +3463,10 @@ int spi_nor_scan(struct spi_nor *nor, const char *name,
> >  	if (!nor->bouncebuf)
> >  		return -ENOMEM;
> >  
> > +	ret = devm_regulator_get_enable(dev, "vcc");
> > +	if (ret)
> > +		return ret;
> > +
> 
> What happens if the SPI-NOR doesn't have a "vcc" regulator?

...the SPI-NOR will use the dummy regulator.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ