Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .