Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: iio: new docs for ad7944 driver

This adds a new page to document how to use the ad7944 ADC driver.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240322-mainline-ad7944-doc-v2-2-0923d35d5596@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
18b51455 74f7ffd6

+132
+130
Documentation/iio/ad7944.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0-only 2 + 3 + ============= 4 + AD7944 driver 5 + ============= 6 + 7 + ADC driver for Analog Devices Inc. AD7944 and similar devices. The module name 8 + is ``ad7944``. 9 + 10 + 11 + Supported devices 12 + ================= 13 + 14 + The following chips are supported by this driver: 15 + 16 + * `AD7944 <https://www.analog.com/AD7944>`_ 17 + * `AD7985 <https://www.analog.com/AD7985>`_ 18 + * `AD7986 <https://www.analog.com/AD7986>`_ 19 + 20 + 21 + Supported features 22 + ================== 23 + 24 + SPI wiring modes 25 + ---------------- 26 + 27 + The driver currently supports two of the many possible SPI wiring configurations. 28 + 29 + CS mode, 3-wire, without busy indicator 30 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 31 + 32 + .. code-block:: 33 + 34 + +-------------+ 35 + +--------------------| CS | 36 + v | | 37 + VIO +--------------------+ | HOST | 38 + | | CNV | | | 39 + +--->| SDI AD7944 SDO |-------->| SDI | 40 + | SCK | | | 41 + +--------------------+ | | 42 + ^ | | 43 + +--------------------| SCLK | 44 + +-------------+ 45 + 46 + To select this mode in the device tree, set the ``adi,spi-mode`` property to 47 + ``"single"`` and omit the ``cnv-gpios`` property. 48 + 49 + CS mode, 4-wire, without busy indicator 50 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 51 + 52 + .. code-block:: 53 + 54 + +-------------+ 55 + +-----------------------------------| CS | 56 + | | | 57 + | +--------------------| GPIO | 58 + | v | | 59 + | +--------------------+ | HOST | 60 + | | CNV | | | 61 + +--->| SDI AD7944 SDO |-------->| SDI | 62 + | SCK | | | 63 + +--------------------+ | | 64 + ^ | | 65 + +--------------------| SCLK | 66 + +-------------+ 67 + 68 + To select this mode in the device tree, omit the ``adi,spi-mode`` property and 69 + provide the ``cnv-gpios`` property. 70 + 71 + Reference voltage 72 + ----------------- 73 + 74 + All 3 possible reference voltage sources are supported: 75 + 76 + - Internal reference 77 + - External 1.2V reference and internal buffer 78 + - External reference 79 + 80 + The source is determined by the device tree. If ``ref-supply`` is present, then 81 + the external reference is used. If ``refin-supply`` is present, then the internal 82 + buffer is used. If neither is present, then the internal reference is used. 83 + 84 + Unimplemented features 85 + ---------------------- 86 + 87 + - ``BUSY`` indication 88 + - ``TURBO`` mode 89 + - Daisy chain mode 90 + 91 + 92 + Device attributes 93 + ================= 94 + 95 + There are two types of ADCs in this family, pseudo-differential and fully 96 + differential. The channel name is different depending on the type of ADC. 97 + 98 + Pseudo-differential ADCs 99 + ------------------------ 100 + 101 + AD7944 and AD7985 are pseudo-differential ADCs and have the following attributes: 102 + 103 + +---------------------------------------+--------------------------------------------------------------+ 104 + | Attribute | Description | 105 + +=======================================+==============================================================+ 106 + | ``in_voltage0_raw`` | Raw ADC voltage value (*IN+* referenced to ground sense). | 107 + +---------------------------------------+--------------------------------------------------------------+ 108 + | ``in_voltage0_scale`` | Scale factor to convert raw value to mV. | 109 + +---------------------------------------+--------------------------------------------------------------+ 110 + 111 + Fully-differential ADCs 112 + ----------------------- 113 + 114 + AD7986 is a fully-differential ADC and has the following attributes: 115 + 116 + +---------------------------------------+--------------------------------------------------------------+ 117 + | Attribute | Description | 118 + +=======================================+==============================================================+ 119 + | ``in_voltage0-voltage1_raw`` | Raw ADC voltage value (*IN+* - *IN-*). | 120 + +---------------------------------------+--------------------------------------------------------------+ 121 + | ``in_voltage0-voltage1_scale`` | Scale factor to convert raw value to mV. | 122 + +---------------------------------------+--------------------------------------------------------------+ 123 + 124 + 125 + Device buffers 126 + ============== 127 + 128 + This driver supports IIO triggered buffers. 129 + 130 + See :doc:`iio_devbuf` for more information.
+1
Documentation/iio/index.rst
··· 16 16 .. toctree:: 17 17 :maxdepth: 1 18 18 19 + ad7944 19 20 adis16475 20 21 bno055 21 22 ep93xx_adc
+1
MAINTAINERS
··· 448 448 S: Supported 449 449 W: https://ez.analog.com/linux-software-drivers 450 450 F: Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml 451 + F: Documentation/iio/ad7944.rst 451 452 F: drivers/iio/adc/ad7944.c 452 453 453 454 ADAFRUIT MINI I2C GAMEPAD