devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: devicetree@vger.kernel.org
Cc: san@skov.dk
Subject: Addding a property that silently breaks linux kernel driver?
Date: Thu, 6 Sep 2018 23:18:24 +0200	[thread overview]
Message-ID: <20180906211824.GA20607@ravnborg.org> (raw)

Hi all.

The NXP RTC support that two different capacitors are connected.
The default (what the RTC is programmed to after reset) is 7 pF.
But one may also connect 12.5 pF to save power.
To use the 12.5 pF the RTC needs to be properly configured.

The RTC can only support either 7 pF or 12.5 pF.

A wrongly configured RTC will loose several hours in a week.


We came up with the following binding:
==========================================
* NXP PCF8523 Real Time Clock

NXP PCF8523 Real Time Clock

Required properties:
- compatible: Should contain "nxp,pcf8523".
- reg: I2C address for chip.

Optional property:
- nxp,quartz_load_12.5pF: The capacitive load on the quartz is 12.5pf,
  which differ from the default value of 7pf

Example:

pcf8523: pcf8523@68 {
       compatible = "nxp,pcf85063";
       reg = <0x68>;
       nxp,quartz_load_12.5pF;
};
=======================================

The Q:
The above scheme will SILENTLY break out-of-tree Linux users because
we will change so if nothing is specified the RTC is configured to 7 pF.
And you need to specify if 12.5 pF is used.

But all users of the kernel driver will assume 12.5 pF, because this
is the driver default. But not the default of the RTC.

We will change all in-kernel device trees when we add this, but...

Should we try do do this in a way so we respect the current
kernel driver implmentation, or should we respect the reset default
value of the RTC?

	Sam

             reply	other threads:[~2018-09-07  1:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06 21:18 Sam Ravnborg [this message]
2018-09-07 10:40 ` Addding a property that silently breaks linux kernel driver? Vladimir Zapolskiy
2018-09-07 17:51   ` Sam Ravnborg

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=20180906211824.GA20607@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=devicetree@vger.kernel.org \
    --cc=san@skov.dk \
    /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).