linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ravikumar Kattekola <rk@ti.com>
To: tony@atomide.com, wsa@the-dreams.de, linux-omap@vger.kernel.org,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC 0/1] i2c: omap: Add support for switching to slave mode
Date: Wed, 25 May 2016 19:41:18 +0530	[thread overview]
Message-ID: <20160525141119.14486-1-rk@ti.com> (raw)

I2C controller on most of the omap devices has both master and slave
capability but the i2c framework has been missing support for registering
a bus in slave mode for long.
Recently the i2c slave support has been added to i2c framework, the following
patch adds the required support for omap_i2c driver to register a controller
as a slave device and be deriven by an external/internal master.

The slave interface requires us to add following mandatory events

1. I2C_SLAVE_WRITE_REQUESTED
2. I2C_SLAVE_READ_REQUESTED
3. I2C_SLAVE_WRITE_RECEIVED
4. I2C_SLAVE_READ_PROCESSED

and 

5. I2C_SLAVE_STOP

The omap i2c controller (at least on dra7x devices)
doesn't have  start/stop (STT/STP) support for slave mode
so event  #5 is not implemented in the driver.

Refer to Documentation/i2c/slave-interface for more info on 
i2c-slave-interface and Documentation/i2c/slave-eeprom-backend for 
sample backend driver.

Tested on:
DRA75x EVM Rev G3 and DRA72x EVM Rev B1 connected over i2c3 using DCAN2 lines [JP3]

Ravikumar Kattekola (1):
  drivers: i2c: omap: Add slave support

 drivers/i2c/busses/i2c-omap.c | 144 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 144 insertions(+)

-- 
2.8.2.396.g5fe494c

             reply	other threads:[~2016-05-25 14:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 14:11 Ravikumar Kattekola [this message]
2016-05-25 14:11 ` [RFC 1/1] drivers: i2c: omap: Add slave support Ravikumar Kattekola
2016-05-26 16:07   ` Manish Badarkhe
2016-08-25 17:14   ` Wolfram Sang
2016-08-27 13:59     ` Matthijs van Duin
2016-08-27 17:22       ` Wolfram Sang
2016-08-27 23:38         ` Matthijs van Duin
2016-08-28  5:35           ` Wolfram Sang
2016-08-29  3:43             ` Matthijs van Duin
2016-10-14  8:57               ` Ravikumar
2016-10-17  6:15                 ` Matthijs van Duin
2016-10-14  8:03       ` Ravikumar
2016-10-14  7:56     ` Ravikumar

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=20160525141119.14486-1-rk@ti.com \
    --to=rk@ti.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=wsa@the-dreams.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).