[beagleboard] Reading MADC registers from TPS65950

Hi,
I am trying to use I2C-tools to read MADC registers from TPS65950, but always encounter the
"Device or resource busy"error. Can someone help ?
Or should there be another way to read the MADC registers instead of using I2C-tools ?

root@overo:~# i2cdetect -y -a -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- – -- – --
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- UU UU UU UU – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – -- – -- – -- – -- – --
root@overo:~# i2cget -y 1 0x4a 0x00
Error: Could not set address to 0x4a: Device or resource busy
root@overo:~# i2cget -y 1 0x4a 0x01
Error: Could not set address to 0x4a: Device or resource busy
root@overo:~# i2cget -y 1 0x4a 0x02
Error: Could not set address to 0x4a: Device or resource busy
root@overo:~# i2cget -y 1 0x4a 0x03
Error: Could not set address to 0x4a: Device or resource busy

  • Thomas

I type

i2cget -f 1 0x4a 0xee

for reading the LED pwm controller state and it returns 0x33
same for

i2cset -f 1 0x4a 0xee 0x00 to turn it off

i2cdump -f 1 0x4a dumps all the registers at this address.

Fabio

Thomas Ng ha scritto:

Thanks Fabio for your reply. The -f seems to play the trick.

The purpose of me doing this is to read the ADC channel from TPS65950.
But now I realize a better way is to make use of twl4030-madc driver. I’ll try to see if it works. Thanks!

  • Thomas