I2C slave mode for Linux host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I was directed here from the irc channel - please cc any replies to me
as I'm not subscribed to the list.

I'm implementing slave mode transfers (well, just reads for now) on an
embedded board, and noticed there wasn't really any support in the
subsystem for this (other than two unused function pointers in a struct
in linux/i2c.h.

For now the code is mostly located in the algo driver, but I was
wondering if you had any design thoughts for integrating it into the
core/dev files?

As far as I can see, the modifications required would be:
* a flag in the adapter struct indicating master/slave mode
* ioctl in i2c_control for setting master/slave mode (with function
  pointer - or should this be all in the algo driver?)
* hooks in i2cdev_read/write() for distinguishing between modes
* putting read/write buffers in the adapter struct

Thoughts?

regards
	/
		Leif



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux