From: Kyle Roeschley <kyle.roeschley-acOepvfBmUk@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Trent Piepho <tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>,
"linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org"
<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Subject: Re: [PATCH] spi: Add a sysfs interface to instantiate devices
Date: Fri, 22 Dec 2017 11:11:08 -0600 [thread overview]
Message-ID: <20171222171108.GA31574@senary> (raw)
In-Reply-To: <20171222155603.GM1827@finisterre>
On Fri, Dec 22, 2017 at 03:56:03PM +0000, Mark Brown wrote:
> 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.
>
Quoting Geert's email [1] on the subject:
> To me, the above sounds a bit contradictive: either you have
> 1. a simple (trivial) description, which can be handled by spidev and
> userspace, and thus by just writing "<unit-addr> spidev" to a new_device
> sysfs node, or
> 2. a complex description, for which you need a specialized in-kernel driver,
> so you're gonna need a real DT node (and overlays?) to describe it.
>
> I don't think writing a complex description to a new_device sysfs node makes
> sense.
And regarding not being linked to spidev, see modalias in new_device_store:
> > > + struct spi_board_info bi = {
> > > + .modalias = "spidev",
> > > + .max_speed_hz = ctlr->max_speed_hz,
> > > + };
[1] https://marc.info/?l=linux-spi&m=151199390921251&w=2
Happy holidays,
--
Kyle Roeschley
Software Engineer
National Instruments
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-12-22 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-21 20:03 [PATCH] spi: Add a sysfs interface to instantiate devices Kyle Roeschley
[not found] ` <20171221200309.17967-1-kyle.roeschley-acOepvfBmUk@public.gmane.org>
2017-12-21 20:11 ` Randy Dunlap
2017-12-21 21:05 ` Trent Piepho
[not found] ` <1513890342.26695.4.camel-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org>
2017-12-22 15:56 ` Mark Brown
2017-12-22 17:11 ` Kyle Roeschley [this message]
2017-12-23 8:58 ` Geert Uytterhoeven
2017-12-27 10:31 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171222171108.GA31574@senary \
--to=kyle.roeschley-acoepvfbmuk@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tpiepho-cgc2CodaaHDQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).