All of lore.kernel.org
 help / color / mirror / Atom feed
* Declaring a SPI slave device
@ 2018-10-10  9:55 최광호
  2018-10-13 13:15 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: 최광호 @ 2018-10-10  9:55 UTC (permalink / raw)
  To: linux-iio

Hi I am Gwangho Choi,

I am trying to connect my EVAL-AD5791 board with a raspberry pi 3 b+
using iio. I enabled SPI from raspi-config. And I made an ad5791
module from a kernel and loaded. Now, I can see ad5791 and industialio
module running from "lsmod" command. And I can also see the
/sys/bus/iio/ directory.So, I connected my board with my raspberry pi,
but in the /sys/bus/iio/devices there is nothing. I suspect that I did
not declare a slave device, but I do not know how I can do it. I do
not know where I should put the spi_board_info code. I cannot find
arch/.../mach-*/board-*.c files.

Thanks

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

* Re: Declaring a SPI slave device
  2018-10-10  9:55 Declaring a SPI slave device 최광호
@ 2018-10-13 13:15 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2018-10-13 13:15 UTC (permalink / raw)
  To: 최광호; +Cc: linux-iio, Michael Hennerich

On Wed, 10 Oct 2018 02:55:05 -0700
최광호 <cgh9046@gmail.com> wrote:

> Hi I am Gwangho Choi,
> 
> I am trying to connect my EVAL-AD5791 board with a raspberry pi 3 b+
> using iio. I enabled SPI from raspi-config. And I made an ad5791
> module from a kernel and loaded. Now, I can see ad5791 and industialio
> module running from "lsmod" command. And I can also see the
> /sys/bus/iio/ directory.So, I connected my board with my raspberry pi,
> but in the /sys/bus/iio/devices there is nothing. I suspect that I did
> not declare a slave device, but I do not know how I can do it. I do
> not know where I should put the spi_board_info code. I cannot find
> arch/.../mach-*/board-*.c files.
> 
> Thanks

Hi Gwangho and welcome to the IIO list.

So, this particular driver supports several ways of being probed.
The platform data option you have been looking at is very much the
old way and is unlikely to be supported on a modern board like the
raspberry pi.  This board will be devicetree based.

This particular DAC doesn't have documented devicetree bindings but
it is using standard interfaces so should still work with that approach.

Taking a similar simple dac device:
Documentation/devicetree/bindings/iio/ad7303.txt

In this device there are two regulators that need specifying if you want
all the scaling to be correct, vdd and vss.  Do those via fixed regulators.
Documentation/devicetree/bindings/iio/ad5592r.txt has a good example
of regulators, but is a much more complex device.

Michael, I don't suppose you have a specific example DT blob for this
device you could share (or want to add devicetree docs?)

Thanks,

Jonathan

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

end of thread, other threads:[~2018-10-13 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10  9:55 Declaring a SPI slave device 최광호
2018-10-13 13:15 ` Jonathan Cameron

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.