devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Job Sava <jsava@criticallink.com>
Cc: Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Julien Panis <jpanis@baylibre.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, jcormier@criticallink.com
Subject: Re: [PATCH 1/3] dt-bindings: mfd: Add power-button option for TI TPS6594 PMIC
Date: Tue, 3 Jun 2025 08:51:59 +0200	[thread overview]
Message-ID: <0fb4b411-1b27-43fc-8d48-e5220fc85478@kernel.org> (raw)
In-Reply-To: <CAKMwjwQOBE651A-5VVjwcv5TspO2eNZfgwWzMpTTWxhR3nGKUw@mail.gmail.com>

On 02/06/2025 15:07, Job Sava wrote:
> On Thu, May 29, 2025 at 5:26 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Fri, May 23, 2025 at 09:46:49AM GMT, Job Sava wrote:
>>> On Wed, May 21, 2025 at 6:01 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>>>
>>>> On Tue, May 20, 2025 at 01:43:36PM GMT, Job Sava wrote:
>>>>> The TPS6594 power-button option permits users to enter STANDBY or
>>>>> ACTIVE state by a push, release, or short push button request.
>>>>>
>>>>> Signed-off-by: Job Sava <jsava@criticallink.com>
>>>>> ---
>>>>>  Documentation/devicetree/bindings/mfd/ti,tps6594.yaml | 15 +++++++++++++++
>>>>>  1 file changed, 15 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml b/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
>>>>> index 6341b6070366..a40808fd2747 100644
>>>>> --- a/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
>>>>> +++ b/Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
>>>>> @@ -37,6 +37,21 @@ properties:
>>>>>        device on the SPMI bus, and the secondary PMICs are the target devices
>>>>>        on the SPMI bus.
>>>>>
>>>>> +  ti,power-button:
>>>>> +    type: boolean
>>>>> +    description: |
>>>>> +      Optional property that sets the EN/PB/VSENSE pin to be a
>>>>> +      power-button.
>>>>> +      TPS6594 has a multipurpose pin called EN/PB/VSENSE that can be either
>>>>> +      1. EN in which case it functions as an enable pin.
>>>>> +      2. VSENSE which compares the voltages and triggers an automatic
>>>>> +      on/off request.
>>>>> +      3. PB in which case it can be configured to trigger an interrupt
>>>>> +      to the SoC.
>>>>> +      ti,power-button reflects the last one of those options
>>>>> +      where the board has a button wired to the pin and triggers
>>>>> +      an interrupt on pressing it.
>>>>
>>>> Don't you need to handle two other cases as well? I assume you copied
>>>> this from the other binding, but all three options are valid?
>>>>
>>>> Best regards,
>>>> Krzysztof
>>>>
>>> Hello Krzysztof,
>>>
>>> Thank you for your response!
>>>
>>> I agree that the other two cases are valid options. However, for this
>>> particular patch series, they may be out of scope. The primary goal of
>>> this patch is to enable push-button functionality, rather than
>>> addressing the VSENSE or EN modes.
>>
>> Binding should be complete, because if you design this as bool, it
>> cannot be later changed to three-state (enum).
>>
>> I don't know if the EN and VSENSE modes are anyhow useful, maybe people
>> interested in this hardware should say.
>>
>> Best regards,
>> Krzysztof
>>
> 
> Hi Krzysztof,
> 
> Thanks again for the feedback.
> 
> I modeled this binding after the TPS65219 PMIC, which uses a boolean

Yeah, that's what I meant in my first reply.

> for ti,power-button, despite the same EN/PB/VSENSE options. Since this
> patch only enables PB mode, I felt a boolean was appropriate and
> consistent.

Properties should have only one type, so that would be a different
property. Someone knowing the device should come with arguments whether
other states for this are useful at all. Or not useful and then argument
that in commit msg for example.


Best regards,
Krzysztof

  reply	other threads:[~2025-06-03  6:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 17:43 [PATCH 0/3] Powerbutton driver and powerdown request for TPS65224 PMIC Job Sava
2025-05-20 17:43 ` [PATCH 1/3] dt-bindings: mfd: Add power-button option for TI TPS6594 PMIC Job Sava
2025-05-21 10:01   ` Krzysztof Kozlowski
2025-05-23 13:46     ` Job Sava
2025-05-29  9:25       ` Krzysztof Kozlowski
2025-06-02 13:07         ` Job Sava
2025-06-03  6:51           ` Krzysztof Kozlowski [this message]
2025-06-17 16:07             ` Job Sava
2025-07-17 13:58               ` Michael Walle
2025-07-18 19:07                 ` Jon Cormier
2025-07-21  6:42                   ` Michael Walle
2025-07-30 13:52                     ` Markus Schneider-Pargmann
2025-05-20 17:43 ` [PATCH 2/3] mfd: tps6594-pwrbutton: Add powerbutton functionality Job Sava
2025-05-20 18:15   ` Dmitry Torokhov
2025-06-13 14:09   ` Lee Jones
2025-06-17 15:54     ` Job Sava
2025-05-20 17:43 ` [PATCH 3/3] mfd: tps6594: Adds support for powering off the PMIC Job Sava
2025-06-13 14:11   ` Lee Jones
2025-06-17 16:00     ` Job Sava
2025-08-19 11:27 ` [PATCH 0/3] Powerbutton driver and powerdown request for TPS65224 PMIC Michael Walle
2025-08-19 11:30   ` Michael Walle
2025-08-19 16:22     ` Jon Cormier
2025-08-20  7:06       ` Michael Walle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fb4b411-1b27-43fc-8d48-e5220fc85478@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jcormier@criticallink.com \
    --cc=jpanis@baylibre.com \
    --cc=jsava@criticallink.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).