Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80EF6EB64DC for ; Sat, 22 Jul 2023 13:31:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1388B865ED; Sat, 22 Jul 2023 15:30:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="TWMdZnRL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 15D69863F1; Sat, 22 Jul 2023 15:30:29 +0200 (CEST) Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 68D5E863F1 for ; Sat, 22 Jul 2023 15:30:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=Xl4FNF76u3YTlq1DBlAY9gklwUBEJbEd71ZH4eFtMhU=; b=TWMdZnRLutFiOarA2XpM1+boUxvMlFuLbIv/VhX0u2sig5vc9kZJ4/6crZ8zzvEmuUfn /Dbd90lZKRiQGuQ3IXNXJRSzksbPab/OL2pPi/EVyHgoO7NlK1Aq8kiDbMICHED8BpN/Ey ACvL9uxUNwUanqJtiRUCzQIcdcQlswhLT9Zs6exTkquc9RcJk0zILRAhCnfJzQ9W55/8Ud e7cupdaHWy25qy5x46iPC7GAb9B2sHmXloA2GqP1cTZxOh+vp73fr5oNPNSO+YI1jAlAUL uB0rgtkzbBHzrTk2efOPnTrU/1aCO1s+/G4Q+4c87Mxq3lhxZn87Y+aIUHa+A40A== Received: by filterdrecv-66949dbc98-9d8bm with SMTP id filterdrecv-66949dbc98-9d8bm-1-64BBD9EC-B6 2023-07-22 13:30:21.026761181 +0000 UTC m=+6270644.415695826 Received: from bionic.localdomain (unknown) by geopod-ismtpd-10 (SG) with ESMTP id _-wxb9WtS_GpofBOT3vCTg Sat, 22 Jul 2023 13:30:20.846 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v4 6/9] regulator: fixed: Add support for gpios prop Date: Sat, 22 Jul 2023 13:30:21 +0000 (UTC) Message-ID: <20230722133012.1838083-7-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230722133012.1838083-1-jonas@kwiboo.se> References: <20230722133012.1838083-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h9R8ltR7W1hKmQgD7?= =?us-ascii?Q?cQnn8McJ9N1jIsLGl4S5GrFL=2FvQPZXcSx8drbWJ?= =?us-ascii?Q?jiSEZHdDjTDfp5L6V3F+5GUTPby57NuKWV0j24f?= =?us-ascii?Q?M0Lt976UdPhR113NFOUH+aJsuoO3SObtQz=2Fy=2Feg?= =?us-ascii?Q?P+7kb5J2nA2jtHppUDi2xOOnJ6Qw0vw+j0sDJW?= To: Kever Yang , Simon Glass , Philipp Tomsich , Jaehoon Chung Cc: Eugen Hristev , Jon Lin , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The commit 12df2c182ccb ("regulator: dt-bindings: fixed-regulator: allow gpios property") in linux v6.3-rc1 added support for use of either a gpios or gpio prop with a fixed-regulator. This adds support for the new gpios prop to the fixed-regulator driver. gpios prop is used by vcc3v3-pcie-regulator on Radxa ROCK 3 Model A. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- v4: - No change v3: - Rebased on master v2: - Update commit message - Collect r-b tag drivers/power/regulator/fixed.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c index ad3b4b98d667..f7ddba8b45e4 100644 --- a/drivers/power/regulator/fixed.c +++ b/drivers/power/regulator/fixed.c @@ -25,6 +25,7 @@ static int fixed_regulator_of_to_plat(struct udevice *dev) { struct dm_regulator_uclass_plat *uc_pdata; struct regulator_common_plat *plat; + bool gpios; plat = dev_get_plat(dev); uc_pdata = dev_get_uclass_plat(dev); @@ -33,7 +34,8 @@ static int fixed_regulator_of_to_plat(struct udevice *dev) uc_pdata->type = REGULATOR_TYPE_FIXED; - return regulator_common_of_to_plat(dev, plat, "gpio"); + gpios = dev_read_bool(dev, "gpios"); + return regulator_common_of_to_plat(dev, plat, gpios ? "gpios" : "gpio"); } static int fixed_regulator_get_value(struct udevice *dev) -- 2.41.0