Re: ADS1256 SPI driver for Raspberry Pi

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

 



> On 28.05.2015, at 13:59, Vladimir Toutain <vladimir.toutain@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>    I found this driver https://github.com/raspberrypi/linux/blob/rpi-3.18.y/drivers/iio/adc/ti-adc128s052.c and then tried to find the corresponding DT overlay without success.
The foundation has NOT created an overlay for avery possible device - if you need
a overlay for a specific device you need to create it yourself and (optionally)
ask the foundation to merge it (but they will only do that when the driver of
yours is merged).

>    . Is it then loaded just like a module? How does the subsystem know which GPIO pins are used by this driver?
These would be configured inside the device tree - please read a bit 
about device-trees for that, but there are some standards
for interrupts and gpios.

>    . Is it correct to use
>           line 37     "ret = spi_write(adc->spi, &adc->buffer, 2);"
>      to send commands to the ADC by filling adc->buffer with these commands?
yes - more info can be found at: Documentation/spi/spi-summary 
Most it is related to master, but there is a tiny section talking about
spi_async, spi_sync, spi_read, spi_write and spi_write_then_read.

Also look at include/linux/spi/spi.h for a bit more documentation
on what each of those functions does.


--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux