public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: swarren@wwwdotorg•org (Stephen Warren)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC] of: Allow for experimental device tree bindings
Date: Wed, 23 Oct 2013 17:33:28 +0100	[thread overview]
Message-ID: <5267FA58.9050002@wwwdotorg.org> (raw)
In-Reply-To: <1382540779-6334-1-git-send-email-treding@nvidia.com>

On 10/23/2013 04:06 PM, Thierry Reding wrote:
> Past and recent discussions have shown that there's some concensus that
> device tree bindings should be considered an ABI and therefore need to
> remain backwards-compatible once code to implement them is included in
> the final release of a Linux kernel.
> 
> At the same time there is a desire to keep some manoeuvre while we're
> trying to figure things out. The fact is that many of us lack the
> experience to design good bindings from the start. At the same time
> there is a shortage of people that can review bindings and help design
> better ones.
> 
> Progress and the addition of new features (and restoration of features
> that used to work before the advent of DT for that matter) are blocked
> to a large degree because of that.
> 
> This patch attempts to restore some degree of freedom by introducing an
> easy way to mark device tree bindings as experimental as well as a way
> for users to disable the use of experimental bindings if they choose
> functionality at the cost of potential device tree incompatibilities.
> 
> Bindings are marked experimental by prefixing the compatible value with
> an exclamation mark (!). In order to make it clear that experimental
> bindings are undesirable in the long run, a warning will be output when
> an experimental binding is encountered.

> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig

> +static int of_compat_match(const char *device, const char *driver,
> +			   const struct device_node *np)
> +{
> +	const char *dev = device;
> +	const char *drv = driver;
> +
> +	if (device[0] == '!')
> +		device++;
> +
> +	if (driver[0] == '!')
> +		driver++;
> +
> +	if (of_compat_cmp(device, driver, strlen(driver)) != 0)
> +		return 0;

Do we really want to polute the drivers and DT files with a ! in the
compatible values? I thought we'd considered that, but chosen having the
drivers that use unstable bindings depend on a Kconfig option as an
alternative, not an additional step?

The one issue with doing this is that if a binding is thought to be
unstable, but becomes stable later without any changes, we'll have to do
busy-work to remove the ! in all the DT files, thus artificially
introducing an incompatibility. Perhaps that's fine though?

  parent reply	other threads:[~2013-10-23 16:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 15:06 [RFC] of: Allow for experimental device tree bindings Thierry Reding
2013-10-23 16:05 ` [Ksummit-2013-discuss] " David Woodhouse
2013-10-23 16:55   ` Guenter Roeck
2013-10-23 17:05     ` David Woodhouse
2013-10-23 18:56       ` Thierry Reding
2013-10-23 18:51   ` Thierry Reding
2013-10-24 22:26     ` Stephen Warren
2013-10-25  8:22       ` Thierry Reding
2013-10-25  8:45         ` Stephen Warren
2013-10-23 16:33 ` Stephen Warren [this message]
2013-10-23 17:20   ` Wolfram Sang
2013-10-23 18:59     ` Thierry Reding
2013-10-23 19:34       ` Jason Gunthorpe
2013-10-23 19:58         ` Thierry Reding
2013-10-23 21:08           ` Jason Gunthorpe
2013-10-24  8:04             ` Thierry Reding
2013-10-24 17:32               ` Jason Gunthorpe
2013-10-23 21:13           ` Andy Lutomirski
2013-10-23 19:40       ` Wolfram Sang
2013-10-23 20:05         ` Thierry Reding
2013-10-24  8:34     ` Grant Likely
2013-10-24  8:50       ` Thierry Reding
2013-10-24 20:26       ` Matt Sealey
2013-10-24 22:29       ` Stephen Warren
2013-10-24 18:39 ` jonsmirl at gmail.com

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=5267FA58.9050002@wwwdotorg.org \
    --to=swarren@wwwdotorg$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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