From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571B734B180; Tue, 21 Oct 2025 17:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761067110; cv=none; b=TeztIVlLmhadMg11PVFvyQFKm3a6BcaAM4TDEpiDqtVXZm/L9f02nIFUmANIiX+Y1PIgttDLbgOOZyx7OPQYI0UNj5c8M0IwWDKfg39VU162MdwO+I/83zpwxtzyPZBr1irBPqgQcaekHjEixdpSRPDjQXIZLb01xIBBgj4oIqw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761067110; c=relaxed/simple; bh=QtLXS3rzu85GPfiyQyWFtuvBX2K+zVl2eqhHbxp7VYc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=t9vsjQZgcoclsJQH8itFoE+QQyATD91D3wMWdtISHOspVLYI/Vlw1mLGtF8nuXS7tv4gcYPhbB3cToCL4UAaYodBgt25ZBm6jbUFb3B6H86uHDbU5le/fL4usrs8dQG/akPKX2hslmCmKe6NoDsh1trKZuzjsRDsHNlk7w4bu4c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tLFyB1hK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tLFyB1hK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2101C4CEF1; Tue, 21 Oct 2025 17:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761067109; bh=QtLXS3rzu85GPfiyQyWFtuvBX2K+zVl2eqhHbxp7VYc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=tLFyB1hKmQyILba52G5QPz0hWIrOzggT5rxoOzZqq7ZoR+eRBNGGZrjcdOWAGcQga rNHX+CSDcSL4YMcZ+OO8a2m42NZgFgVmSoyqjhOR2cUNL3k4nNq+KwBGp9YuvyfV3t JNeY5ZDJAY6nRuJwNRaGmQVdFfHVI6s4PklmUH5+ae8Xlkb9mXq0dFXmco496qqXYH +QkgxK/6c8vF4a5RB7VCSWDcwVlsvc43O70bBSY8UDAAgEOE3h0/Ao4JjtgMg1lAd6 Wo4oxiBfX+uaJHpV+JFhCZHHWnBC/jByJQclgtU3EEEWrT9zNnguXO6Pkaf/3WJlcZ tI/s+XSGpbnxw== Message-ID: <7702e4f6-4913-4d9e-bbc4-1fb849507e4c@kernel.org> Date: Tue, 21 Oct 2025 19:18:25 +0200 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/3] dt-bindings: mfd: twl: enable power button also for twl603x To: Andreas Kemnade Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dmitry Torokhov , Tony Lindgren , Kevin Hilman , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-omap@vger.kernel.org References: <20251020-twl6030-button-v1-0-93e4644ac974@kernel.org> <20251020-twl6030-button-v1-1-93e4644ac974@kernel.org> <5fd43d2c-3a08-4a51-abb6-38883ee86bf2@kernel.org> <20251021104515.5e25bec1@kemnade.info> <20251021183624.6fde0a15@kemnade.info> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8B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vuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5 RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2 H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2 zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A= In-Reply-To: <20251021183624.6fde0a15@kemnade.info> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 21/10/2025 18:36, Andreas Kemnade wrote: > On Tue, 21 Oct 2025 11:58:49 +0200 > Krzysztof Kozlowski wrote: > >> On 21/10/2025 10:45, Andreas Kemnade wrote: >>> On Tue, 21 Oct 2025 09:10:28 +0200 >>> Krzysztof Kozlowski wrote: >>> >>>> On 20/10/2025 14:31, akemnade@kernel.org wrote: >>>>> From: Andreas Kemnade >>>>> >>>>> TWL603x has also a power button, so add the corresponding subnode. >>>> >>>> No, we don't add subnodes just because there is a power button. This >>>> needs broader explanation, see also my further comment. >>>> >>> Hmm, what is the general pattern to follow if a mfd device has some >>> functionality which depends on some optional external components? >> >> Please describe it better - how these nodes depend on external >> component? The power button logic/IC is in this device always. It is not >> optional. >> > The power button logic is always there, yes, but it depends on an optional > actual mechanical button connected to a pad of this device, which is > not always there. The logic will not work if I just put my finger on the PMIC, > but it will work if there is a mechanical button which I can press connected to > the PMIC. Hm... how do you represent this logic now? By adding status=disabled to the pwrbutton node? > >>> The might be a power button connected to it or not. I find it ugly >>> to have non-existent stuff in the system. >>> In general, yes I understand the argument against the subnode. >>> >>>>> >>>>> Signed-off-by: Andreas Kemnade >>>>> --- >>>>> Documentation/devicetree/bindings/mfd/ti,twl.yaml | 40 ++++++++++++++++++----- >>>>> 1 file changed, 32 insertions(+), 8 deletions(-) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/mfd/ti,twl.yaml b/Documentation/devicetree/bindings/mfd/ti,twl.yaml >>>>> index 776b04e182cb2..3527fee32cb07 100644 >>>>> --- a/Documentation/devicetree/bindings/mfd/ti,twl.yaml >>>>> +++ b/Documentation/devicetree/bindings/mfd/ti,twl.yaml >>>>> @@ -55,6 +55,15 @@ allOf: >>>>> >>>>> gpadc: false >>>>> >>>>> + pwrbutton: >>>>> + properties: >>>>> + compatible: >>>>> + const: ti,twl4030-pwrbutton >>>>> + interrupts: >>>>> + items: >>>>> + - items: >>>>> + const: 8 >>>> >>>> What is the point of defining const interrupts? If they are const, then >>>> it is implied by compatible and defined in the driver. >>>> >>>> Anyway, double items does not look right here. This is an odd syntax. >>>> >>> Quoting Rob: >>> As 'interrupts' is a matrix, this needs to be: >>> >>> interrupts: >>> items: >>> - items: >>> - const: 8 >>> >>> https://lore.kernel.org/linux-omap/20240318150750.GA4000895-robh@kernel.org/ >> >> >> OK, this answers second part but I don't understand why even having this >> in DT. If this is fixed, should be implied by the compatible? >> > correct, they do not need to come from DT. The same is true for all > subnodes of the twl[46]03X. I just followed the usual > pattern there, which is of course not recommended for new designs. OK, please mention the reasons (so following established pattern for this legacy device) in commit msg. Best regards, Krzysztof