[PATCH 1/2] spi: spidev: Add device tree bindings

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Oct 29 12:10:24 EDT 2012


On Mon, Oct 29, 2012 at 04:26:11PM +0100, Maxime Ripard wrote:

> Ok, so I guess that leaves us with 2 choices here:

>   * Declare the device in the dt as you would have with any other
>     driver, with its own compatible string, and we add this compatible
>     string to the spidev dt ids array. It allows to use the existing
>     code and thus doesn't require any effort at all, but it will
>     generate a lot of noise for the spidev driver, since all of us will
>     need to add its compatible string to spidev.

>   * Rework the spidev code so that it behaves mostly like i2c-dev, that
>     is you have an instance of it for every device enumerated in the dt,
>     regardless of wether it has a driver loaded or not. If the
>     userspace opens the device file corresponding to a device already
>     attached to a driver, you return EBUSY, and that's it. I guess it
>     would be the cleaner solution, since you only select spidev in
>     configuration, but it definitely requires way more development than
>     the first one.

> What's your views on this?
> Did you have in mind another solution?

I think either solution is good, obviously Grant's more the expert here.
Adding the IDs is obviously simpler and doesn't preclude later doing the
i2c-dev style thing so short term I'd probably add the IDs to get things
going and punt on the difficult stuff for the time being but YMMV.
-------------- 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/20121029/d95241f4/attachment.sig>


More information about the linux-arm-kernel mailing list