AnsweredAssumed Answered

LTC2631

Question asked by mirianas on Oct 31, 2017
Latest reply on Nov 9, 2017 by mirianas
Hi,
we are trying to use the ad5064 driver with latest patch for LTC2631 (one
channel DAC). 
When we try to output some voltage we get: "-sh: echo: write error: No such device or address"
One possibility is that the driver does not seem to read the I2C address from the device tree. I have inserted a few printk statements into "ad5064_i2c_write" function to print out the return value and address value: 
This is the full output: 
root@qcom:/sys/bus/iio/devices/iio:device1# cat uevent
MAJOR=247
MINOR=1
DEVNAME=iio:device1
DEVTYPE=iio_device
OF_NAME=ltc2631-l10
OF_FULLNAME=/soc/i2c@78b8000/ltc2631-l10@20
OF_COMPATIBLE_0=adi,ltc2631-l10
OF_COMPATIBLE_N=1
root@qcom:/sys/bus/iio/devices/iio:device1# echo 200 > out_voltage0_raw
[ 4004.255429]
[ 4004.255429] Attempting to write to LTC2631
[ 4004.255711]
[ 4004.255711] Number of bytes sent over I2C: -6 to I2C address: 0
-sh: echo: write error: No such device or address
are the required device tree entries  for ad5064 driver (for the case of I2C interace) documented somewhere?
This is our device tree entry:
&blsp_i2c4 {
status = "okay";
   ltc2631-l10@20 {
   compatible = "adi,ltc2631-l10";
   eg = <0x20>;
   };
};
Printing diagnostic information from ad5064_i2c_write function indicates
that adrr value is zero while I assume it should be 0x20. Any advice? I tried to force it to be 0x20 in the driver but that did not make any difference, it still reports "write error: No such device or address"
Thank you.
Mirianas

Outcomes