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.