OpenNetworkLinux
OpenNetworkLinux copied to clipboard
i2c EEPROM unable to write
Hello, In our system, I have an EEPROM device connected on i2c bus 0 at address 0x51. after instantiating a new i2c device with the at24 driver (the default kernel one, unaltered).
echo 24c02 0x51 > /sys/bus/i2c/devices/i2c-0/new_device
I indeed see the new device in /sys/devices
. I can also perform a read from the eeprom node, but when attempting to write to it I get an error.
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051# ls -la
total 0
drwxr-xr-x 3 root root 0 Jan 6 00:28 .
drwxr-xr-x 4 root root 0 Jan 6 00:28 ..
drwxr-xr-x 2 root root 0 Jan 6 00:28 0-00510
lrwxrwxrwx 1 root root 0 Jan 6 00:28 driver -> ../../../../../bus/i2c/drivers/at24
-rw------- 1 root root 256 Jan 6 03:40 eeprom
-r--r--r-- 1 root root 4096 Jan 6 00:28 modalias
-r--r--r-- 1 root root 4096 Jan 6 00:28 name
lrwxrwxrwx 1 root root 0 Jan 6 00:28 subsystem -> ../../../../../bus/i2c
-rw-r--r-- 1 root root 4096 Jan 6 00:28 uevent
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051# cat eeprom
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051# echo "TEST" > eeprom
-bash: echo: write error: Connection timed out
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
root@localhost:/sys/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0051#
from past experience in different systems I know I could perform read/write to the node without problems, I am trying to find the reason why write operation to eeprom is not working.
I would appreciate any inputs regarding the implementation of i2c EEPROM in the ONL system.
Hello, Its an interesting question. Did you get any answer for that. I was trying to understand how that file "eeprom" is getting populated. Any clues please let me know. Thanks