From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC37817C7C4 for ; Mon, 30 Sep 2024 09:26:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727688373; cv=none; b=FP/9I4on+Jt6yKSjrwIStL7LYtstpJIx9Sq5zaAeYMXyRxovEvCneT7EE4SzLQ+6FjVa/lQCVsZtm0KUaPyCNE6UrEX9+rHDhu2wABs8OOs8pbWOhR6f9sNMTwmCZ8wg7Y6FM8PoMKf6vebPxvzKG/RPhKQRQL1HSDcsD56Bm7I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727688373; c=relaxed/simple; bh=C3s3W2qmoaiWLzUH6cCOwWXBY9oPAdEih6frCPpdF0o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rH/Wi9MwS59DoMrUii1B7b1AgHL/1tP6jiccrDIpBcJUIYtqzwV9DjNUq5dD8csHbR8fQ56MAK8S2ycab+ar3L2sH/XE6m0Tifh1PQQCG6QrzYs34VED/x1DufL2MxImTRwMSsss0m8xqJLDctbCtifXtZ2VXP3ZE7FYjBlRk6Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1svCfC-0007Dn-Ca; Mon, 30 Sep 2024 11:25:54 +0200 Received: from [2a0a:edc0:0:b01:1d::7b] (helo=bjornoya.blackshift.org) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1svCf8-002bCP-Sa; Mon, 30 Sep 2024 11:25:50 +0200 Received: from pengutronix.de (pd9e595f8.dip0.t-ipconnect.de [217.229.149.248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 7412834682F; Mon, 30 Sep 2024 09:25:50 +0000 (UTC) Date: Mon, 30 Sep 2024 11:25:50 +0200 From: Marc Kleine-Budde To: "Peng Fan (OSS)" Cc: Rob Herring , Conor Dooley , Fabio Estevam , Michael Walle , Vignesh Raghavendra , devicetree@vger.kernel.org, imx@lists.linux.dev, Richard Weinberger , Sascha Hauer , Marco Felsch , linux-kernel@vger.kernel.org, Tudor Ambarus , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Pengutronix Kernel Team , Miquel Raynal , Krzysztof Kozlowski , Shawn Guo , Peng Fan , Pratyush Yadav Subject: Re: [PATCH v2 2/3] mtd: spi-nor: support vcc-supply regulator Message-ID: <20240930-amaranth-stallion-of-fantasy-67701d-mkl@pengutronix.de> References: <20240930-spi-v2-0-ed7f6bcbe0df@nxp.com> <20240930-spi-v2-2-ed7f6bcbe0df@nxp.com> <20240930-wonderful-wealthy-aardwolf-b455d6-mkl@pengutronix.de> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2tcsiwghsi2hwzwq" Content-Disposition: inline In-Reply-To: <20240930-wonderful-wealthy-aardwolf-b455d6-mkl@pengutronix.de> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: devicetree@vger.kernel.org --2tcsiwghsi2hwzwq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > 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. > >=20 > > Signed-off-by: Peng Fan > > --- > > drivers/mtd/spi-nor/core.c | 5 +++++ > > 1 file changed, 5 insertions(+) > >=20 > > 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 > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -3462,6 +3463,10 @@ int spi_nor_scan(struct spi_nor *nor, const char= *name, > > if (!nor->bouncebuf) > > return -ENOMEM; > > =20 > > + ret =3D devm_regulator_get_enable(dev, "vcc"); > > + if (ret) > > + return ret; > > + >=20 > What happens if the SPI-NOR doesn't have a "vcc" regulator? =2E..the SPI-NOR will use the dummy regulator. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | --2tcsiwghsi2hwzwq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEUEC6huC2BN0pvD5fKDiiPnotvG8FAmb6bpsACgkQKDiiPnot vG8hIwf/QXZytZ4ZzSbdjv9wXw1kBOy5ES/7Ay5dQoy1vBiQR5ta8KzKASWSHygA SXpI1/i6UM3ZRu33nqVRFKqUBaAplExv/X5b5wnKXGY8ZmdU7eIfZQZPSRKqnqpl KSADiG+M9FMpO/KKCVpceHGAs210B1Xh9PPza8Yl2mN4V0S3Usya5bKUI1mFR/lD zL+rSWO7FPBdQ74xGoTOFFxaWQfCdc1i4B1v2sPbDXy5sRq0QYS71BRIWShDJvDt a/0wyjiD2xg4gurQenOurY9RjeHtfs2nQRn0JkGRrd+VEJk53ZIABXYBHj2Bf8pn fYkmdYXTwWFlqvKy1gTeQbLsi6YTJw== =1jx1 -----END PGP SIGNATURE----- --2tcsiwghsi2hwzwq--