How do you interface with the Linux I2C driver from kernel space? For example, if I had LEDs connected to a GPIO expander on the I2C bus, how would I blink them twice before going down for reset from machine_reset()?

Essentially, I believe I need to call the functions i2c_smbus_write_byte(), i2c_smbus_read_byte(), etc. But these functions require I2C client data that I do not understand how to supply.

Thanks,

link|improve this question
feedback

1 Answer

Hardware sensors communication is done largely over I2C. Have a look at Lm_sensors and its corresponding kernel modules.

The I2C data you send on the bus is hopefully described in the datasheet of your GPIO expander chip.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.