Re: Declaring a SPI slave device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 10 Oct 2018 02:55:05 -0700
최광호 <cgh9046@xxxxxxxxx> 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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux