This driver supports the
This is a Linux industrial I/O (IIO) subsystem driver, targeting multi-channel serial interface DACs. The industrial I/O subsystem provides a unified framework for drivers for many different types of converters and sensors using a number of different physical interfaces (i2c, spi, etc). See IIO for more information.
Function | File |
---|---|
driver | drivers/iio/dac/ad5758.c |
Required properties for the AD5758:
Optional properties:
#address-cells = <1>; #size-cells = <0>; status = "okay"; ad5758@0 { compatible = "adi,ad5758"; reg = <0>; spi-max-frequency = <1000000>; spi-cpha; reset-gpios = <&gpio 22 0>; /* optional */ adi,dc-dc-mode = <2>; adi,dc-dc-ilim = <200>; adi,slew = <1 200000 12>; adi,range = <1>;
This specifies any shell prompt running on the target
root:/> cd /sys/bus/iio/devices/ root:/sys/bus/iio/devices> ls iio:device0 root:/sys/bus/iio/devices> cd iio\:device0 root:/sys/bus/iio/devices/iio:device0> ls -l -r--r--r-- 1 root root 4096 May 23 09:14 dev -rw-r--r-- 1 root root 4096 May 23 09:14 out_voltage0_powerdown -rw-r--r-- 1 root root 4096 May 23 09:14 out_voltage0_raw -rw-r--r-- 1 root root 4096 May 23 09:14 out_voltage_scale -r--r--r-- 1 root root 4096 May 23 09:14 name drwxr-xr-x 2 root root 0 May 23 09:14 power lrwxrwxrwx 1 root root 0 May 23 09:14 subsystem -> ../../../../../../../../bus/iio -rw-r--r-- 1 root root 4096 May 23 09:14 uevent
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> cat name ad5758
Description:
scale to be applied to in_voltage0_raw in order to obtain the measured voltage in millivolts.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> cat out_voltage_scale 0.152587890
Description:
/sys/bus/iio/devices/deviceX/out_voltage0_raw
Raw (unscaled, no bias etc.) output voltage for channel 0.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> echo 32767 > out_voltage0_raw
U = out_voltage0_raw * out_voltage_scale = 32767 * 0.152587890 = 4999.84 mV
/sys/bus/iio/devices/deviceX/out_voltage0_powerdown
Description:
Writing 1 causes output 0 to enter the power down mode. Clearing returns to
normal operation.
This specifies any shell prompt running on the target
root:/sys/bus/iio/devices/iio:device0> echo 1 > out_voltage0_powerdown root:/sys/bus/iio/devices/iio:device0> cat out_voltage0_powerdown 1 root:/sys/bus/iio/devices/iio:device0> echo 0 > out_voltage0_powerdown root:/sys/bus/iio/devices/iio:device0> cat out_voltage0_powerdown 0