All of lore.kernel.org
 help / color / mirror / Atom feed
From: leif.lindholm@i3micro.com (Leif Lindholm)
To: lm-sensors@vger.kernel.org
Subject: I2C slave mode for Linux host
Date: Thu, 19 May 2005 06:25:13 +0000	[thread overview]
Message-ID: <1094205518.28654.27.camel@fortress> (raw)

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

             reply	other threads:[~2005-05-19  6:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19  6:25 Leif Lindholm [this message]
2005-05-19  6:25 ` I2C slave mode for Linux host Mark Studebaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1094205518.28654.27.camel@fortress \
    --to=leif.lindholm@i3micro.com \
    --cc=lm-sensors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.