instantiate new device using sysfs

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

instantiate new device using sysfs

1,031 Views
rashmikj
Contributor III

Hi,

I am working on LS1046ardb Kit.  When i try instantiate new device using sysfs i get the following error. How do i resolve them

echo temp 0x40 > /sys/bus/i2c/devices/i2c-0/new_device
[ 9908.323480] i2c i2c-0: Failed to register i2c client temp at 0x40 (-16)
-bash: echo: write error: Device or resource busy

0 Kudos
Reply
1 Reply

1,026 Views
yipingwang
NXP TechSupport
NXP TechSupport

=> i2c dev 0
Setting bus to 0
=> i2c probe
Valid chip addresses: 00 08 18 19 36 37 40 4C 51 52 53 69

The device at address 0x40 has already existed, please refer to the following.

root@localhost:~# ls /sys/bus/i2c/devices/i2c-0/
0-0040 0-0052 consumers device name of_node subsystem uevent
0-004c 0-0053 delete_device i2c-dev new_device power suppliers
root@localhost:~#

You could use address 0x51.

root@localhost:~# echo temp 0x51 > /sys/bus/i2c/devices/i2c-0/new_device
root@localhost:~# ls /sys/bus/i2c/devices/i2c-0/
0-0040 0-0051 0-0053 delete_device i2c-dev new_device power suppliers
0-004c 0-0052 consumers device name of_node subsystem uevent
root@localhost:~#

 

0 Kudos
Reply