linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: "Kevin P. Fleming" <kevin+linux@km6g.us>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	"open list:REAL TIME CLOCK (RTC) SUBSYSTEM" 
	<linux-rtc@vger.kernel.org>,
	devicetree@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>
Subject: Re: [PATCH] rtc: abx80x: Add support for autocalibration filter capacitor
Date: Fri, 12 Jun 2020 08:23:50 -0600	[thread overview]
Message-ID: <CAL_Jsq+=WwN2AL0o2vpwjXr90Vi-=UmY_N+Pz7F2YGa4b7CiAA@mail.gmail.com> (raw)
In-Reply-To: <CAE+UdooznvJaJsMjrS+MeM6ysii8tR9fuZhjt44sMRF6VjYqPw@mail.gmail.com>

On Fri, Jun 12, 2020 at 5:48 AM Kevin P. Fleming <kevin+linux@km6g.us> wrote:
>
> On Wed, Jun 10, 2020 at 11:16 AM Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> > When working with RTCs, there is one issue though: boolean properties
> > are not working well because there is no way to express the 3 different
> > conditions:
> >  1/ the capacitor is present, set the register
> >  2/ the capacitor is absent, clear the register
> >  3/ the device tree didn't have this property until not and the register
> >    may have been set or cleared using another mean, don't touch it.
> >
> > As your patch is written, it only handles 1 and 3 which is probably the
> > safest option but then we will never have a way to clear it from the
> > driver. I'd say that this is not an issue but it is also something we
> > will never be able to change without breaking some setups.
>
> I agree. I could implement this as an enumerated string option which
> accepts 'yes' or 'no'. Those would cover cases 1 and 2, and the
> absence of the property would be case 3. I looked through the bindings
> that exist and didn't see any examples of properties configured this
> way, but I think it would be understandable to users.

It's a solved problem:

foo-feature = 0; //disable
foo-feature = 1; //enable
<no prop> // Leave feature configured as-is

Rob

      reply	other threads:[~2020-06-12 14:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-30 12:32 [PATCH] rtc: abx80x: Add support for autocalibration filter capacitor Kevin P. Fleming
2020-05-30 12:50 ` Kevin P. Fleming
2020-06-09 22:14 ` Rob Herring
2020-06-09 22:23   ` Kevin P. Fleming
2020-06-10 15:16     ` Alexandre Belloni
2020-06-12 11:48       ` Kevin P. Fleming
2020-06-12 14:23         ` Rob Herring [this message]

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_Jsq+=WwN2AL0o2vpwjXr90Vi-=UmY_N+Pz7F2YGa4b7CiAA@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kevin+linux@km6g.us \
    --cc=linux-rtc@vger.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).