Skip to content

RFC DT support for ST micro accelerometers and gyroscopes

Maxime Ripard linux-arm-kernel linux-devicetree linux-iio 1 version New

Get series with b4
b4 am 20131130141315.GC3002@lukather

Versions newest first

  1. v1 RFC Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] DT support for ST micro accelerometers and gyroscopes
Quoted 33 lines · Jonathan Cameron

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

Quoted 15 lines · Maxime Ripard

Hi Jonathan,

Quoted 12 lines · Jonathan Cameron

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

Quoted 8 lines · Maxime Ripard

Hi Denis,

Quoted 1 line · Denis CIOCCA

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)

Quoted 5 lines
Quoted 3 lines

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.

Quoted 6 lines

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

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131130/6c6f0e85/attachment.sig>