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

Documentation: iio: ad4000: Add IIO Device characteristics section

Complement ad4000 IIO driver documentation with considerations about
``_scale_available`` attribute and table of typical channel attributes.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://patch.msgid.link/6c8fe68d7d413ffdd33b154ba45600c7ce7013da.1743110188.git.marcelo.schmitt@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Marcelo Schmitt and committed by
Jonathan Cameron
d66b2c84 66ac2315

+47
+47
Documentation/iio/ad4000.rst
··· 144 144 ^ | | 145 145 +--------------------| SCLK | 146 146 +-------------+ 147 + 148 + IIO Device characteristics 149 + ========================== 150 + 151 + The AD4000 series driver supports differential and pseudo-differential ADCs. 152 + 153 + The span compression feature available in AD4000 series devices can be 154 + enabled/disabled by changing the ``_scale_available`` attribute of the voltage 155 + channel. Note that span compression configuration requires writing to AD4000 156 + configuration register, which is only possible when the ADC is wired in 3-wire 157 + turbo mode, and the SPI controller is ``SPI_MOSI_IDLE_HIGH`` capable. If those 158 + conditions are not met, no ``_scale_available`` attribute is provided. 159 + 160 + Besides that, differential and pseudo-differential voltage channels present 161 + slightly different sysfs interfaces. 162 + 163 + Pseudo-differential ADCs 164 + ------------------------ 165 + 166 + Typical voltage channel attributes of a pseudo-differential AD4000 series device: 167 + 168 + +-------------------------------------------+------------------------------------------+ 169 + | Voltage Channel Attributes | Description | 170 + +===========================================+==========================================+ 171 + | ``in_voltage0_raw`` | Raw ADC output code. | 172 + +-------------------------------------------+------------------------------------------+ 173 + | ``in_voltage0_offset`` | Offset to convert raw value to mV. | 174 + +-------------------------------------------+------------------------------------------+ 175 + | ``in_voltage0_scale`` | Scale factor to convert raw value to mV. | 176 + +-------------------------------------------+------------------------------------------+ 177 + | ``in_voltage0_scale_available`` | Toggles input span compression | 178 + +-------------------------------------------+------------------------------------------+ 179 + 180 + Differential ADCs 181 + ----------------- 182 + 183 + Typical voltage channel attributes of a differential AD4000 series device: 184 + 185 + +-------------------------------------------+------------------------------------------+ 186 + | Voltage Channel Attributes | Description | 187 + +===========================================+==========================================+ 188 + | ``in_voltage0-voltage1_raw`` | Raw ADC output code. | 189 + +-------------------------------------------+------------------------------------------+ 190 + | ``in_voltage0-voltage1_scale`` | Scale factor to convert raw value to mV. | 191 + +-------------------------------------------+------------------------------------------+ 192 + | ``in_voltage0-voltage1_scale_available`` | Toggles input span compression | 193 + +-------------------------------------------+------------------------------------------+