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

iio:ABI docs: Fix issue around repeated definition of out_currentY_raw

This one is challenging as both the places this appears in specific drivers
are making 'unusual' uses of what looks like a simple output current
channel.
As a side note, this was particular bit of ABI occurs in other drivers
where the use is much more straight forward e.g. dac/ad5421

This patch attempts to make a best effort of adding it to the main docs but
retaining enough information. Both of these drivers probably need
specific documents being written to describe their unusual interfaces, but
those should be in the main documentation, not under Documentation/ABI.
That is a non trivial job so left for another time.

Fixes
$ scripts/get_abi.pl validate
Warning: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-light-lm3533-als:43 ./Documentation/ABI/testing/sysfs-bus-iio-health-afe440x:38

Reported-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20210117153816.696693-5-jic23@kernel.org

+16 -16
+11
Documentation/ABI/testing/sysfs-bus-iio
··· 676 676 specified and unique if the output corresponds to a single 677 677 channel. 678 678 679 + What: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw 680 + Date: May 2012 681 + KernelVersion: 3.5 682 + Contact: Johan Hovold <jhovold@gmail.com> 683 + Description: 684 + Set/get output current for channel Y. Units after application 685 + of scale and offset are milliamps. 686 + For some devices current channels are used to specify 687 + current supplied to elements used in taking a measurement 688 + of a different type. E.g. LED currents. 689 + 679 690 What: /sys/bus/iio/devices/iio:deviceX/events 680 691 KernelVersion: 2.6.35 681 692 Contact: linux-iio@vger.kernel.org
+2 -8
Documentation/ABI/testing/sysfs-bus-iio-health-afe440x
··· 18 18 respectively which simply helper channels containing the 19 19 calculated difference in the value of stage 1 - 2 and 3 - 4. 20 20 The values are expressed in 24-bit twos complement. 21 + The LED current for the stage is controlled via 22 + out_currentY_raw. 21 23 22 24 What: /sys/bus/iio/devices/iio:deviceX/in_intensityY_offset 23 25 Date: May 2016 ··· 37 35 Description: 38 36 Get and set the resistance and the capacitance settings for the 39 37 Transimpedance Amplifier during the associated stage. 40 - 41 - What: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw 42 - Date: May 2016 43 - KernelVersion: 44 - Contact: Andrew F. Davis <afd@ti.com> 45 - Description: 46 - Get and set the LED current for the specified LED active during 47 - this stage. Y is the specific stage number.
+3 -8
Documentation/ABI/testing/sysfs-bus-iio-light-lm3533-als
··· 41 41 Get the current light zone (0..4) as defined by the 42 42 in_illuminance0_threshY_{falling,rising} thresholds. 43 43 44 - What: /sys/bus/iio/devices/iio:deviceX/out_currentY_raw 45 - Date: May 2012 46 - KernelVersion: 3.5 47 - Contact: Johan Hovold <jhovold@gmail.com> 48 - Description: 49 - Get output current for channel Y (0..255), that is, 50 - out_currentY_currentZ_raw, where Z is the current zone. 51 - 52 44 What: /sys/bus/iio/devices/iio:deviceX/out_currentY_currentZ_raw 53 45 Date: May 2012 54 46 KernelVersion: 3.5 ··· 51 59 52 60 These values correspond to the ALS-mapper target registers for 53 61 ALS-mapper Y + 1. 62 + 63 + Note that out_currentY_raw provides the current for the 64 + current zone.