From: Flavio Suligoi <f.suligoi@asem.it>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Mark Rutland <mark.rutland@arm.com>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/2] dt-bindings: rtc: add battery-low-hw-alarm property
Date: Mon, 8 Apr 2019 07:22:44 +0000 [thread overview]
Message-ID: <58b8e1bc2b064abcb67db04369cf9c6e@asem.it> (raw)
In-Reply-To: <20190406125550.GA7480@piout.net>
HI,
> On 06/04/2019 01:07:13-0500, Rob Herring wrote:
> > On Wed, Apr 03, 2019 at 04:52:44PM +0200, Flavio Suligoi wrote:
> > > Some RTC devices have a battery-low automatic detection circuit.
> > > The battery-low event is usually reported with:
> > >
> > > - a bit change in a RTC status register
> > > - a hw signaling (generally using an interrupt generation), changing
> > > the hw level of a specific pin;
> > >
> > > The new property "battery-low-hw-alarm" enable the RTC to generate the
> > > hw signaling in case of battery-low event.
> > >
> > > Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
> > > ---
> > > Documentation/devicetree/bindings/rtc/rtc.txt | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/rtc/rtc.txt
> b/Documentation/devicetree/bindings/rtc/rtc.txt
> > > index a97fc6a..f93a44d 100644
> > > --- a/Documentation/devicetree/bindings/rtc/rtc.txt
> > > +++ b/Documentation/devicetree/bindings/rtc/rtc.txt
> > > @@ -31,6 +31,9 @@ below.
> > > expressed in femto Farad (fF).
> > > The default value shall be listed (if
> optional),
> > > and likewise all valid values.
> > > +- battery-low-hw-alarm : Enable the "battery-low" output pin. This
> function
> > > + is available on the following devices:
> > > + - pcf2127 - pin used for alarm: INTn
> >
> > Boolean? If there's cases where which pin is selectable, then we'd need
> > this to take a value. Not sure how likely that is?
> >
>
> Indeed, there is at least the pcf85363 that has two possible pins for
> that interrupt. How would you select the pin then? a zero based index? a
> string?
I think the string could be clearer for the final user and would give
more freedom for future changes.
For example, we can call this property, instead of "battery-low-alarm" or
"low-voltage-alarm", simply: "alarm-pin_1" and then the string argument
can describe the function used; for example:
alarm-pin_1 = "backup-supply-low-voltage-alarm";
alarm-pin_2 = "......";
Flavio Suligoi
next prev parent reply other threads:[~2019-04-08 7:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 14:52 [PATCH 1/2] dt-bindings: rtc: add battery-low-hw-alarm property Flavio Suligoi
2019-04-03 14:52 ` [PATCH 2/2] rtc: pcf2127: add battery-low INTn generation Flavio Suligoi
2019-04-03 15:08 ` Alexandre Belloni
2019-04-03 15:14 ` Flavio Suligoi
2019-04-03 15:31 ` Alexandre Belloni
2019-04-03 15:49 ` Flavio Suligoi
2019-04-03 15:56 ` Alexandre Belloni
2019-04-03 16:09 ` Flavio Suligoi
2019-04-03 16:15 ` Alexandre Belloni
2019-04-03 16:20 ` Flavio Suligoi
2019-04-03 14:57 ` [PATCH 1/2] dt-bindings: rtc: add battery-low-hw-alarm property Alexandre Belloni
2019-04-03 15:06 ` Flavio Suligoi
2019-04-03 15:28 ` Alexandre Belloni
2019-04-03 15:32 ` Flavio Suligoi
2019-04-06 6:07 ` Rob Herring
2019-04-06 12:55 ` Alexandre Belloni
2019-04-08 7:22 ` Flavio Suligoi [this message]
2019-04-09 1:18 ` Rob Herring
2019-04-10 8:04 ` Flavio Suligoi
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=58b8e1bc2b064abcb67db04369cf9c6e@asem.it \
--to=f.suligoi@asem.it \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--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).