devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes
       [not found]       ` <20131125094044.GE3176@lukather>
@ 2013-11-30 12:02         ` Jonathan Cameron
       [not found]           ` <5299D3BA.8080700-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2013-11-30 12:02 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Denis CIOCCA, Shawn Guo,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Alexandre Belloni, Brian Lilly, Brent-Crosby, Jim Wall,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jean Delvare

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/25/13 09:40, Maxime Ripard wrote:
> Hi Jonathan,
> 
> On Sun, Nov 24, 2013 at 09:00:49PM +0000, Jonathan Cameron wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> On 11/21/13 13:14, Maxime Ripard wrote:
>>> Hi Denis,
>>> 
>>> On Thu, Nov 21, 2013 at 12:41:24PM +0100, Denis CIOCCA wrote:
>>>> only one point: it's possible to use the same names with DT? (using _ instead of -)
>>> 
>>> Yes, it is, but only for i2c as far as I'm aware, and usually the DT compatibles are with - as a separator (I
>>> looked into the ePAPR, but couldn't get any explanations or requirements on this, even though it's used in all
>>> of their examples)
>> 
>> In other discussions, where the defacto i2c device tree bindings have been followed, the conclusion has been that
>> to change to a - from _ would result in userspace ABI changes, so whilst no one wants _ the discussion has
>> concluded we can't really avoid it.
> 
> What kind of userspace ABI changes are we talking about?
IIRC:

i2c has a generic binding that matches to the name bit of the i2c_device_id
array.  That is then exported in sysfs.  There are quite a lot of instances
of underscores out there in these names.  Thus unforutnately they can't
be changed without possibly breaking userspace.  Typically those same names
are also output by IIO though obviously we could keep that the same whilst
changing the dt binding.

Also the i2c binding allows binding after dropping the vendor prefix which
is even more 'interesting'. See of_modialias_node in drivers/of/base.c

I'd therefore argue in favour of just leaving the underscores in existing
drivers as a nasty bit of legacy and doing our best to not introduce any
new ones!

Jonathan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSmdOzAAoJEFSFNJnE9BaIilUP/RPwSswdYi9wWtN0tBEFfZvo
JO0bybjw342LE2xt3DXd7fo04v1+LspWxatw6kht1mJ/aU6O4HwNHQpPO7Md5pDm
4HPoPSREaDbYEOqhVSjXaBUOXIOYSe392KtqKJMRSxRs3XiIeqYPfojqtIE2KF7a
W3EEjud5wrWuOLKtdQWjRt+UpDnewImR+qORtRUoA7NY2YIHvdarOQFlfDqLXSRK
GvE49O8jCtQvcjI1rsybMRXQkUF3GE8hLyATaf/SbvgVeILbHSl6OvaN7O7nNJ+b
DGGrzAzmKwj56G47imQ7z2v/D9ExWNwr1DZ2CMPt+yXQ15OBXDnAmWGXTr45/dUl
G8PjaZA9GKsp0dE713b0RN/eJnsoFsJd8bDCeXh9IpVblmkQzW3HsvI8p2Uj8xga
5d/txeXytLNvHj+3OiiVTaKA3Y9/dFNq9dwI+QAMbLY87T4ft70z533liTZRnMWG
2O8x2oHYnoFRH3qmpg6jy3/qCFe6wTTXy1yMFQ0Ds/bJ93vhrv7SiXXsxX3CNl9X
KI8t74zx51GMxBV5pMixgX9aBH7Wrn+WSXmUKkMkm7JGbeicZEjk259EjAluuohD
HHh0cehjCuVPY6PTUhkXTfCFDfpFtwOkXsZb6fOMS2wDKK4BLwb3SPwyn+ID7XJs
u/RQzwNNjvdsR2hmBQOw
=lpwt
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes
       [not found]           ` <5299D3BA.8080700-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2013-11-30 13:04             ` Jean Delvare
       [not found]               ` <20131130140402.21abae28-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
  2013-11-30 14:13             ` Maxime Ripard
  1 sibling, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2013-11-30 13:04 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Maxime Ripard, Denis CIOCCA, Shawn Guo,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Alexandre Belloni, Brian Lilly, Brent-Crosby, Jim Wall,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Sat, 30 Nov 2013 12:02:02 +0000, Jonathan Cameron wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 11/25/13 09:40, Maxime Ripard wrote:
> > Hi Jonathan,
> > 
> > On Sun, Nov 24, 2013 at 09:00:49PM +0000, Jonathan Cameron wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >> 
> >> On 11/21/13 13:14, Maxime Ripard wrote:
> >>> Hi Denis,
> >>> 
> >>> On Thu, Nov 21, 2013 at 12:41:24PM +0100, Denis CIOCCA wrote:
> >>>> only one point: it's possible to use the same names with DT? (using _ instead of -)
> >>> 
> >>> Yes, it is, but only for i2c as far as I'm aware, and usually the DT compatibles are with - as a separator (I
> >>> looked into the ePAPR, but couldn't get any explanations or requirements on this, even though it's used in all
> >>> of their examples)
> >> 
> >> In other discussions, where the defacto i2c device tree bindings have been followed, the conclusion has been that
> >> to change to a - from _ would result in userspace ABI changes, so whilst no one wants _ the discussion has
> >> concluded we can't really avoid it.
> > 
> > What kind of userspace ABI changes are we talking about?
> IIRC:
> 
> i2c has a generic binding that matches to the name bit of the i2c_device_id
> array.  That is then exported in sysfs.  There are quite a lot of instances
> of underscores out there in these names.  Thus unforutnately they can't
> be changed without possibly breaking userspace.  Typically those same names
> are also output by IIO though obviously we could keep that the same whilst
> changing the dt binding.
> 
> Also the i2c binding allows binding after dropping the vendor prefix which
> is even more 'interesting'. See of_modialias_node in drivers/of/base.c
> 
> I'd therefore argue in favour of just leaving the underscores in existing
> drivers as a nasty bit of legacy and doing our best to not introduce any
> new ones!

I don't know what is the problem with underscores, but please note that
hwmon i2c devices are NOT allowed to have dashes in their name because
that would break libsensors.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes
       [not found]           ` <5299D3BA.8080700-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  2013-11-30 13:04             ` Jean Delvare
@ 2013-11-30 14:13             ` Maxime Ripard
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2013-11-30 14:13 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Denis CIOCCA, Shawn Guo,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Alexandre Belloni, Brian Lilly, Brent-Crosby, Jim Wall,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jean Delvare

[-- Attachment #1: Type: text/plain, Size: 2564 bytes --]

On Sat, Nov 30, 2013 at 12:02:02PM +0000, Jonathan Cameron wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 11/25/13 09:40, Maxime Ripard wrote:
> > Hi Jonathan,
> > 
> > On Sun, Nov 24, 2013 at 09:00:49PM +0000, Jonathan Cameron wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
> >> 
> >> On 11/21/13 13:14, Maxime Ripard wrote:
> >>> Hi Denis,
> >>> 
> >>> On Thu, Nov 21, 2013 at 12:41:24PM +0100, Denis CIOCCA wrote:
> >>>> only one point: it's possible to use the same names with DT? (using _ instead of -)
> >>> 
> >>> Yes, it is, but only for i2c as far as I'm aware, and usually the DT compatibles are with - as a separator (I
> >>> looked into the ePAPR, but couldn't get any explanations or requirements on this, even though it's used in all
> >>> of their examples)
> >> 
> >> In other discussions, where the defacto i2c device tree bindings have been followed, the conclusion has been that
> >> to change to a - from _ would result in userspace ABI changes, so whilst no one wants _ the discussion has
> >> concluded we can't really avoid it.
> > 
> > What kind of userspace ABI changes are we talking about?
> IIRC:
> 
> i2c has a generic binding that matches to the name bit of the i2c_device_id
> array.  That is then exported in sysfs.  There are quite a lot of instances
> of underscores out there in these names.  Thus unforutnately they can't
> be changed without possibly breaking userspace.  Typically those same names
> are also output by IIO though obviously we could keep that the same whilst
> changing the dt binding.
> 
> Also the i2c binding allows binding after dropping the vendor prefix which
> is even more 'interesting'. See of_modialias_node in drivers/of/base.c
> 
> I'd therefore argue in favour of just leaving the underscores in existing
> drivers as a nasty bit of legacy and doing our best to not introduce any
> new ones!

Except I'm not removing anything, just adding new stuff. Therefore,
I'm not breaking anything. The existing users of the underscore stuff
in DT will still work, (if some ever exist, last time I checked, it
wasn't the case) just like they used to.

If we have the occasion of having the thing done like it's done
anywhere else, at no cost, I don't get what the issue is.

Especially since these devices are also usable on other buses than
i2c, which make it quite inconsistent from one bus to another.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes
       [not found]               ` <20131130140402.21abae28-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
@ 2013-12-03 21:29                 ` Maxime Ripard
  2013-12-03 21:39                   ` Jean Delvare
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2013-12-03 21:29 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Jonathan Cameron, Denis CIOCCA, Shawn Guo,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Alexandre Belloni, Brian Lilly, Brent-Crosby, Jim Wall,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

Hi Jean,

On Sat, Nov 30, 2013 at 02:04:02PM +0100, Jean Delvare wrote:
> > i2c has a generic binding that matches to the name bit of the
> > i2c_device_id array.  That is then exported in sysfs.  There are
> > quite a lot of instances of underscores out there in these names.
> > Thus unforutnately they can't be changed without possibly breaking
> > userspace.  Typically those same names are also output by IIO
> > though obviously we could keep that the same whilst changing the
> > dt binding.
> > 
> > Also the i2c binding allows binding after dropping the vendor
> > prefix which is even more 'interesting'. See of_modialias_node in
> > drivers/of/base.c
> > 
> > I'd therefore argue in favour of just leaving the underscores in
> > existing drivers as a nasty bit of legacy and doing our best to
> > not introduce any new ones!
> 
> I don't know what is the problem with underscores, but please note
> that hwmon i2c devices are NOT allowed to have dashes in their name
> because that would break libsensors.

As far as I remember, hwmon doesn't handle the accelerometers or
gyroscopes, does it?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes
  2013-12-03 21:29                 ` Maxime Ripard
@ 2013-12-03 21:39                   ` Jean Delvare
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2013-12-03 21:39 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Jonathan Cameron, Denis CIOCCA, Shawn Guo,
	linux-iio-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Alexandre Belloni, Brian Lilly, Brent-Crosby, Jim Wall,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Tue, 3 Dec 2013 22:29:14 +0100, Maxime Ripard wrote:
> Hi Jean,
> 
> On Sat, Nov 30, 2013 at 02:04:02PM +0100, Jean Delvare wrote:
> > > i2c has a generic binding that matches to the name bit of the
> > > i2c_device_id array.  That is then exported in sysfs.  There are
> > > quite a lot of instances of underscores out there in these names.
> > > Thus unforutnately they can't be changed without possibly breaking
> > > userspace.  Typically those same names are also output by IIO
> > > though obviously we could keep that the same whilst changing the
> > > dt binding.
> > > 
> > > Also the i2c binding allows binding after dropping the vendor
> > > prefix which is even more 'interesting'. See of_modialias_node in
> > > drivers/of/base.c
> > > 
> > > I'd therefore argue in favour of just leaving the underscores in
> > > existing drivers as a nasty bit of legacy and doing our best to
> > > not introduce any new ones!
> > 
> > I don't know what is the problem with underscores, but please note
> > that hwmon i2c devices are NOT allowed to have dashes in their name
> > because that would break libsensors.
> 
> As far as I remember, hwmon doesn't handle the accelerometers or
> gyroscopes, does it?

You remember correctly, it does not and never will.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-03 21:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1384876234-1211-1-git-send-email-maxime.ripard@free-electrons.com>
     [not found] ` <528DF164.8060009@st.com>
     [not found]   ` <20131121131402.GF1029@lukather>
     [not found]     ` <52926901.9080004@kernel.org>
     [not found]       ` <20131125094044.GE3176@lukather>
2013-11-30 12:02         ` [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes Jonathan Cameron
     [not found]           ` <5299D3BA.8080700-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-11-30 13:04             ` Jean Delvare
     [not found]               ` <20131130140402.21abae28-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-12-03 21:29                 ` Maxime Ripard
2013-12-03 21:39                   ` Jean Delvare
2013-11-30 14:13             ` Maxime Ripard

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).