0

I need to have i2c slave Linux kernel driver for TI AM335x. I googled about and didn't find precise information. Should I do everything from scratch, or maybe someone has some reference about it? or even a patch

Thanks

Avner

Avner Flesch
  • 35
  • 1
  • 7

1 Answers1

0

For new device which connected as slave to i2c bus, you should write neither "i2c driver" nor "driver for AM335x" (as far as the processor support already present in kernel).

i2c is a bus and there is kernel infrastructure for the bus, see documentation.

You should figure out what type your device is and then write driver for this type of device using i2c bus primitives.

For example, the driver for DS13xx and compatible IC is rtc driver.

A driver "for" PCF8574 i2c gpio expander can be GPIO driver as well as keypad driver.

ReAl
  • 1,231
  • 1
  • 8
  • 19
  • 1
    I guess you didn't understand my question. If you were familiar with this issue, would know there is **no** such driver for i2c slave in the kernel for AM335x. i2c slave it something not trivial - so what you wrote is not true! – Avner Flesch Mar 03 '19 at 12:29
  • I'm sorry. Indeed, I used a wrong assumption that _AM335x with linux_ should be an i2c master. – ReAl Mar 03 '19 at 15:18
  • p.s. I am not "one who voted against" but I compensated the vote. For now the question is interesting fo me. – ReAl Mar 03 '19 at 15:25
  • 1
    Thanks! In 2010 someone wrote such driver (There are posts about it in TI forum) but it has gone. I guess I will have to write it by myself... – Avner Flesch Mar 04 '19 at 07:12