Re: [PATCH] spi: Add a sysfs interface to instantiate devices

From: Mark Brown
Date: Fri Dec 22 2017 - 10:56:16 EST


On Thu, Dec 21, 2017 at 09:05:43PM +0000, Trent Piepho wrote:
> On Thu, 2017-12-21 at 14:03 -0600, Kyle Roeschley wrote:
> > Add a sysfs interface to instantiate and delete SPI devices using the
> > spidev driver. This can be used when developing a driver on a
> > self-soldered board which doesn't yet have proper SPI device declaration
> > at the platform level, and presumably for various debugging situations.

> > Inspired by 99cd8e25875a ("i2c: Add a sysfs interface to instantiate
> > devices").

> The i2c interface allows one to specify the type of device to create.
> Why must this interface be linked to spidev and only capable of
> creating spidev devices?

Right, that doesn't seem good. I also can't see anything in the actual
code which suggests that this is tied to spidev except the log messages.

> > + dev);
> > + struct spi_device *spi, *next;
> > + int ret = -ENXIO;
> > + u16 cs;

Please delete unneeded context from mails when replying. Doing this
makes it much easier to find your reply in the message, helping ensure
it won't be missed by people scrolling through the irrelevant quoted
material.

Attachment: signature.asc
Description: PGP signature