Understanding i2c on BBB: a different approach : help needed

Hi All,

I’m an experienced rtos driver developer but new to linux i2c subsystem :slight_smile:

For quite some time I was trying to learn i2c subsystem by looking at sources… but may be its way too much for me to understand the terminologies : bus driver/adapters/clients… I keep confusing between them… which is i2c controller driver out of them… what are adapters… so on and so forth.

I decided to work on it practically and understand it completely for once and all… ofcourse with community support.
Below is the plan I have for this:

  1. remove i2c support from BBB kernel sources
  2. add one by one after understanding what is being added
  3. final aim is to make one RTC and eeprom over i2c to work with BBB

For step 1, I would be grateful if some one could tells us what files I need to remove and what those files do an outline.

I think this sort of understanding many newbies in kernel would like to have. I call upon them to add on this thread with related info.


I think you are going about it wrong. I would start by adding a device to the bus and them with the basic commands like i2cdump, i2cget, etc, control it.

If you want to learn Linux internals, that is great, but start at the device driver. assuming you know how the kernal works.


Ritu, have a look at Free Electron’s Embedded Linux kernel and driver development training materials http://free-electrons.com/doc/training/linux-kernel/ They demonstrate step by step how to write an I2C driver under Linux for the beaglebone.

Frankly I’ve given up on learning Linux device drivers…I just use userspace interfaces i2cdev/spidev/sysfs e.t.c