From patchwork Sat Nov 25 09:29:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Kemnade X-Patchwork-Id: 169681 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp1830973vqx; Sat, 25 Nov 2023 01:30:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbp5ey3DDAsRc/1MBAyYhHjef56r5H+Vrwk0ISicch6RB8gp4LJ47uXaMKU8osbdAgo7dq X-Received: by 2002:a17:902:9044:b0:1cf:a3e1:21b1 with SMTP id w4-20020a170902904400b001cfa3e121b1mr4007865plz.66.1700904632460; Sat, 25 Nov 2023 01:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700904632; cv=none; d=google.com; s=arc-20160816; b=emW1azhKP6cbi/wunE8bBZIMIjWnAo5WrxOHcOZ10Cqg1caVNaifHpzKt4pm/f+Hhb AMsGHvpPi1UjRsQxerVvCqAhbPnsJOZNzneOPxrl4cnz06n/nJZpPhxMF3qTEeiipW6l 3tkdQUm9EOUPxQvfJgZMcPj7Zblta04A8Byp0InTm/gYaUO1OiMnUSMfF8t4dxWK4U/E KUaycbzr3uO+ItCCxa6sTApPekpHM3OIlUTYuxNZ9m7lIvLqHNcFudJrJmBog+VhQJFn 3P1gQyuvEtNtp5MbnyPMzL1k4JTDpWbVjy5RKNny8TtHmtJHxPdoOfy3DntnXHbMuGCg MDtA== 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=hs8RcO6i5g2Ii1vSY0RpAc7lXRS5vzzFFd/AaORZJvkfO8YjhyXPmJbkIcC8u7dyC9 EK3nycYDq708ks29ySpwOlSadd/atTcShiHMFqEE4y2XXP9IYXLKBy6aArCZ1A/SVUXw I6jFKEqqudKNCog+w96irDjl8/pylYQEOi+6PDdukGrhZafA/nNDIwj/qU7CoR8MAAin m/N2VqNTaYR7JBsFahymIru066N/GQ6Col82xk4mEff6Sqstg+5KIHs/PmKCIJsiGmIM e+DcHW3/O15xTUGbd1LZTBg/RShMBFSLMzNIIZFV8GnAkmXJjb6W1+yqKGTb63yZHmVn LXRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id g15-20020a1709029f8f00b001cfa037c5easi3743632plq.39.2023.11.25.01.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 01:30:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 410568072A22; Sat, 25 Nov 2023 01:30:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbjKYJaM (ORCPT + 99 others); Sat, 25 Nov 2023 04:30:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjKYJ3t (ORCPT ); Sat, 25 Nov 2023 04:29:49 -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 CAD0B10CB; Sat, 25 Nov 2023 01:29:53 -0800 (PST) Received: from p200301077700a9001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:107:7700:a900: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 ) id 1r6oyw-006fpG-SQ; Sat, 25 Nov 2023 10:29:46 +0100 Received: from andi by aktux with local (Exim 4.96) (envelope-from ) id 1r6oyw-0004JV-23; Sat, 25 Nov 2023 10:29:46 +0100 From: Andreas Kemnade 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 5/6] mfd: twl4030-power: accept standard property for power controller Date: Sat, 25 Nov 2023 10:29:37 +0100 Message-Id: <20231125092938.16535-6-andreas@kemnade.info> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231125092938.16535-1-andreas@kemnade.info> References: <20231125092938.16535-1-andreas@kemnade.info> MIME-Version: 1.0 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 howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 25 Nov 2023 01:30:29 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783527775874647750 X-GMAIL-MSGID: 1783527775874647750 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 --- 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; }