Commit Graph

8 Commits

Author SHA1 Message Date
Doug Anderson b81dfaa01f i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver
The i2c-arb-gpio-challenge driver implements an I2C arbitration scheme
where masters need to claim the bus with a GPIO before they can start
a transaction.  This should generally only be used when standard I2C
multimaster isn't appropriate for some reason (errata/bugs).

This driver is based on code that Simon Glass added to the i2c-s3c2410
driver in the Chrome OS kernel 3.4 tree.  The current incarnation as a
mux driver is as suggested by Grant Likely.  See
<https://patchwork.kernel.org/patch/1877311/> for some history.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-04-17 11:31:03 +02:00
Stephen Warren ae58d1e406 i2c: Add generic I2C multiplexer using pinctrl API
This is useful for SoCs whose I2C module's signals can be routed to
different sets of pins at run-time, using the pinctrl API.

                                 +-----+  +-----+
                                 | dev |  | dev |
    +------------------------+   +-----+  +-----+
    | SoC                    |      |        |
    |                   /----|------+--------+
    |   +---+   +------+     | child bus A, on first set of pins
    |   |I2C|---|Pinmux|     |
    |   +---+   +------+     | child bus B, on second set of pins
    |                   \----|------+--------+--------+
    |                        |      |        |        |
    +------------------------+  +-----+  +-----+  +-----+
                                | dev |  | dev |  | dev |
                                +-----+  +-----+  +-----+

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-06-04 16:49:43 +02:00
Jean Delvare e7065e20d9 i2c: Rename last mux driver to standard pattern
Update the MAINTAINERS entry and all other references accordingly.

Based on an original patch by Wolfram Sang.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>

[wsa: fixed merge conflict due to rework in i2c_add_mux_adapter()]

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-05-12 14:28:18 +02:00
Wolfram Sang b4f0b74ea3 i2c: muxes: rename first set of drivers to a standard pattern
Apply a naming pattern like in the rest of the subsystem to a first set
of mux drivers. Those drivers are the low-hanging fruit; we want to pick
them to motivate upcoming drivers to follow the new pattern. The missing
GPIO driver will be converted in a later patch.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> (pca9541)
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-05-12 14:28:17 +02:00
Peter Korsgaard 92ed1a76ca i2c: Add generic I2C multiplexer using GPIO API
Add an i2c mux driver providing access to i2c bus segments using a
hardware MUX sitting on a master bus and controlled through gpio pins.

E.G. something like:

  ----------              ----------  Bus segment 1   - - - - -
 |          | SCL/SDA    |          |-------------- |           |
 |          |------------|          |
 |          |            |          | Bus segment 2 |           |
 |  Linux   | GPIO 1..N  |   MUX    |---------------   Devices
 |          |------------|          |               |           |
 |          |            |          | Bus segment M
 |          |            |          |---------------|           |
  ----------              ----------                  - - - - -

SCL/SDA of the master I2C bus is multiplexed to bus segment 1..M
according to the settings of the GPIO pins 1..N.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-01-10 22:11:23 +01:00
Guenter Roeck ae63b13bbe i2c/mux: Driver for PCA9541 I2C Master Selector
This patch adds support for PCA9541, an I2C Bus Master Selector.
The driver is modeled as single channel I2C Multiplexer to be able to utilize
the I2C multiplexer framework.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Tom Grennan <tom.grennan@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2010-10-24 18:16:58 +02:00
matt mooney ef9d9b8fb6 i2c: Change to new flag variable
Replace EXTRA_CFLAGS with ccflags-y.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-24 18:16:58 +02:00
Michael Lawnick 7f528135da i2c: I2C bus multiplexer driver pca954x
I2C driver for PCA954x I2C multiplexer series.

Signed-off-by: Michael Lawnick <ml.lawnick@gmx.de>
Acked-by: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-08-11 18:21:03 +02:00