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 E5486C77B75 for ; Tue, 9 May 2023 12:11:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A2EEC857D7; Tue, 9 May 2023 14:11:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 72725855D9; Tue, 9 May 2023 14:11:13 +0200 (CEST) Received: from mail-m11879.qiye.163.com (mail-m11879.qiye.163.com [115.236.118.79]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA0CC846EC for ; Tue, 9 May 2023 14:11:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kever.yang@rock-chips.com Received: from [192.168.0.116] (unknown [112.49.211.222]) by mail-m11879.qiye.163.com (Hmail) with ESMTPA id A7C9E6805C3; Tue, 9 May 2023 20:10:53 +0800 (CST) Message-ID: <43bc3dff-179a-8392-69f7-442a0611d10a@rock-chips.com> Date: Tue, 9 May 2023 20:10:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 5/8] regulator: fixed: Add support for gpios prop Content-Language: en-US To: Jonas Karlman , Simon Glass , Philipp Tomsich , Jaehoon Chung Cc: Eugen Hristev , u-boot@lists.denx.de References: <20230422181943.889436-1-jonas@kwiboo.se> <20230422181943.889436-6-jonas@kwiboo.se> From: Kever Yang In-Reply-To: <20230422181943.889436-6-jonas@kwiboo.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlDTElNVk0ZSx9CQ04dGE9PTFUTARMWGhIXJBQOD1 lXWRgSC1lBWUpKSVVPQlVJSkpVSUlJWVdZFhoPEhUdFFlBWU9LSFVKTkxJSklVSktLVUpCWQY+ X-HM-Tid: 0a88006bf02c2eb5kusna7c9e6805c3 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MSI6Eio5FD0KHSsSFxlDTgwy GAIKCUpVSlVKTUNITUhPSU5PSUhKVTMWGhIXVRAeDR4JVQIaFRw7CRQYEFYYExILCFUYFBZFWVdZ EgtZQVlKSklVT0JVSUpKVUlJSVlXWQgBWUFJQkpDNwY+ 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 On 2023/4/23 02:19, Jonas Karlman wrote: > 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. > > Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang Thanks, - Kever > --- > 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 ad3b4b98d667..fcfb467a46e3 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,9 @@ 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)