From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: 최광호 <cgh9046@gmail.com>
Cc: linux-iio@vger.kernel.org,
Michael Hennerich <michael.hennerich@analog.com>
Subject: Re: Declaring a SPI slave device
Date: Sat, 13 Oct 2018 14:15:42 +0100 [thread overview]
Message-ID: <20181013141542.1b0831b3@archlinux> (raw)
In-Reply-To: <CABqjdMW+PNniq1PxZ+qW8YJDeVK43BnNcC2gCuU1s=Df1Xuzfg@mail.gmail.com>
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
prev parent reply other threads:[~2018-10-13 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-10 9:55 Declaring a SPI slave device 최광호
2018-10-13 13:15 ` Jonathan Cameron [this message]
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=20181013141542.1b0831b3@archlinux \
--to=jic23@jic23.retrosnub.co.uk \
--cc=cgh9046@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=michael.hennerich@analog.com \
/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).