Message ID | 20231203222903.343711-6-andreas@kemnade.info |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2436137vqy; Sun, 3 Dec 2023 14:29:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWMGlHZIeW5+oP0bevuFoBJ9XPyViVzieV+D6mVDaJsrhg/UD89ueOBUoUG/pUznyxMgkb X-Received: by 2002:a05:6a20:1587:b0:18f:97c:6164 with SMTP id h7-20020a056a20158700b0018f097c6164mr4459812pzj.97.1701642585808; Sun, 03 Dec 2023 14:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701642585; cv=none; d=google.com; s=arc-20160816; b=Y0u0yQNLg55amd1q23KG16td8UTpOIp5MBBGTVS+Xd5G9FKVBAHb1CfCKC+3q7K6O2 c82eBH24vjQV0Zi0RfIRB0qSCGxYCzeW4KDjxerBaP6TrwXskpXw9DFHwantzMrfoBF3 P+Ys8F2mppU75y6NrNs7iJ/ReYgTiaLmo6Br6lZuXhAIalCE6FlVFhtCKP+k1JdxVw5T o/U2jcJPKeuzhY1rtXN5zeBKrP55fTQeRnfPiV/z8ixrxpsQksconKWAQM+3IhcClgxY Wc26yfuLvydX6+n8bgxpumlJo4IKW7MpMolvorJ+xU047w7Nt3rQKHGycIfYtHBInjHI BuyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=dHlD70RCHnJ7Q8UACG3DebnglQVd5G72KV1+Qjw76zs=; fh=ompBcuc9WZSkOT6I8Jb+H375/5cBcTGkrIOABj6b1VU=; b=mEg2A9/vijJaDp0ZoyrSSxaqo9NJxHeZ39/Le941U+yfF70IcwLGubYYmzb8sBwZ17 r6VDt58NuVEQtCxrIRmyaivcHxRrQQanzeoiJCqU+xrhoCDIcg24TsE5mQrxjUvPKuXo xvTzbtVjFzrJWWgbO7s36aW9CVrs13UPIon+MmrC/8LJ7OyHz6qzAf62BmDBlMnHwJ5u HwLzREsyHNFswwcbmV9sdAjtulq1HhHwQ1oMk1/3CrAMIsXnrQtGTNfm8qH+2rl+X8q6 lAeLyr0dEPdC5U8uaxl0sErFIoW63sZD1DZ9EJzoXiG81tDGdyHWNSVvpXOsf4NNP1LT JxhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bh8-20020a056a02020800b005bdbcff21f5si7236582pgb.501.2023.12.03.14.29.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Dec 2023 14:29:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B6C528079B06; Sun, 3 Dec 2023 14:29:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234088AbjLCW30 (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Sun, 3 Dec 2023 17:29:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234002AbjLCW3N (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 3 Dec 2023 17:29:13 -0500 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a02:c205:3004:2154::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B8F1E4; Sun, 3 Dec 2023 14:29:19 -0800 (PST) Received: from p200301077700c3001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:107:7700:c300:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <andreas@kemnade.info>) id 1r9uxb-006zEp-SL; Sun, 03 Dec 2023 23:29:11 +0100 Received: from andi by aktux with local (Exim 4.96) (envelope-from <andreas@kemnade.info>) id 1r9uxb-001Rau-1C; Sun, 03 Dec 2023 23:29:11 +0100 From: Andreas Kemnade <andreas@kemnade.info> To: lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, bcousson@baylibre.com, tony@atomide.com, andreas@kemnade.info, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH v3 5/6] mfd: twl4030-power: accept standard property for power controller Date: Sun, 3 Dec 2023 23:29:02 +0100 Message-Id: <20231203222903.343711-6-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231203222903.343711-1-andreas@kemnade.info> References: <20231203222903.343711-1-andreas@kemnade.info> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 03 Dec 2023 14:29:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784301575953386509 X-GMAIL-MSGID: 1784301575953386509 |
Series |
mfd: twl: system-power-controller
|
|
Commit Message
Andreas Kemnade
Dec. 3, 2023, 10:29 p.m. UTC
Instead of only accepting the ti specific properties accept also
the standard property. For uniformity, search in the parent node
for the tag. The code for powering of is also isolated from the
rest in this file. So it is a pure Linux design decision to put it
here.
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
drivers/mfd/twl4030-power.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On Sun, 03 Dec 2023, Andreas Kemnade wrote: > Instead of only accepting the ti specific properties accept also > the standard property. For uniformity, search in the parent node Search 'in' the parent node or 'from' the parent node? Where is the property? > for the tag. The code for powering of is also isolated from the Should this be "off"? > rest in this file. So it is a pure Linux design decision to put it > here. > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info> > --- > drivers/mfd/twl4030-power.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c > index e35b0f788c504..3ef892e63b88f 100644 > --- a/drivers/mfd/twl4030-power.c > +++ b/drivers/mfd/twl4030-power.c > @@ -686,6 +686,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata, > if (of_property_read_bool(node, "ti,use_poweroff")) > return true; > > + if (of_device_is_system_power_controller(node->parent)) > + return true; > + > return false; > } > > -- > 2.39.2 >
On Thu, 7 Dec 2023 17:13:41 +0000 Lee Jones <lee@kernel.org> wrote: > On Sun, 03 Dec 2023, Andreas Kemnade wrote: > > > Instead of only accepting the ti specific properties accept also > > the standard property. For uniformity, search in the parent node > > Search 'in' the parent node or 'from' the parent node? > > Where is the property? > The idea was to have the device tree property at the same place for all twl family devices. So no distinction for these devices needed in the bindings. It is in the main node. I guess today this twl4030-power subnode would not be accepted nowadays and the compatible would be some kind of flag in the parent. > > for the tag. The code for powering of is also isolated from the > > Should this be "off"? > yes, of course. Regards, Andreas
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index e35b0f788c504..3ef892e63b88f 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c @@ -686,6 +686,9 @@ static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata, if (of_property_read_bool(node, "ti,use_poweroff")) return true; + if (of_device_is_system_power_controller(node->parent)) + return true; + return false; }