All of lore.kernel.org
 help / color / mirror / Atom feed
* spidev question
@ 2008-03-10 19:46 Joakim Tjernlund
       [not found] ` <1205178415.29669.119.camel-/EMGr9iCeazgSi9v3i4K4Pmbkio/vSLMs0AfqQuZ5sE@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2008-03-10 19:46 UTC (permalink / raw)
  To: spi-devel-general

Trying to make sense of spidev. We have 5 spi devices on the
same spi bus and I am trying to use different word sizes for some of the
devices.

I open 5 diffrent /dev/spidev0.x where x=0..4 and for
each fd returned I do:
 ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits);
bits is either 8 or 16.
However, it seems that the last ioctl "wins", all spi transactions
appears to used the last setting, thats is, the ioctl appears to be
for the controller, not the spi slave I am talking to.

This does not make sense to me, I figured I could set bits_per_word(and
max speed too) for each slave. Can anyone tell me how spidev is supposed
to work? It is quite possible that I got a problem in spi HW driver that
fools me somehow.

 Jocke

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-10 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-10 19:46 spidev question Joakim Tjernlund
     [not found] ` <1205178415.29669.119.camel-/EMGr9iCeazgSi9v3i4K4Pmbkio/vSLMs0AfqQuZ5sE@public.gmane.org>
2008-03-10 20:00   ` David Brownell
     [not found]     ` <200803101300.44267.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-03-10 20:05       ` Joakim Tjernlund

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.