1- ---------------------------------
2- AD525x Digital Potentiometers
3- ---------------------------------
1+ .. SPDX-License-Identifier: GPL-2.0
2+
3+ =============================
4+ AD525x Digital Potentiometers
5+ =============================
46
57The ad525x_dpot driver exports a simple sysfs interface. This allows you to
68work with the immediate resistance settings as well as update the saved startup
79settings. Access to the factory programmed tolerance is also provided, but
810interpretation of this settings is required by the end application according to
911the specific part in use.
1012
11- ---------
12- Files
13- ---------
13+ Files
14+ =====
1415
1516Each dpot device will have a set of eeprom, rdac, and tolerance files. How
1617many depends on the actual part you have, as will the range of allowed values.
@@ -24,23 +25,22 @@ and may vary greatly on a part-by-part basis. For exact interpretation of
2425this field, please consult the datasheet for your part. This is presented
2526as a hex file for easier parsing.
2627
27- -----------
28- Example
29- -----------
28+ Example
29+ =======
3030
3131Locate the device in your sysfs tree. This is probably easiest by going into
32- the common i2c directory and locating the device by the i2c slave address.
32+ the common i2c directory and locating the device by the i2c slave address::
3333
3434 # ls /sys/bus/i2c/devices/
3535 0-0022 0-0027 0-002f
3636
3737So assuming the device in question is on the first i2c bus and has the slave
38- address of 0x2f, we descend (unrelated sysfs entries have been trimmed).
38+ address of 0x2f, we descend (unrelated sysfs entries have been trimmed)::
3939
4040 # ls /sys/bus/i2c/devices/0-002f/
4141 eeprom0 rdac0 tolerance0
4242
43- You can use simple reads/writes to access these files:
43+ You can use simple reads/writes to access these files::
4444
4545 # cd /sys/bus/i2c/devices/0-002f/
4646
0 commit comments