linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
Cc: "Lee Jones" <lee.jones@linaro.org>,
	"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Andreas Färber" <afaerber@suse.de>,
	linux-actions@lists.infradead.org, devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Linux Input" <linux-input@vger.kernel.org>,
	"open list:THERMAL" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v2 1/6] dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding
Date: Wed, 9 Sep 2020 11:22:48 -0600	[thread overview]
Message-ID: <CAL_JsqL+21YH+_w3e6PnW0GqPyEAD6uU-hqHZercKK0xQwCOjg@mail.gmail.com> (raw)
In-Reply-To: <20200909160334.GA385382@BV030612LT>

On Wed, Sep 9, 2020 at 10:03 AM Cristian Ciocaltea
<cristian.ciocaltea@gmail.com> wrote:
>
> Hi Rob,
>
> Thanks for reviewing!
>
> On Tue, Sep 08, 2020 at 03:47:24PM -0600, Rob Herring wrote:
> > On Sat, Aug 22, 2020 at 01:19:47AM +0300, Cristian Ciocaltea wrote:
> > > Add devicetree binding for Actions Semi ATC260x PMICs.
> > >
> > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> > > ---
> > >  .../bindings/mfd/actions,atc260x.yaml         | 221 ++++++++++++++++++
> > >  1 file changed, 221 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/mfd/actions,atc260x.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/mfd/actions,atc260x.yaml b/Documentation/devicetree/bindings/mfd/actions,atc260x.yaml
> > > new file mode 100644
> > > index 000000000000..4a55bbe1306e
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/mfd/actions,atc260x.yaml
> > > @@ -0,0 +1,221 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/mfd/actions,atc260x.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Actions Semi ATC260x Power Management IC bindings
> > > +
> > > +maintainers:
> > > +  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > +  - Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> > > +
> > > +description: |
> > > +  ATC260x series PMICs integrates Audio Codec, Power Management, RTC, IR
> > > +  and GPIO controller blocks. Currently only the PM related functionalities
> > > +  (i.e. regulators and system power-off/reboot) for the ATC2603C and ATC2609A
> > > +  chip variants are supported.
> > > +  ATC2603C includes 3 programmable DC-DC converters and 9 LDO regulators.
> > > +  ATC2609A includes 5 programmable DC-DC converters and 10 LDO regulators.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - actions,atc2603c
> > > +      - actions,atc2609a
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  interrupts:
> > > +    maxItems: 1
> > > +
> > > +  pwrc:
> > > +    type: object
> > > +    description: |
> > > +      The power controller integrated in ATC260x provides system power-off
> > > +      and reboot operations.
> >
> > No need for this node as there are no properties, just instantiate
> > what's needed in the MFD driver.
>
> My intention was to allow the user specify what functionality in the MFD
> shall be enabled. For this particular case, if the 'pwrc' node is not
> provided, the power-off/reboot functions will be disabled.

IIRC, there's a flag property for this already.

>
> > > +
> > > +    properties:
> > > +      compatible:
> > > +        enum:
> > > +          - actions,atc2603c-pwrc
> > > +          - actions,atc2609a-pwrc
> > > +
> > > +    required:
> > > +      - compatible
> > > +
> > > +    additionalProperties: false
> > > +
> > > +  onkey:
> > > +    type: object
> > > +    description: |
> > > +      Use the ONKEY built into ATC260x PMICs as an input device reporting
> > > +      power button status. ONKEY can be used to wakeup from low power
> > > +      modes and force a reset on long press.
> > > +
> > > +    properties:
> > > +      compatible:
> > > +        enum:
> > > +          - actions,atc2603c-onkey
> > > +          - actions,atc2609a-onkey
> > > +
> > > +      actions,reset-time-sec:
> > > +        description: |
> > > +          Duration in seconds which the key should be kept pressed for device
> > > +          to reset automatically. The hardware default is 8. Use 0 to disable
> > > +          this functionality.
> > > +        enum: [0, 6, 8, 10, 12]
> >
> > We already have 'power-off-time-sec' in input.yaml. How about adding
> > 'reset-time-sec' there.
>
> Thanks for the suggestion, I was actually looking for this before
> choosing the custom property and just assumed this was not added for
> a particular reason.

Probably just because the usual behavior of holding the power button
is to power off rather than reset.

> So I'm going to handle it. Would you like me to send a separate patch
> (not part of this series)?

Separate patch yes, but it can be part of the series.

> > This could really just be a property in the parent node.
>
> This is similar with 'pwrc': if 'onkey' node is not present, the ONKEY
> functionality will not be enabled.

Would you really want/need to support wakeup, but disable long press
feature? Seems like a single property would be sufficient.

> Is there a better/recommended approach to manage this MFD feature
> selection?

But we have child nodes for this in other cases, so I guess it is fine.

Rob

  reply	other threads:[~2020-09-09 17:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 22:19 [PATCH v2 0/6] Add initial support for ATC260x PMICs Cristian Ciocaltea
2020-08-21 22:19 ` [PATCH v2 1/6] dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding Cristian Ciocaltea
2020-09-08 21:47   ` Rob Herring
2020-09-09 16:03     ` Cristian Ciocaltea
2020-09-09 17:22       ` Rob Herring [this message]
2020-08-21 22:19 ` [PATCH v2 2/6] mfd: Add MFD driver for ATC260x PMICs Cristian Ciocaltea
2020-08-21 22:19 ` [PATCH v2 3/6] regulator: Add regulator " Cristian Ciocaltea
2020-08-24 11:00   ` Mark Brown
2020-08-24 23:23     ` Cristian Ciocaltea
2020-08-25 10:55       ` Mark Brown
2020-08-21 22:19 ` [PATCH v2 4/6] power: reset: Add poweroff " Cristian Ciocaltea
2020-08-24 14:41   ` Sebastian Reichel
2020-08-24 23:31     ` Cristian Ciocaltea
2020-08-21 22:19 ` [PATCH v2 5/6] input: atc260x: Add onkey " Cristian Ciocaltea
2020-09-14 21:09   ` Dmitry Torokhov
2020-09-18 10:35     ` Cristian Ciocaltea
2020-09-29 20:35       ` Dmitry Torokhov
2020-09-29 21:46         ` Cristian Ciocaltea
2020-08-21 22:19 ` [PATCH v2 6/6] MAINTAINERS: Add entry for ATC260x PMIC Cristian Ciocaltea
2020-08-21 22:26 ` [PATCH v2 0/6] Add initial support for ATC260x PMICs Cristian Ciocaltea
2020-08-22 13:13   ` Manivannan Sadhasivam
2020-08-22 23:24     ` Cristian Ciocaltea
2020-08-25  3:48       ` Manivannan Sadhasivam

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=CAL_JsqL+21YH+_w3e6PnW0GqPyEAD6uU-hqHZercKK0xQwCOjg@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=afaerber@suse.de \
    --cc=broonie@kernel.org \
    --cc=cristian.ciocaltea@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=sre@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).