Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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,

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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