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 D2213C77B75 for ; Wed, 17 May 2023 22:54:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EA244862A6; Thu, 18 May 2023 00:53:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject 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="fcTclzJ0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DCA73861F7; Thu, 18 May 2023 00:53:49 +0200 (CEST) Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) (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 4BA5686290 for ; Thu, 18 May 2023 00:53:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject 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=zBzhAkmwFEulCmPODQxYLH/Ypjh7h0x7SSkSP90oXAI=; b=fcTclzJ0rFfrRsASvFS5oX0NvYK7OGssUjMstpoZOcfZG35I8lscmF5uWdSvdT6FsJpz lNEAC9FFBrLo3GQHxYFqWO42SZ4k7/9umiPi/9MV7ZcHuZCbtxma2Is4T6VpWtdjYjeg6W iYzW7MY5Oe4M2ttXHeZvTXjDUDdNPqiQgpuzd97jW8GwkueeMYONSf5b+zyOUIUaXdAKAV Z1t943EB3AzbYiurdrLNWnuuPfO2FG3RuAEgVR2bRdFbc6kFCPrDxN9DI96neC0x6YCqdB DDiEqCmHOPFsbxg6r7P+7yMY15mDjoeiwIr26/i5jLyJZxt8LSBBZ7oN7vV9CwNg== Received: by filterdrecv-66949dbc98-fvstg with SMTP id filterdrecv-66949dbc98-fvstg-1-64655AF9-1D 2023-05-17 22:53:45.790334004 +0000 UTC m=+602044.489268392 Received: from bionic.localdomain (unknown) by geopod-ismtpd-10 (SG) with ESMTP id 3PXFI-IyQjWtsPaj3xQAOA Wed, 17 May 2023 22:53:45.521 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 6/9] regulator: fixed: Add support for gpios prop Date: Wed, 17 May 2023 22:53:45 +0000 (UTC) Message-Id: <20230517225337.2089287-7-jonas@kwiboo.se> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517225337.2089287-1-jonas@kwiboo.se> References: <20230517225337.2089287-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h4MSdPEHmnWa6u3Lk?= =?us-ascii?Q?3goSr2qkPXEbYrueY1pDyDzBFy9X5ReMZMA2Ox+?= =?us-ascii?Q?3g5xrF39EIMCpgBcVHPM6Q1oh73GC7W+nAaMdJs?= =?us-ascii?Q?QEkzYj2YP2hSviZIzK3lWB6XduYQsG1o3Q0Yynd?= =?us-ascii?Q?cA0329WGa+x+QHna4vFBO9KQryDvh5DGlP0wSg?= To: Kever Yang , Simon Glass , Philipp Tomsich , Jaehoon Chung Cc: Eugen Hristev , 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 --- v2: - Update commit message - Collect r-b tag drivers/power/regulator/fixed.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c index 90004d1601a9..e921a5984ef7 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 *dev_pdata; + bool gpios; dev_pdata = dev_get_plat(dev); uc_pdata = dev_get_uclass_plat(dev); @@ -33,7 +34,9 @@ static int fixed_regulator_of_to_plat(struct udevice *dev) uc_pdata->type = REGULATOR_TYPE_FIXED; - return regulator_common_of_to_plat(dev, dev_pdata, "gpio"); + gpios = dev_read_bool(dev, "gpios"); + return regulator_common_of_to_plat(dev, dev_pdata, + gpios ? "gpios" : "gpio"); } static int fixed_regulator_get_value(struct udevice *dev) -- 2.40.1