* Looking for information on modern(ish) use of spidev
@ 2016-04-20 19:55 Patrick Doyle
2016-04-20 20:20 ` Baruch Siach
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Doyle @ 2016-04-20 19:55 UTC (permalink / raw)
To: linux-arm-kernel
Can anybody point me at a relatively recent tutorial/explanation of
the current usage of spidev?
What should I put in my device tree? Should I modprobe spidev?
I have 2 devices hanging off a SPI bus and I would like to verify that
they work. All I need to be able to do is to transfer some data to
and from the devices and see that it looks reasonable. I'll figure
out the correct device driver later, but I just want to see some
transactions on the bus today.
What's the simplest way to do that? If spidev isn't the right tree to
climb, where should I look instead?
--wpd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Looking for information on modern(ish) use of spidev
2016-04-20 19:55 Looking for information on modern(ish) use of spidev Patrick Doyle
@ 2016-04-20 20:20 ` Baruch Siach
2016-04-20 20:29 ` Patrick Doyle
0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2016-04-20 20:20 UTC (permalink / raw)
To: linux-arm-kernel
Hi Patrick,
On Wed, Apr 20, 2016 at 03:55:42PM -0400, Patrick Doyle wrote:
> Can anybody point me at a relatively recent tutorial/explanation of
> the current usage of spidev?
There is a dedicated list to the SPI subsystem (linux-spi at vger.kernel.org).
See MAINTAINERS.
> What should I put in my device tree? Should I modprobe spidev?
The spidev binding is not documented, but you can find a few examples under
arch/arm/boot/dts/.
> I have 2 devices hanging off a SPI bus and I would like to verify that
> they work. All I need to be able to do is to transfer some data to
> and from the devices and see that it looks reasonable. I'll figure
> out the correct device driver later, but I just want to see some
> transactions on the bus today.
>
> What's the simplest way to do that? If spidev isn't the right tree to
> climb, where should I look instead?
For half duplex transfers just read/write the spidev device node. For
something more complex see the examples under tools/spi/.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread* Looking for information on modern(ish) use of spidev
2016-04-20 20:20 ` Baruch Siach
@ 2016-04-20 20:29 ` Patrick Doyle
2016-04-20 20:32 ` Baruch Siach
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Doyle @ 2016-04-20 20:29 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Apr 20, 2016 at 4:20 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> On Wed, Apr 20, 2016 at 03:55:42PM -0400, Patrick Doyle wrote:
>> Can anybody point me at a relatively recent tutorial/explanation of
>> the current usage of spidev?
> For half duplex transfers just read/write the spidev device node. For
> something more complex see the examples under tools/spi/.
>
Hi Baruch,
Thank you for your quick reply. I have added spidev entries to my
device tree following the models I found in arch/arm/boot/dts, but no
entries show up in /dev, upon which my devtmpfs is mounted. Do I need
to do anything special to make the entries show up, such as running a
udev or mdev daemon (which I am not currently running)?
--wpd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Looking for information on modern(ish) use of spidev
2016-04-20 20:29 ` Patrick Doyle
@ 2016-04-20 20:32 ` Baruch Siach
2016-04-20 20:35 ` Patrick Doyle
0 siblings, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2016-04-20 20:32 UTC (permalink / raw)
To: linux-arm-kernel
Hi Patrick,
On Wed, Apr 20, 2016 at 04:29:01PM -0400, Patrick Doyle wrote:
> Thank you for your quick reply. I have added spidev entries to my
> device tree following the models I found in arch/arm/boot/dts, but no
> entries show up in /dev, upon which my devtmpfs is mounted. Do I need
> to do anything special to make the entries show up, such as running a
> udev or mdev daemon (which I am not currently running)?
devtmpfs should be enough.
Are you sure you enabled CONFIG_SPI_SPIDEV in your kernel? Does your SPI
master driver probe successfully?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 6+ messages in thread* Looking for information on modern(ish) use of spidev
2016-04-20 20:32 ` Baruch Siach
@ 2016-04-20 20:35 ` Patrick Doyle
2016-04-20 20:44 ` Andy Gross
0 siblings, 1 reply; 6+ messages in thread
From: Patrick Doyle @ 2016-04-20 20:35 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Apr 20, 2016 at 4:32 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Patrick,
> Are you sure you enabled CONFIG_SPI_SPIDEV in your kernel? Does your SPI
> master driver probe successfully?
It is configured as a module (and complains wildly when I modprobe it
with entries in my device tree).
The master driver probes and shows in in /sys/class/spi_master.
--wpd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Looking for information on modern(ish) use of spidev
2016-04-20 20:35 ` Patrick Doyle
@ 2016-04-20 20:44 ` Andy Gross
0 siblings, 0 replies; 6+ messages in thread
From: Andy Gross @ 2016-04-20 20:44 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Apr 20, 2016 at 04:35:13PM -0400, Patrick Doyle wrote:
> On Wed, Apr 20, 2016 at 4:32 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> > Hi Patrick,
> > Are you sure you enabled CONFIG_SPI_SPIDEV in your kernel? Does your SPI
> > master driver probe successfully?
> It is configured as a module (and complains wildly when I modprobe it
> with entries in my device tree).
>
> The master driver probes and shows in in /sys/class/spi_master.
>
> --wpd
Depending on how your devices are enumerated, you might need to rescan to see
the spidev show up. "mdev -s" if you are using mdev.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-20 20:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 19:55 Looking for information on modern(ish) use of spidev Patrick Doyle
2016-04-20 20:20 ` Baruch Siach
2016-04-20 20:29 ` Patrick Doyle
2016-04-20 20:32 ` Baruch Siach
2016-04-20 20:35 ` Patrick Doyle
2016-04-20 20:44 ` Andy Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox