Re: [PATCH v3 1/3] spi: spidev: create spidev device for all spi slaves.

From: Mark Brown
Date: Wed Jul 27 2016 - 14:27:45 EST


On Tue, Jul 19, 2016 at 08:33:12PM +0200, Michal Suchanek wrote:
> On 19 July 2016 at 19:19, Mark Brown <broonie@xxxxxxxxxx> wrote:

> > It's a string that's exposed to userspace (via /proc/devices if nothing
> > else).

> Yes, the change can be detected from userspace. The question is
> more like 'Is there any sane reason anyone would rely on seeing
> that exact string for something?'

People using it to create device files at runtime or detect board
variants would be the main ones.

> BTW the classes are also exported through /sys so the spidev devices
> would look differently there also.

Yup.

> That does not make device-specific hacks go away. Initially the user
> will do only as much as it takes to get the device working right now
> and that does not include writing devicetree description of the device
> when it is used with userspace driver.

Depends, especially if you see some long term use for your code it's
common to start with the enumeration part. It's not there currently so
people can't do that but part of getting the good practice out there is
to make it the path of least resistance.

Attachment: signature.asc
Description: PGP signature