This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i2c user level test

Hi,

I want to read the data from tps6507x using i2c bus. how to read the register value of tps650xx and how to write in to the registers using user application(console) .

While i executed the below command gives an error:

root@am180x-evm:/dev# cat i2c-1 
cat: read error: No such device or address

fd = open( "/dev/i2c-0", O_RDWR );
gives an error No such device or address

These are the devices registered in my target: 
root@am180x-evm:/# cd /sys/class/i2c-adapter/i2c-1/ 
root@am180x-evm:/sys/devices/platform/i2c-gpio.1/i2c-1# ls -l
drwxr-xr-x 3 root root 0 Mar 7 13:47 1-0018
drwxr-xr-x 3 root root 0 Mar 7 13:47 1-0020
drwxr-xr-x 4 root root 0 Mar 7 13:47 1-0034
drwxr-xr-x 7 root root 0 Mar 7 13:47 1-0048
drwxr-xr-x 3 root root 0 Mar 7 13:47 1-0065
--w------- 1 root root 4096 Mar 7 13:47 delete_device
lrwxrwxrwx 1 root root 0 Mar 7 13:47 device -> ../../i2c-gpio.1
drwxr-xr-x 3 root root 0 Mar 7 13:47 i2c-dev
-r--r--r-- 1 root root 4096 Mar 7 13:47 name
--w------- 1 root root 4096 Mar 7 13:47 new_device
drwxr-xr-x 2 root root 0 Mar 7 13:47 power
lrwxrwxrwx 1 root root 0 Mar 7 13:47 subsystem -> ../../../../bus/i2c
-rw-r--r-- 1 root root 4096 Mar 7 13:47 uevent

how to read my i2c slave device registers using user application.


Regards,
Francis