[<<][am335x][>>][..]
Thu Jun 14 11:56:20 EDT 2018

register i2c slave mode


# modprobe i2c-slave-eeprom
# echo slave-24c02 0x1040 >/sys/devices/platform/ocp/4819c000.i2c/i2c-2/new_device

[  276.463975] omap_i2c 4819c000.i2c: OA = 64, iestate = 621f
[  276.479475] i2c i2c-2: new_device: Instantiated device slave-24c02 at 0x40


How to unregister?

https://www.kernel.org/doc/Documentation/i2c/instantiating-devices

echo 0x1040 >delete_device
[  383.861649] i2c i2c-2: delete_device: Deleting device slave-24c02 at 0x40

but the unregister function doesn't get called?


modprobe i2c-slave-eeprom
echo slave-24c02 0x1040 >/sys/devices/platform/ocp/4819c000.i2c/i2c-2/new_device

echo 0x1040 >/sys/devices/platform/ocp/4819c000.i2c/i2c-2/delete_device
rmmod i2c-slave-eeprom

[ 8190.552349] omap_i2c 4819c000.i2c: reg_slave
[ 8190.567339] omap_i2c 4819c000.i2c: OA = 64, iestate = 621f
[ 8190.573056] i2c i2c-2: new_device: Instantiated device slave-24c02 at 0x40

[ 8190.610851] i2c i2c-2: delete_device: Deleting device slave-24c02 at 0x40
[ 8190.635284] omap_i2c 4819c000.i2c: OA = 0, iestate = 601f

Next: make the eeprom work.


Look at the rcar events:


I2C_SLAVE_READ_REQUESTED
I2C_SLAVE_WRITE_REQUESTED
I2C_SLAVE_STOP
I2C_SLAVE_WRITE_RECEIVED
I2C_SLAVE_READ_PROCESSED


To implement IC_SLAVE_WRITE_REQUESTED, what does the omap have?




[Reply][About]
[<<][am335x][>>][..]