All of lore.kernel.org
 help / color / mirror / Atom feed
* I2C slave mode for Linux host
@ 2005-05-19  6:25 Leif Lindholm
  2005-05-19  6:25 ` Mark Studebaker
  0 siblings, 1 reply; 2+ messages in thread
From: Leif Lindholm @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* I2C slave mode for Linux host
  2005-05-19  6:25 I2C slave mode for Linux host Leif Lindholm
@ 2005-05-19  6:25 ` Mark Studebaker
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Studebaker @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

see some brief notes at the 10th bullet in i2c/TODO;
also a couple of notes in i2c.h (function pointer stubs).

Leif Lindholm wrote:
> 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
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-19  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:25 I2C slave mode for Linux host Leif Lindholm
2005-05-19  6:25 ` Mark Studebaker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.