<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.linux.drivers.i2c">
    <title>gmane.linux.drivers.i2c</title>
    <link>http://blog.gmane.org/gmane.linux.drivers.i2c</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11363"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11347"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11345"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11326"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11324"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11318"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11299"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11290"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11278"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11267"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11259"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11258"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11241"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11207"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11173"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11142"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11134"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11118"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11115"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.linux.drivers.i2c/11085"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11363">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11363</link>
    <description>&lt;pre&gt;
 i am robothroli, Purchase manager from roli Merchant Ltd. We are
Import/export Company based in taiwan. We are interested in purchasing
your product and I would like to make an inquiry. Please inform me on:

Sample availability and price
Minimum order quantity
FOB Prices

Sincerely
Purchase Manager
robothroli



&lt;/pre&gt;</description>
    <dc:creator>robothroli company</dc:creator>
    <dc:date>2012-05-25T13:45:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11347">
    <title>GET BACK TO ME ASAP.</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11347</link>
    <description>&lt;pre&gt;Good day my beloved friend,

How are you and your lovely family doing today,i hope all is well?if so glory 
be to God,i have an urgent purposal for you, if interested kindly contact me on 
this e-mail (anna_kennedy_hood-PkbjNfxxIAQqdlJmJB21zg&amp;lt; at &amp;gt;public.gmane.org)
&lt;/pre&gt;</description>
    <dc:creator>Mrs Anna Kennedy</dc:creator>
    <dc:date>2012-05-23T18:58:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11345">
    <title>[PATCH v4 0/7] ARM: davinci: add support for the am1808 based enbw_cmc board</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11345</link>
    <description>&lt;pre&gt;this patchserie add support for the davinci am1808 based
enbw_cmc board.

changes for v2:
Post this patchserie now as v2, as reworked in the
comments I got for the RFC serie.

changes for v3:
- Interrupt Controller:
  - comment from Sergei Shtylyov:
    - rename compatible" prop to "ti,cp_intc"
    - cp_intc_init() is now also for the of case
      the name of the init function (it calls the
      "new" __cp_intc_init() function, which was
      the "old" cp_intc_init()). Through this
      rework the changes for OF is better visible.
      As the OF case uses the irq_domain rework from
      Grant Likely, maybe the none OF case can use
      this also, but this should be tested on a hw ...

changes for v4:
- Interrupt Controller:
  - split in two patches as Nori Sekhar suggested
    one for the irq_domain change
    one for DT support
  - add comment from Grant Likely for the DT part:
    remove if/else clause, not needed.
    Make use of DT runtime configurable
    The non OF case is not tested!
     
Got no comments to the following points, I noted in the
RFC series, so posting this patchseries with them:

- ARM: davinci: configure davinci aemif chipselects through OF
  not moved to mfd, as mentioned in this discussion:
  http://davinci-linux-open-source.1494791.n2.nabble.com/PATCH-arm-davinci-configure-davinci-aemif-chipselects-through-OF-td7059739.html
  instead use a phandle in the DTS, so drivers which
  uses the davinci aemif, can call davinci_aemif_setup_timing_of()

  This is just thought as an RFC ... The enbw_cmc board
  support not really need to setup this bus timings, as
  they are setup in U-Boot ... but I want to post this,
  as I think, it is a nice to have, and I am not really
  sure, if this has to be a MFD device (If so, all bus
  interfaces for other SoCs should be converted also to
  MFD devices) ... as an example how this can be used
  I add this to the davinci nand controller OF support
  patch, in this patchserie.

- ARM: davinci: mux: add OF support
  I want to get rid of the pin setup code in board code ...
  This patch introduces a davinci_cfg_reg_of() function,
  which davinci drivers can call, if they found a
  "pinmux-handle", so used in the following drivers in
  this patchserie:

  drivers/net/ethernet/ti/davinci_emac
  drivers/i2c/busses/i2c-davinci.c
  drivers/mtd/nand/davinci_nand.c

  This is removed for v4 serie, as Nori Sekhar suggested.

- post this board support with USB support, even though
  USB is only working with the 10 ms "workaround", posted here:
  http://comments.gmane.org/gmane.linux.usb.general/54505
  I see this issue also on the AM1808 TMDXEXP1808L evalboard.

  change for v4:
  The 10 ms delay is no longer needed, see discussion here:

  http://www.spinics.net/lists/linux-usb/msg64232.html

  shows the way to go ...

- MMC and USB are not using OF support yet, ideas how to port
  this are welcome. I need for USB and MMC board specific
  callbacks, how to solve this with OF support?

Signed-off-by: Heiko Schocher &amp;lt;hs-ynQEQJNshbs&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r&amp;lt; at &amp;gt;public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ&amp;lt; at &amp;gt;public.gmane.org
Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/&amp;lt; at &amp;gt;public.gmane.org
Cc: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r&amp;lt; at &amp;gt;public.gmane.org
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA&amp;lt; at &amp;gt;public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA&amp;lt; at &amp;gt;public.gmane.org
Cc: David Woodhouse &amp;lt;dwmw2-wEGCiKHe2LqWVfeAwA7xHQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Ben Dooks &amp;lt;ben-linux-elnMNo+KYs3YtjvyW6yDsg&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Wolfram Sang &amp;lt;w.sang-bIcnvbaLZ9MEGnE8C9+IrQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Sekhar Nori &amp;lt;nsekhar-l0cyMroinI0&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Kevin Hilman &amp;lt;khilman-l0cyMroinI0&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Wolfgang Denk &amp;lt;wd-ynQEQJNshbs&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Sergei Shtylyov &amp;lt;sshtylyov-Igf4POYTYCDQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Cc: Grant Likely &amp;lt;grant.likely-s3s/WqlpOiPyB63q8FvJNQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Heiko Schocher (7):
  ARM: davinci, intc: Add irq domain support
  ARM: davinci, intc: Add OF support for TI interrupt controller
  ARM: davinci: configure davinci aemif chipselects through OF
  ARM: davinci: net: davinci_emac: add OF support
  ARM: davinci: i2c: add OF support
  ARM: mtd: nand: davinci: add OF support for davinci nand controller
  ARM: davinci: add support for the am1808 based enbw_cmc board

 .../devicetree/bindings/arm/davinci/aemif.txt      |  119 +++++++
 .../devicetree/bindings/arm/davinci/i2c.txt        |   31 ++
 .../devicetree/bindings/arm/davinci/intc.txt       |   27 ++
 .../devicetree/bindings/arm/davinci/nand.txt       |   72 ++++
 .../devicetree/bindings/net/davinci_emac.txt       |   41 +++
 arch/arm/boot/dts/enbw_cmc.dts                     |  172 +++++++++
 arch/arm/configs/enbw_cmc_defconfig                |  123 +++++++
 arch/arm/mach-davinci/Kconfig                      |    9 +
 arch/arm/mach-davinci/Makefile                     |    1 +
 arch/arm/mach-davinci/aemif.c                      |   86 +++++-
 arch/arm/mach-davinci/board-enbw-cmc.c             |  374 ++++++++++++++++++++
 arch/arm/mach-davinci/cp_intc.c                    |   74 ++++-
 arch/arm/mach-davinci/include/mach/aemif.h         |    1 +
 arch/arm/mach-davinci/include/mach/uncompress.h    |    1 +
 drivers/i2c/busses/i2c-davinci.c                   |   32 ++
 drivers/mtd/nand/davinci_nand.c                    |   80 ++++-
 drivers/net/ethernet/ti/davinci_emac.c             |   87 +++++-
 17 files changed, 1317 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/davinci/aemif.txt
 create mode 100644 Documentation/devicetree/bindings/arm/davinci/i2c.txt
 create mode 100644 Documentation/devicetree/bindings/arm/davinci/intc.txt
 create mode 100644 Documentation/devicetree/bindings/arm/davinci/nand.txt
 create mode 100644 Documentation/devicetree/bindings/net/davinci_emac.txt
 create mode 100644 arch/arm/boot/dts/enbw_cmc.dts
 create mode 100644 arch/arm/configs/enbw_cmc_defconfig
 create mode 100644 arch/arm/mach-davinci/board-enbw-cmc.c

&lt;/pre&gt;</description>
    <dc:creator>Heiko Schocher</dc:creator>
    <dc:date>2012-05-22T13:55:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11326">
    <title>identify i2c</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11326</link>
    <description>&lt;pre&gt;
How do I find out what to configure in a 3.4 kernel?

&lt;/pre&gt;</description>
    <dc:creator>James</dc:creator>
    <dc:date>2012-05-20T20:24:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11324">
    <title>[PATCH V4] i2c: Add generic I2C multiplexer using pinctrl API</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11324</link>
    <description>&lt;pre&gt;From: Stephen Warren &amp;lt;swarren-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

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 &amp;lt;swarren-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Acked-by: Linus Walleij &amp;lt;linus.walleij-QSEj5FYQhm4dnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Acked-by: Rob Herring &amp;lt;rob.herring-bsGFqQB8/DxBDgjK7y7TUQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
Wolfram, when you apply this for 3.6, could you please put just this
patch into a stable topic branch - that way, I can merge this into a
Tegra branch too so that I can use the new driver in 3.6.

v4: Added diagram from commit message into binding documentation.
v3: Renamed pinctrl-i2cmux.c to i2c-mux-pinctrl.c to match recent changes
    to other I2C mux files.
v2: Rebase onto David Daney's i2c-mux OF support, including slight binding
    changes. Add more error messages.

i2c mux binding fixup
---
 .../devicetree/bindings/i2c/i2c-mux-pinctrl.txt    |   93 +++++++
 drivers/i2c/muxes/Kconfig                          |   12 +
 drivers/i2c/muxes/Makefile                         |    1 +
 drivers/i2c/muxes/i2c-mux-pinctrl.c                |  279 ++++++++++++++++++++
 include/linux/i2c-mux-pinctrl.h                    |   41 +++
 5 files changed, 426 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
 create mode 100644 drivers/i2c/muxes/i2c-mux-pinctrl.c
 create mode 100644 include/linux/i2c-mux-pinctrl.h

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
new file mode 100644
index 0000000..ae8af16
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,93 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+Pinctrl-based I2C Bus Mux
+
+This binding describes an I2C bus multiplexer that uses pin multiplexing to
+route the I2C signals, and represents the pin multiplexing configuration
+using the pinctrl device tree bindings.
+
+                                 +-----+  +-----+
+                                 | dev |  | dev |
+    +------------------------+   +-----+  +-----+
+    | SoC                    |      |        |
+    |                   /----|------+--------+
+    |   +---+   +------+     | child bus A, on first set of pins
+    |   |I2C|---|Pinmux|     |
+    |   +---+   +------+     | child bus B, on second set of pins
+    |                   \----|------+--------+--------+
+    |                        |      |        |        |
+    +------------------------+  +-----+  +-----+  +-----+
+                                | dev |  | dev |  | dev |
+                                +-----+  +-----+  +-----+
+
+Required properties:
+- compatible: i2c-mux-pinctrl
+- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
+  port is connected to.
+
+Also required are:
+
+* Standard pinctrl properties that specify the pin mux state for each child
+  bus. See ../pinctrl/pinctrl-bindings.txt.
+
+* Standard I2C mux properties. See mux.txt in this directory.
+
+* I2C child bus nodes. See mux.txt in this directory.
+
+For each named state defined in the pinctrl-names property, an I2C child bus
+will be created. I2C child bus numbers are assigned based on the index into
+the pinctrl-names property.
+
+The only exception is that no bus will be created for a state named "idle". If
+such a state is defined, it must be the last entry in pinctrl-names. For
+example:
+
+pinctrl-names = "ddc", "pta", "idle"  -&amp;gt;  ddc = bus 0, pta = bus 1
+pinctrl-names = "ddc", "idle", "pta"  -&amp;gt;  Invalid ("idle" not last)
+pinctrl-names = "idle", "ddc", "pta"  -&amp;gt;  Invalid ("idle" not last)
+
+Whenever an access is made to a device on a child bus, the relevant pinctrl
+state will be programmed into hardware.
+
+If an idle state is defined, whenever an access is not being made to a device
+on a child bus, the idle pinctrl state will be programmed into hardware.
+
+If an idle state is not defined, the most recently used pinctrl state will be
+left programmed into hardware whenever no access is being made of a device on
+a child bus.
+
+Example:
+
+i2cmux {
+compatible = "i2c-mux-pinctrl";
+#address-cells = &amp;lt;1&amp;gt;;
+#size-cells = &amp;lt;0&amp;gt;;
+
+i2c-parent = &amp;lt;&amp;amp;i2c1&amp;gt;;
+
+pinctrl-names = "ddc", "pta", "idle";
+pinctrl-0 = &amp;lt;&amp;amp;state_i2cmux_ddc&amp;gt;;
+pinctrl-1 = &amp;lt;&amp;amp;state_i2cmux_pta&amp;gt;;
+pinctrl-2 = &amp;lt;&amp;amp;state_i2cmux_idle&amp;gt;;
+
+i2c&amp;lt; at &amp;gt;0 {
+reg = &amp;lt;0&amp;gt;;
+#address-cells = &amp;lt;1&amp;gt;;
+#size-cells = &amp;lt;0&amp;gt;;
+
+eeprom {
+compatible = "eeprom";
+reg = &amp;lt;0x50&amp;gt;;
+};
+};
+
+i2c&amp;lt; at &amp;gt;1 {
+reg = &amp;lt;1&amp;gt;;
+#address-cells = &amp;lt;1&amp;gt;;
+#size-cells = &amp;lt;0&amp;gt;;
+
+eeprom {
+compatible = "eeprom";
+reg = &amp;lt;0x50&amp;gt;;
+};
+};
+};
+
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index beb2491..a0edd98 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -37,4 +37,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config I2C_MUX_PCA954x
   This driver can also be built as a module.  If so, the module
   will be called i2c-mux-pca954x.
 
+config I2C_MUX_PINCTRL
+tristate "pinctrl-based I2C multiplexer"
+depends on PINCTRL
+help
+  If you say yes to this option, support will be included for an I2C
+  multiplexer that uses the pinctrl subsystem, i.e. pin multiplexing.
+  This is useful for SoCs whose I2C module's signals can be routed to
+  different sets of pins at run-time.
+
+  This driver can also be built as a module. If so, the module will be
+  called pinctrl-i2cmux.
+
 endmenu
diff --git a/drivers/i2c/muxes/Makefile b/drivers/i2c/muxes/Makefile
index 5826249..76da869 100644
--- a/drivers/i2c/muxes/Makefile
+++ b/drivers/i2c/muxes/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4,5 +4,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 obj-$(CONFIG_I2C_MUX_GPIO)+= i2c-mux-gpio.o
 obj-$(CONFIG_I2C_MUX_PCA9541)+= i2c-mux-pca9541.o
 obj-$(CONFIG_I2C_MUX_PCA954x)+= i2c-mux-pca954x.o
+obj-$(CONFIG_I2C_MUX_PINCTRL)+= i2c-mux-pinctrl.o
 
 ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
new file mode 100644
index 0000000..46a6697
--- /dev/null
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,279 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * I2C multiplexer using pinctrl API
+ *
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+ */
+
+#include &amp;lt;linux/i2c.h&amp;gt;
+#include &amp;lt;linux/i2c-mux.h&amp;gt;
+#include &amp;lt;linux/init.h&amp;gt;
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/of_i2c.h&amp;gt;
+#include &amp;lt;linux/pinctrl/consumer.h&amp;gt;
+#include &amp;lt;linux/i2c-mux-pinctrl.h&amp;gt;
+#include &amp;lt;linux/platform_device.h&amp;gt;
+#include &amp;lt;linux/slab.h&amp;gt;
+
+struct i2c_mux_pinctrl {
+struct device *dev;
+struct i2c_mux_pinctrl_platform_data *pdata;
+struct pinctrl *pinctrl;
+struct pinctrl_state **states;
+struct pinctrl_state *state_idle;
+struct i2c_adapter *parent;
+struct i2c_adapter **busses;
+};
+
+static int i2c_mux_pinctrl_select(struct i2c_adapter *adap, void *data,
+  u32 chan)
+{
+struct i2c_mux_pinctrl *mux = data;
+
+return pinctrl_select_state(mux-&amp;gt;pinctrl, mux-&amp;gt;states[chan]);
+}
+
+static int i2c_mux_pinctrl_deselect(struct i2c_adapter *adap, void *data,
+    u32 chan)
+{
+struct i2c_mux_pinctrl *mux = data;
+
+return pinctrl_select_state(mux-&amp;gt;pinctrl, mux-&amp;gt;state_idle);
+}
+
+#ifdef CONFIG_OF
+static int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux,
+struct platform_device *pdev)
+{
+struct device_node *np = pdev-&amp;gt;dev.of_node;
+int num_names, i, ret;
+struct device_node *adapter_np;
+struct i2c_adapter *adapter;
+
+if (!np)
+return 0;
+
+mux-&amp;gt;pdata = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*mux-&amp;gt;pdata), GFP_KERNEL);
+if (!mux-&amp;gt;pdata) {
+dev_err(mux-&amp;gt;dev,
+"Cannot allocate i2c_mux_pinctrl_platform_data\n");
+return -ENOMEM;
+}
+
+num_names = of_property_count_strings(np, "pinctrl-names");
+if (num_names &amp;lt; 0) {
+dev_err(mux-&amp;gt;dev, "Cannot parse pinctrl-names: %d\n",
+num_names);
+return num_names;
+}
+
+mux-&amp;gt;pdata-&amp;gt;pinctrl_states = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev,
+sizeof(*mux-&amp;gt;pdata-&amp;gt;pinctrl_states) * num_names,
+GFP_KERNEL);
+if (!mux-&amp;gt;pdata-&amp;gt;pinctrl_states) {
+dev_err(mux-&amp;gt;dev, "Cannot allocate pinctrl_states\n");
+return -ENOMEM;
+}
+
+for (i = 0; i &amp;lt; num_names; i++) {
+ret = of_property_read_string_index(np, "pinctrl-names", i,
+&amp;amp;mux-&amp;gt;pdata-&amp;gt;pinctrl_states[mux-&amp;gt;pdata-&amp;gt;bus_count]);
+if (ret &amp;lt; 0) {
+dev_err(mux-&amp;gt;dev, "Cannot parse pinctrl-names: %d\n",
+ret);
+return ret;
+}
+if (!strcmp(mux-&amp;gt;pdata-&amp;gt;pinctrl_states[mux-&amp;gt;pdata-&amp;gt;bus_count],
+    "idle")) {
+if (i != num_names - 1) {
+dev_err(mux-&amp;gt;dev, "idle state must be last\n");
+return -EINVAL;
+}
+mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle = "idle";
+} else {
+mux-&amp;gt;pdata-&amp;gt;bus_count++;
+}
+}
+
+adapter_np = of_parse_phandle(np, "i2c-parent", 0);
+if (!adapter_np) {
+dev_err(mux-&amp;gt;dev, "Cannot parse i2c-parent\n");
+return -ENODEV;
+}
+adapter = of_find_i2c_adapter_by_node(adapter_np);
+if (!adapter) {
+dev_err(mux-&amp;gt;dev, "Cannot find parent bus\n");
+return -ENODEV;
+}
+mux-&amp;gt;pdata-&amp;gt;parent_bus_num = i2c_adapter_id(adapter);
+put_device(&amp;amp;adapter-&amp;gt;dev);
+
+return 0;
+}
+#else
+static inline int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux,
+   struct platform_device *pdev)
+{
+return 0;
+}
+#endif
+
+static int __devinit i2c_mux_pinctrl_probe(struct platform_device *pdev)
+{
+struct i2c_mux_pinctrl *mux;
+int (*deselect)(struct i2c_adapter *, void *, u32);
+int i, ret;
+
+mux = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*mux), GFP_KERNEL);
+if (!mux) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot allocate i2c_mux_pinctrl\n");
+ret = -ENOMEM;
+goto err;
+}
+platform_set_drvdata(pdev, mux);
+
+mux-&amp;gt;dev = &amp;amp;pdev-&amp;gt;dev;
+
+mux-&amp;gt;pdata = pdev-&amp;gt;dev.platform_data;
+if (!mux-&amp;gt;pdata) {
+ret = i2c_mux_pinctrl_parse_dt(mux, pdev);
+if (ret &amp;lt; 0)
+goto err;
+}
+if (!mux-&amp;gt;pdata) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Missing platform data\n");
+ret = -ENODEV;
+goto err;
+}
+
+mux-&amp;gt;states = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev,
+   sizeof(*mux-&amp;gt;states) * mux-&amp;gt;pdata-&amp;gt;bus_count,
+   GFP_KERNEL);
+if (!mux-&amp;gt;states) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot allocate states\n");
+ret = -ENOMEM;
+goto err;
+}
+
+mux-&amp;gt;busses = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev,
+   sizeof(mux-&amp;gt;busses) * mux-&amp;gt;pdata-&amp;gt;bus_count,
+   GFP_KERNEL);
+if (!mux-&amp;gt;states) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot allocate busses\n");
+ret = -ENOMEM;
+goto err;
+}
+
+mux-&amp;gt;pinctrl = devm_pinctrl_get(&amp;amp;pdev-&amp;gt;dev);
+if (IS_ERR(mux-&amp;gt;pinctrl)) {
+ret = PTR_ERR(mux-&amp;gt;pinctrl);
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot get pinctrl: %d\n", ret);
+goto err;
+}
+for (i = 0; i &amp;lt; mux-&amp;gt;pdata-&amp;gt;bus_count; i++) {
+mux-&amp;gt;states[i] = pinctrl_lookup_state(mux-&amp;gt;pinctrl,
+mux-&amp;gt;pdata-&amp;gt;pinctrl_states[i]);
+if (IS_ERR(mux-&amp;gt;states[i])) {
+ret = PTR_ERR(mux-&amp;gt;states[i]);
+dev_err(&amp;amp;pdev-&amp;gt;dev,
+"Cannot look up pinctrl state %s: %d\n",
+mux-&amp;gt;pdata-&amp;gt;pinctrl_states[i], ret);
+goto err;
+}
+}
+if (mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle) {
+mux-&amp;gt;state_idle = pinctrl_lookup_state(mux-&amp;gt;pinctrl,
+mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle);
+if (IS_ERR(mux-&amp;gt;state_idle)) {
+ret = PTR_ERR(mux-&amp;gt;state_idle);
+dev_err(&amp;amp;pdev-&amp;gt;dev,
+"Cannot look up pinctrl state %s: %d\n",
+mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle, ret);
+goto err;
+}
+
+deselect = i2c_mux_pinctrl_deselect;
+} else {
+deselect = NULL;
+}
+
+mux-&amp;gt;parent = i2c_get_adapter(mux-&amp;gt;pdata-&amp;gt;parent_bus_num);
+if (!mux-&amp;gt;parent) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Parent adapter (%d) not found\n",
+mux-&amp;gt;pdata-&amp;gt;parent_bus_num);
+ret = -ENODEV;
+goto err;
+}
+
+for (i = 0; i &amp;lt; mux-&amp;gt;pdata-&amp;gt;bus_count; i++) {
+u32 bus = mux-&amp;gt;pdata-&amp;gt;base_bus_num ?
+(mux-&amp;gt;pdata-&amp;gt;base_bus_num + i) : 0;
+
+mux-&amp;gt;busses[i] = i2c_add_mux_adapter(mux-&amp;gt;parent, &amp;amp;pdev-&amp;gt;dev,
+     mux, bus, i,
+     i2c_mux_pinctrl_select,
+     deselect);
+if (!mux-&amp;gt;busses[i]) {
+ret = -ENODEV;
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to add adapter %d\n", i);
+goto err_del_adapter;
+}
+}
+
+return 0;
+
+err_del_adapter:
+for (; i &amp;gt; 0; i--)
+i2c_del_mux_adapter(mux-&amp;gt;busses[i - 1]);
+i2c_put_adapter(mux-&amp;gt;parent);
+err:
+return ret;
+}
+
+static int __devexit i2c_mux_pinctrl_remove(struct platform_device *pdev)
+{
+struct i2c_mux_pinctrl *mux = platform_get_drvdata(pdev);
+int i;
+
+for (i = 0; i &amp;lt; mux-&amp;gt;pdata-&amp;gt;bus_count; i++)
+i2c_del_mux_adapter(mux-&amp;gt;busses[i]);
+
+i2c_put_adapter(mux-&amp;gt;parent);
+
+return 0;
+}
+
+#ifdef CONFIG_OF
+static const struct of_device_id i2c_mux_pinctrl_of_match[] __devinitconst = {
+{ .compatible = "i2c-mux-pinctrl", },
+{},
+};
+MODULE_DEVICE_TABLE(of, i2c_mux_pinctrl_of_match);
+#endif
+
+static struct platform_driver i2c_mux_pinctrl_driver = {
+.driver= {
+.name= "i2c-mux-pinctrl",
+.owner= THIS_MODULE,
+.of_match_table = of_match_ptr(i2c_mux_pinctrl_of_match),
+},
+.probe= i2c_mux_pinctrl_probe,
+.remove= __devexit_p(i2c_mux_pinctrl_remove),
+};
+module_platform_driver(i2c_mux_pinctrl_driver);
+
+MODULE_DESCRIPTION("pinctrl-based I2C multiplexer driver");
+MODULE_AUTHOR("Stephen Warren &amp;lt;swarren-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:i2c-mux-pinctrl");
diff --git a/include/linux/i2c-mux-pinctrl.h b/include/linux/i2c-mux-pinctrl.h
new file mode 100644
index 0000000..a65c864
--- /dev/null
+++ b/include/linux/i2c-mux-pinctrl.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,41 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * i2c-mux-pinctrl platform data
+ *
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+ */
+
+#ifndef _LINUX_I2C_MUX_PINCTRL_H
+#define _LINUX_I2C_MUX_PINCTRL_H
+
+/**
+ * struct i2c_mux_pinctrl_platform_data - Platform data for i2c-mux-pinctrl
+ * &amp;lt; at &amp;gt;parent_bus_num: Parent I2C bus number
+ * &amp;lt; at &amp;gt;base_bus_num: Base I2C bus number for the child busses. 0 for dynamic.
+ * &amp;lt; at &amp;gt;bus_count: Number of child busses. Also the number of elements in
+ *&amp;lt; at &amp;gt;pinctrl_states
+ * &amp;lt; at &amp;gt;pinctrl_states: The names of the pinctrl state to select for each child bus
+ * &amp;lt; at &amp;gt;pinctrl_state_idle: The pinctrl state to select when no child bus is being
+ *accessed. If NULL, the most recently used pinctrl state will be left
+ *selected.
+ */
+struct i2c_mux_pinctrl_platform_data {
+int parent_bus_num;
+int base_bus_num;
+int bus_count;
+const char **pinctrl_states;
+const char *pinctrl_state_idle;
+};
+
+#endif
&lt;/pre&gt;</description>
    <dc:creator>Stephen Warren</dc:creator>
    <dc:date>2012-05-18T15:29:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11318">
    <title>[PATCH REPOST] i2c: Add generic I2C multiplexer using pinctrl API</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11318</link>
    <description>&lt;pre&gt;From: Stephen Warren &amp;lt;swarren-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

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 &amp;lt;swarren-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
Acked-by: Linus Walleij &amp;lt;linus.walleij-QSEj5FYQhm4dnm+yROfE0A&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
v3: Renamed pinctrl-i2cmux.c to i2c-mux-pinctrl.c to match recent changes
    to other I2C mux files.
v2: Rebase onto David Daney's i2c-mux OF support, including slight binding
    changes. Add more error messages.

squash pinctrl i2c mux
---
 .../devicetree/bindings/i2c/i2c-mux-pinctrl.txt    |   79 ++++++
 drivers/i2c/muxes/Kconfig                          |   12 +
 drivers/i2c/muxes/Makefile                         |    1 +
 drivers/i2c/muxes/i2c-mux-pinctrl.c                |  279 ++++++++++++++++++++
 include/linux/i2c-mux-pinctrl.h                    |   41 +++
 5 files changed, 412 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
 create mode 100644 drivers/i2c/muxes/i2c-mux-pinctrl.c
 create mode 100644 include/linux/i2c-mux-pinctrl.h

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
new file mode 100644
index 0000000..b10e268
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,79 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+Pinctrl-based I2C Bus Mux
+
+This binding describes an I2C bus multiplexer that uses pin multiplexing to
+route the I2C signals, and represents the pin multiplexing configuration
+using the pinctrl device tree bindings.
+
+Required properties:
+- compatible: i2c-mux-pinctrl
+- i2c-parent: The phandle of the I2C bus that this multiplexer's master-side
+  port is connected to.
+
+Also required are:
+
+* Standard pinctrl properties that specify the pin mux state for each child
+  bus. See ../pinctrl/pinctrl-bindings.txt.
+
+* Standard I2C mux properties. See mux.txt in this directory.
+
+* I2C child bus nodes. See mux.txt in this directory.
+
+For each named state defined in the pinctrl-names property, an I2C child bus
+will be created. I2C child bus numbers are assigned based on the index into
+the pinctrl-names property.
+
+The only exception is that no bus will be created for a state named "idle". If
+such a state is defined, it must be the last entry in pinctrl-names. For
+example:
+
+pinctrl-names = "ddc", "pta", "idle"  -&amp;gt;  ddc = bus 0, pta = bus 1
+pinctrl-names = "ddc", "idle", "pta"  -&amp;gt;  Invalid ("idle" not last)
+pinctrl-names = "idle", "ddc", "pta"  -&amp;gt;  Invalid ("idle" not last)
+
+Whenever an access is made to a device on a child bus, the relevant pinctrl
+state will be programmed into hardware.
+
+If an idle state is defined, whenever an access is not being made to a device
+on a child bus, the idle pinctrl state will be programmed into hardware.
+
+If an idle state is not defined, the most recently used pinctrl state will be
+left programmed into hardware whenever no access is being made of a device on
+a child bus.
+
+Example:
+
+i2cmux {
+compatible = "i2c-mux-pinctrl";
+#address-cells = &amp;lt;1&amp;gt;;
+#size-cells = &amp;lt;0&amp;gt;;
+
+i2c-parent = &amp;lt;&amp;amp;i2c1&amp;gt;;
+
+pinctrl-names = "ddc", "pta", "idle";
+pinctrl-0 = &amp;lt;&amp;amp;state_i2cmux_ddc&amp;gt;;
+pinctrl-1 = &amp;lt;&amp;amp;state_i2cmux_pta&amp;gt;;
+pinctrl-2 = &amp;lt;&amp;amp;state_i2cmux_idle&amp;gt;;
+
+i2c&amp;lt; at &amp;gt;0 {
+reg = &amp;lt;0&amp;gt;;
+#address-cells = &amp;lt;1&amp;gt;;
+#size-cells = &amp;lt;0&amp;gt;;
+
+eeprom {
+compatible = "eeprom";
+reg = &amp;lt;0x50&amp;gt;;
+};
+};
+
+i2c&amp;lt; at &amp;gt;1 {
+reg = &amp;lt;1&amp;gt;;
+#address-cells = &amp;lt;1&amp;gt;;
+#size-cells = &amp;lt;0&amp;gt;;
+
+eeprom {
+compatible = "eeprom";
+reg = &amp;lt;0x50&amp;gt;;
+};
+};
+};
+
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index beb2491..a0edd98 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -37,4 +37,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; config I2C_MUX_PCA954x
   This driver can also be built as a module.  If so, the module
   will be called i2c-mux-pca954x.
 
+config I2C_MUX_PINCTRL
+tristate "pinctrl-based I2C multiplexer"
+depends on PINCTRL
+help
+  If you say yes to this option, support will be included for an I2C
+  multiplexer that uses the pinctrl subsystem, i.e. pin multiplexing.
+  This is useful for SoCs whose I2C module's signals can be routed to
+  different sets of pins at run-time.
+
+  This driver can also be built as a module. If so, the module will be
+  called pinctrl-i2cmux.
+
 endmenu
diff --git a/drivers/i2c/muxes/Makefile b/drivers/i2c/muxes/Makefile
index 5826249..76da869 100644
--- a/drivers/i2c/muxes/Makefile
+++ b/drivers/i2c/muxes/Makefile
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4,5 +4,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 obj-$(CONFIG_I2C_MUX_GPIO)+= i2c-mux-gpio.o
 obj-$(CONFIG_I2C_MUX_PCA9541)+= i2c-mux-pca9541.o
 obj-$(CONFIG_I2C_MUX_PCA954x)+= i2c-mux-pca954x.o
+obj-$(CONFIG_I2C_MUX_PINCTRL)+= i2c-mux-pinctrl.o
 
 ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
new file mode 100644
index 0000000..46a6697
--- /dev/null
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,279 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * I2C multiplexer using pinctrl API
+ *
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+ */
+
+#include &amp;lt;linux/i2c.h&amp;gt;
+#include &amp;lt;linux/i2c-mux.h&amp;gt;
+#include &amp;lt;linux/init.h&amp;gt;
+#include &amp;lt;linux/module.h&amp;gt;
+#include &amp;lt;linux/of_i2c.h&amp;gt;
+#include &amp;lt;linux/pinctrl/consumer.h&amp;gt;
+#include &amp;lt;linux/i2c-mux-pinctrl.h&amp;gt;
+#include &amp;lt;linux/platform_device.h&amp;gt;
+#include &amp;lt;linux/slab.h&amp;gt;
+
+struct i2c_mux_pinctrl {
+struct device *dev;
+struct i2c_mux_pinctrl_platform_data *pdata;
+struct pinctrl *pinctrl;
+struct pinctrl_state **states;
+struct pinctrl_state *state_idle;
+struct i2c_adapter *parent;
+struct i2c_adapter **busses;
+};
+
+static int i2c_mux_pinctrl_select(struct i2c_adapter *adap, void *data,
+  u32 chan)
+{
+struct i2c_mux_pinctrl *mux = data;
+
+return pinctrl_select_state(mux-&amp;gt;pinctrl, mux-&amp;gt;states[chan]);
+}
+
+static int i2c_mux_pinctrl_deselect(struct i2c_adapter *adap, void *data,
+    u32 chan)
+{
+struct i2c_mux_pinctrl *mux = data;
+
+return pinctrl_select_state(mux-&amp;gt;pinctrl, mux-&amp;gt;state_idle);
+}
+
+#ifdef CONFIG_OF
+static int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux,
+struct platform_device *pdev)
+{
+struct device_node *np = pdev-&amp;gt;dev.of_node;
+int num_names, i, ret;
+struct device_node *adapter_np;
+struct i2c_adapter *adapter;
+
+if (!np)
+return 0;
+
+mux-&amp;gt;pdata = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*mux-&amp;gt;pdata), GFP_KERNEL);
+if (!mux-&amp;gt;pdata) {
+dev_err(mux-&amp;gt;dev,
+"Cannot allocate i2c_mux_pinctrl_platform_data\n");
+return -ENOMEM;
+}
+
+num_names = of_property_count_strings(np, "pinctrl-names");
+if (num_names &amp;lt; 0) {
+dev_err(mux-&amp;gt;dev, "Cannot parse pinctrl-names: %d\n",
+num_names);
+return num_names;
+}
+
+mux-&amp;gt;pdata-&amp;gt;pinctrl_states = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev,
+sizeof(*mux-&amp;gt;pdata-&amp;gt;pinctrl_states) * num_names,
+GFP_KERNEL);
+if (!mux-&amp;gt;pdata-&amp;gt;pinctrl_states) {
+dev_err(mux-&amp;gt;dev, "Cannot allocate pinctrl_states\n");
+return -ENOMEM;
+}
+
+for (i = 0; i &amp;lt; num_names; i++) {
+ret = of_property_read_string_index(np, "pinctrl-names", i,
+&amp;amp;mux-&amp;gt;pdata-&amp;gt;pinctrl_states[mux-&amp;gt;pdata-&amp;gt;bus_count]);
+if (ret &amp;lt; 0) {
+dev_err(mux-&amp;gt;dev, "Cannot parse pinctrl-names: %d\n",
+ret);
+return ret;
+}
+if (!strcmp(mux-&amp;gt;pdata-&amp;gt;pinctrl_states[mux-&amp;gt;pdata-&amp;gt;bus_count],
+    "idle")) {
+if (i != num_names - 1) {
+dev_err(mux-&amp;gt;dev, "idle state must be last\n");
+return -EINVAL;
+}
+mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle = "idle";
+} else {
+mux-&amp;gt;pdata-&amp;gt;bus_count++;
+}
+}
+
+adapter_np = of_parse_phandle(np, "i2c-parent", 0);
+if (!adapter_np) {
+dev_err(mux-&amp;gt;dev, "Cannot parse i2c-parent\n");
+return -ENODEV;
+}
+adapter = of_find_i2c_adapter_by_node(adapter_np);
+if (!adapter) {
+dev_err(mux-&amp;gt;dev, "Cannot find parent bus\n");
+return -ENODEV;
+}
+mux-&amp;gt;pdata-&amp;gt;parent_bus_num = i2c_adapter_id(adapter);
+put_device(&amp;amp;adapter-&amp;gt;dev);
+
+return 0;
+}
+#else
+static inline int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux,
+   struct platform_device *pdev)
+{
+return 0;
+}
+#endif
+
+static int __devinit i2c_mux_pinctrl_probe(struct platform_device *pdev)
+{
+struct i2c_mux_pinctrl *mux;
+int (*deselect)(struct i2c_adapter *, void *, u32);
+int i, ret;
+
+mux = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*mux), GFP_KERNEL);
+if (!mux) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot allocate i2c_mux_pinctrl\n");
+ret = -ENOMEM;
+goto err;
+}
+platform_set_drvdata(pdev, mux);
+
+mux-&amp;gt;dev = &amp;amp;pdev-&amp;gt;dev;
+
+mux-&amp;gt;pdata = pdev-&amp;gt;dev.platform_data;
+if (!mux-&amp;gt;pdata) {
+ret = i2c_mux_pinctrl_parse_dt(mux, pdev);
+if (ret &amp;lt; 0)
+goto err;
+}
+if (!mux-&amp;gt;pdata) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Missing platform data\n");
+ret = -ENODEV;
+goto err;
+}
+
+mux-&amp;gt;states = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev,
+   sizeof(*mux-&amp;gt;states) * mux-&amp;gt;pdata-&amp;gt;bus_count,
+   GFP_KERNEL);
+if (!mux-&amp;gt;states) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot allocate states\n");
+ret = -ENOMEM;
+goto err;
+}
+
+mux-&amp;gt;busses = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev,
+   sizeof(mux-&amp;gt;busses) * mux-&amp;gt;pdata-&amp;gt;bus_count,
+   GFP_KERNEL);
+if (!mux-&amp;gt;states) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot allocate busses\n");
+ret = -ENOMEM;
+goto err;
+}
+
+mux-&amp;gt;pinctrl = devm_pinctrl_get(&amp;amp;pdev-&amp;gt;dev);
+if (IS_ERR(mux-&amp;gt;pinctrl)) {
+ret = PTR_ERR(mux-&amp;gt;pinctrl);
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot get pinctrl: %d\n", ret);
+goto err;
+}
+for (i = 0; i &amp;lt; mux-&amp;gt;pdata-&amp;gt;bus_count; i++) {
+mux-&amp;gt;states[i] = pinctrl_lookup_state(mux-&amp;gt;pinctrl,
+mux-&amp;gt;pdata-&amp;gt;pinctrl_states[i]);
+if (IS_ERR(mux-&amp;gt;states[i])) {
+ret = PTR_ERR(mux-&amp;gt;states[i]);
+dev_err(&amp;amp;pdev-&amp;gt;dev,
+"Cannot look up pinctrl state %s: %d\n",
+mux-&amp;gt;pdata-&amp;gt;pinctrl_states[i], ret);
+goto err;
+}
+}
+if (mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle) {
+mux-&amp;gt;state_idle = pinctrl_lookup_state(mux-&amp;gt;pinctrl,
+mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle);
+if (IS_ERR(mux-&amp;gt;state_idle)) {
+ret = PTR_ERR(mux-&amp;gt;state_idle);
+dev_err(&amp;amp;pdev-&amp;gt;dev,
+"Cannot look up pinctrl state %s: %d\n",
+mux-&amp;gt;pdata-&amp;gt;pinctrl_state_idle, ret);
+goto err;
+}
+
+deselect = i2c_mux_pinctrl_deselect;
+} else {
+deselect = NULL;
+}
+
+mux-&amp;gt;parent = i2c_get_adapter(mux-&amp;gt;pdata-&amp;gt;parent_bus_num);
+if (!mux-&amp;gt;parent) {
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Parent adapter (%d) not found\n",
+mux-&amp;gt;pdata-&amp;gt;parent_bus_num);
+ret = -ENODEV;
+goto err;
+}
+
+for (i = 0; i &amp;lt; mux-&amp;gt;pdata-&amp;gt;bus_count; i++) {
+u32 bus = mux-&amp;gt;pdata-&amp;gt;base_bus_num ?
+(mux-&amp;gt;pdata-&amp;gt;base_bus_num + i) : 0;
+
+mux-&amp;gt;busses[i] = i2c_add_mux_adapter(mux-&amp;gt;parent, &amp;amp;pdev-&amp;gt;dev,
+     mux, bus, i,
+     i2c_mux_pinctrl_select,
+     deselect);
+if (!mux-&amp;gt;busses[i]) {
+ret = -ENODEV;
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to add adapter %d\n", i);
+goto err_del_adapter;
+}
+}
+
+return 0;
+
+err_del_adapter:
+for (; i &amp;gt; 0; i--)
+i2c_del_mux_adapter(mux-&amp;gt;busses[i - 1]);
+i2c_put_adapter(mux-&amp;gt;parent);
+err:
+return ret;
+}
+
+static int __devexit i2c_mux_pinctrl_remove(struct platform_device *pdev)
+{
+struct i2c_mux_pinctrl *mux = platform_get_drvdata(pdev);
+int i;
+
+for (i = 0; i &amp;lt; mux-&amp;gt;pdata-&amp;gt;bus_count; i++)
+i2c_del_mux_adapter(mux-&amp;gt;busses[i]);
+
+i2c_put_adapter(mux-&amp;gt;parent);
+
+return 0;
+}
+
+#ifdef CONFIG_OF
+static const struct of_device_id i2c_mux_pinctrl_of_match[] __devinitconst = {
+{ .compatible = "i2c-mux-pinctrl", },
+{},
+};
+MODULE_DEVICE_TABLE(of, i2c_mux_pinctrl_of_match);
+#endif
+
+static struct platform_driver i2c_mux_pinctrl_driver = {
+.driver= {
+.name= "i2c-mux-pinctrl",
+.owner= THIS_MODULE,
+.of_match_table = of_match_ptr(i2c_mux_pinctrl_of_match),
+},
+.probe= i2c_mux_pinctrl_probe,
+.remove= __devexit_p(i2c_mux_pinctrl_remove),
+};
+module_platform_driver(i2c_mux_pinctrl_driver);
+
+MODULE_DESCRIPTION("pinctrl-based I2C multiplexer driver");
+MODULE_AUTHOR("Stephen Warren &amp;lt;swarren-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:i2c-mux-pinctrl");
diff --git a/include/linux/i2c-mux-pinctrl.h b/include/linux/i2c-mux-pinctrl.h
new file mode 100644
index 0000000..a65c864
--- /dev/null
+++ b/include/linux/i2c-mux-pinctrl.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -0,0 +1,41 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
+/*
+ * i2c-mux-pinctrl platform data
+ *
+ * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
+ */
+
+#ifndef _LINUX_I2C_MUX_PINCTRL_H
+#define _LINUX_I2C_MUX_PINCTRL_H
+
+/**
+ * struct i2c_mux_pinctrl_platform_data - Platform data for i2c-mux-pinctrl
+ * &amp;lt; at &amp;gt;parent_bus_num: Parent I2C bus number
+ * &amp;lt; at &amp;gt;base_bus_num: Base I2C bus number for the child busses. 0 for dynamic.
+ * &amp;lt; at &amp;gt;bus_count: Number of child busses. Also the number of elements in
+ *&amp;lt; at &amp;gt;pinctrl_states
+ * &amp;lt; at &amp;gt;pinctrl_states: The names of the pinctrl state to select for each child bus
+ * &amp;lt; at &amp;gt;pinctrl_state_idle: The pinctrl state to select when no child bus is being
+ *accessed. If NULL, the most recently used pinctrl state will be left
+ *selected.
+ */
+struct i2c_mux_pinctrl_platform_data {
+int parent_bus_num;
+int base_bus_num;
+int bus_count;
+const char **pinctrl_states;
+const char *pinctrl_state_idle;
+};
+
+#endif
&lt;/pre&gt;</description>
    <dc:creator>Stephen Warren</dc:creator>
    <dc:date>2012-05-17T21:17:38</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11299">
    <title>Will You Be Trusted?</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11299</link>
    <description>&lt;pre&gt;

Dear Friend,

As you read this, I don't want you to feel sorry for me,because, I
believe everyone will die someday,and am contacting you because
I really do need your help and I want you to help me with all your
effort and time for just seven to fourteen workings days of your time.I
want you to be honest and truthful with me that you will help me
with my last wish as a dying man.

Please i need a reliable person who will usethe Money($18 milliondollars)to
build orphanage home or charity organization.

Please kindly reply to my most confidential email if you are really
interested in helping me please: mr.saeed01-jjFNsPSvq+iXDw4h08c5KA&amp;lt; at &amp;gt;public.gmane.org


God be with you.

Mr.Saeed Ahmed.

----------------------------------------------------------------
FME Webmail
www.educacao.niteroi.rj.gov.br

&lt;/pre&gt;</description>
    <dc:creator>Mr.Saeed Ahmed.</dc:creator>
    <dc:date>2012-05-09T06:27:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11290">
    <title>Howto compile py-smbus with python 3.2</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11290</link>
    <description>&lt;pre&gt;Hello &amp;lt; at &amp;gt;All,

i try to compile i2c-tools-3.1.0 py-smbus, smbusmodule.c with the following command under Ubuntu 12.04:
python3.2 ./setup.py build

But it fail with the following errors:
running build
running build_ext
building 'smbus' extension
gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -I/usr/include/python3.2mu -c smbusmodule.c -o build/temp.linux-x86_64-3.2/smbusmodule.o


smbusmodule.c: In function 'SMBus_dealloc':
smbusmodule.c:94:6: error: 'SMBus' has no member named 'ob_type'
smbusmodule.c: In function 'SMBus_list_to_data':

With Python 2.7 it works. So it seems that the smbusmodule.c is written for Python 2.7.
I googled a bit, and found the following article where the changes in the c extentation between Python 2.X and Python 3 is described (espancially the ob_type problem):
http://python3porting.com/cextensions.html

Citation:
Another change in the object header is that the PyObject_HEAD macro has changed so that ob_type is now in a nested structure. This means you no longer can pick the ob_type directly from the struct, so code like ob-&amp;gt;ob_type stops working. You should replace this with Py_TYPE(ob). The Py_TYPE macro doesn't appear until Python 2.6, so to support earlier versions we make another #ifndef:
#ifndef Py_TYPE
    #define Py_TYPE(ob) (((PyObject*)(ob))-&amp;gt;ob_type)
#endif
In both cases the definitions above are taken directly from the Python 2.6 headers, where they are defined for forward compatibility purposes with Python 3. They work well in earlier Python versions as well, so this is a trick you can use as a general rule; if you need to use a macro that is defined in Python 3 and Python 2.6, just steal the Python 2.6 or Python 2.7 definition and put it inside an #ifndef.


Has anybody smbusmodule.c port to use with python 3?

With kind regards
Bernhard


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

&lt;/pre&gt;</description>
    <dc:creator>Renz, Bernhard</dc:creator>
    <dc:date>2012-05-14T11:16:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11278">
    <title>[PATCHv10 00/10] I2C fixes</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11278</link>
    <description>&lt;pre&gt;
The patch series does the following

- Warn fixes if CONFIG_PM_RUNTIME is not selected.
- In case of i2c remove register access was done without any
 get_sync fix the same.
- Folds a patch from Tasslehoff to prevent any merge conflicts.
- Prevents the XDUF flag to be set if the underflow condition is not met.
- As per discussion in [1] .Adds a patch to rename the 1p153 errata and
 use the unique id instead as the section number in the recent errata
 docs has changed.

v9:
Fix the comments from Wolfram Sang
Also update the patches with comments.

[1] http://www.spinics.net/lists/linux-i2c/msg07607.html

Tested on omap4sdp and omap3sdp.
The following changes since commit 9ff00d58a915b6747ba2e843ab2d04c712b4dc32:

  Merge tag 'for-linus-3.4-20120513' of git://git.infradead.org/linux-mtd (2012-05-13 11:33:09 -0700)

are available in the git repository at:

  git://gitorious.org/linus-tree/linus-tree.git i2c_omap-fixes

Shubhrajyoti D (9):
      I2C: OMAP: make omap_i2c_unidle/idle functions depend on CONFIG_PM_RUNTIME
      I2C: OMAP: Fix the mismatch of pm_runtime enable and disable
      I2C: OMAP: Fix the interrupt clearing in OMAP4
      I2C: OMAP: Prevent the register access after pm_runtime_put in probe
      I2C: OMAP: Don't check if wait_for_completion_timeout() returns less than zero
      I2C: OMAP: Fix the crash in i2c remove
      I2C: OMAP: Handle error check for pm runtime
      I2C: OMAP: Do not set the XUDF(Transmit underflow) if the underflow is not reached
      I2C: OMAP: Rename the 1p153 to the erratum id i462

Tasslehoff Kjappfot (1):
      I2C: OMAP: prevent the overwrite of the errata flags

 drivers/i2c/busses/i2c-omap.c |  127 ++++++++++++++++++++---------------------
 1 files changed, 62 insertions(+), 65 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Shubhrajyoti D</dc:creator>
    <dc:date>2012-05-14T08:49:48</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11267">
    <title>haalloo,</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11267</link>
    <description>&lt;pre&gt;haalloo,
how are you doing,i hope you are fine,my name is miss abi okom i got your
contact and want us to be a good friend,
please try and write back to me so that i will give you my pictures and tell
you more about me,
&lt;/pre&gt;</description>
    <dc:creator>abi</dc:creator>
    <dc:date>2012-05-12T16:55:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11259">
    <title>[PATCH] i2c: imx: convert to use managed functions</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11259</link>
    <description>&lt;pre&gt;Signed-off-by: Richard Zhao &amp;lt;richard.zhao-KZfg59tc24xl57MIdRCFDg&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 drivers/i2c/busses/i2c-imx.c |   59 ++++++++++--------------------------------
 1 file changed, 14 insertions(+), 45 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 56bce9a..927da64 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -118,7 +118,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static u16 __initdata i2c_clk_div[50][2] = {
 
 struct imx_i2c_struct {
 struct i2c_adapteradapter;
-struct resource*res;
 struct clk*clk;
 void __iomem*base;
 intirq;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -473,7 +472,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init i2c_imx_probe(struct platform_device *pdev)
 struct imxi2c_platform_data *pdata = pdev-&amp;gt;dev.platform_data;
 struct pinctrl *pinctrl;
 void __iomem *base;
-resource_size_t res_size;
 int irq, bitrate;
 int ret;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -490,25 +488,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init i2c_imx_probe(struct platform_device *pdev)
 return -ENOENT;
 }
 
-res_size = resource_size(res);
-
-if (!request_mem_region(res-&amp;gt;start, res_size, DRIVER_NAME)) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "request_mem_region failed\n");
+base = devm_request_and_ioremap(&amp;amp;pdev-&amp;gt;dev, res);
+if (!base)
 return -EBUSY;
-}
-
-base = ioremap(res-&amp;gt;start, res_size);
-if (!base) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "ioremap failed\n");
-ret = -EIO;
-goto fail1;
-}
 
-i2c_imx = kzalloc(sizeof(struct imx_i2c_struct), GFP_KERNEL);
+i2c_imx = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(struct imx_i2c_struct),
+GFP_KERNEL);
 if (!i2c_imx) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "can't allocate interface\n");
 ret = -ENOMEM;
-goto fail2;
+return ret;
 }
 
 /* Setup i2c_imx driver structure */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -520,27 +509,27 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init i2c_imx_probe(struct platform_device *pdev)
 i2c_imx-&amp;gt;adapter.dev.of_node= pdev-&amp;gt;dev.of_node;
 i2c_imx-&amp;gt;irq= irq;
 i2c_imx-&amp;gt;base= base;
-i2c_imx-&amp;gt;res= res;
 
 pinctrl = devm_pinctrl_get_select_default(&amp;amp;pdev-&amp;gt;dev);
 if (IS_ERR(pinctrl)) {
 ret = PTR_ERR(pinctrl);
-goto fail3;
+return ret;
 }
 
 /* Get I2C clock */
-i2c_imx-&amp;gt;clk = clk_get(&amp;amp;pdev-&amp;gt;dev, "i2c_clk");
+i2c_imx-&amp;gt;clk = devm_clk_get(&amp;amp;pdev-&amp;gt;dev, "i2c_clk");
 if (IS_ERR(i2c_imx-&amp;gt;clk)) {
 ret = PTR_ERR(i2c_imx-&amp;gt;clk);
 dev_err(&amp;amp;pdev-&amp;gt;dev, "can't get I2C clock\n");
-goto fail3;
+return ret;
 }
 
 /* Request IRQ */
-ret = request_irq(i2c_imx-&amp;gt;irq, i2c_imx_isr, 0, pdev-&amp;gt;name, i2c_imx);
+ret = devm_request_irq(&amp;amp;pdev-&amp;gt;dev, i2c_imx-&amp;gt;irq, i2c_imx_isr, 0,
+pdev-&amp;gt;name, i2c_imx);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "can't claim irq %d\n", i2c_imx-&amp;gt;irq);
-goto fail4;
+return ret;
 }
 
 /* Init queue */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -565,7 +554,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init i2c_imx_probe(struct platform_device *pdev)
 ret = i2c_add_numbered_adapter(&amp;amp;i2c_imx-&amp;gt;adapter);
 if (ret &amp;lt; 0) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "registration failed\n");
-goto fail5;
+return ret;
 }
 
 of_i2c_register_devices(&amp;amp;i2c_imx-&amp;gt;adapter);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -575,26 +564,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __init i2c_imx_probe(struct platform_device *pdev)
 
 dev_dbg(&amp;amp;i2c_imx-&amp;gt;adapter.dev, "claimed irq %d\n", i2c_imx-&amp;gt;irq);
 dev_dbg(&amp;amp;i2c_imx-&amp;gt;adapter.dev, "device resources from 0x%x to 0x%x\n",
-i2c_imx-&amp;gt;res-&amp;gt;start, i2c_imx-&amp;gt;res-&amp;gt;end);
+res-&amp;gt;start, res-&amp;gt;end);
 dev_dbg(&amp;amp;i2c_imx-&amp;gt;adapter.dev, "allocated %d bytes at 0x%x \n",
-res_size, i2c_imx-&amp;gt;res-&amp;gt;start);
+resource_size(res), res-&amp;gt;start);
 dev_dbg(&amp;amp;i2c_imx-&amp;gt;adapter.dev, "adapter name: \"%s\"\n",
 i2c_imx-&amp;gt;adapter.name);
 dev_dbg(&amp;amp;i2c_imx-&amp;gt;adapter.dev, "IMX I2C adapter registered\n");
 
 return 0;   /* Return OK */
-
-fail5:
-free_irq(i2c_imx-&amp;gt;irq, i2c_imx);
-fail4:
-clk_put(i2c_imx-&amp;gt;clk);
-fail3:
-kfree(i2c_imx);
-fail2:
-iounmap(base);
-fail1:
-release_mem_region(res-&amp;gt;start, resource_size(res));
-return ret; /* Return error number */
 }
 
 static int __exit i2c_imx_remove(struct platform_device *pdev)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -606,20 +583,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __exit i2c_imx_remove(struct platform_device *pdev)
 i2c_del_adapter(&amp;amp;i2c_imx-&amp;gt;adapter);
 platform_set_drvdata(pdev, NULL);
 
-/* free interrupt */
-free_irq(i2c_imx-&amp;gt;irq, i2c_imx);
-
 /* setup chip registers to defaults */
 writeb(0, i2c_imx-&amp;gt;base + IMX_I2C_IADR);
 writeb(0, i2c_imx-&amp;gt;base + IMX_I2C_IFDR);
 writeb(0, i2c_imx-&amp;gt;base + IMX_I2C_I2CR);
 writeb(0, i2c_imx-&amp;gt;base + IMX_I2C_I2SR);
 
-clk_put(i2c_imx-&amp;gt;clk);
-
-iounmap(i2c_imx-&amp;gt;base);
-release_mem_region(i2c_imx-&amp;gt;res-&amp;gt;start, resource_size(i2c_imx-&amp;gt;res));
-kfree(i2c_imx);
 return 0;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Richard Zhao</dc:creator>
    <dc:date>2012-05-12T13:02:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11258">
    <title>I2C pinctrl patches for IMX/MXS</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11258</link>
    <description>&lt;pre&gt;Hi Shawn,

I am fine with

[PATCH RESEND 4/5] i2c: imx: adopt pinctrl support
[PATCH RESEND 6/9] i2c: mxs: adopt pinctrl support

going via arm-soc, too.

Acked-by: Wolfram Sang &amp;lt;w.sang-bIcnvbaLZ9MEGnE8C9+IrQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

Thanks!

&lt;/pre&gt;</description>
    <dc:creator>Wolfram Sang</dc:creator>
    <dc:date>2012-05-12T12:48:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11241">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11241</link>
    <description>&lt;pre&gt;

&lt;/pre&gt;</description>
    <dc:creator>Mrs Sabah Halif</dc:creator>
    <dc:date>2012-05-05T18:59:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11207">
    <title>[PATCH 0/2] Add device tree probe for i2c-mxs driver</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11207</link>
    <description>&lt;pre&gt;The series adds device tree probe support for i2c-mxs driver.  It
depends on mxs clk and pinctrl series.  Since all the dependencies
will probably be solved in arm-soc tree, it will be easier to have
it go through arm-soc.

Shawn Guo (2):
      i2c: mxs: add device tree probe support
      ARM: dts: enable i2c device for imx28-evk

 Documentation/devicetree/bindings/i2c/i2c-mxs.txt |   16 ++++++++++++++++
 arch/arm/boot/dts/imx28-evk.dts                   |    6 ++++++
 arch/arm/boot/dts/imx28.dtsi                      |   14 ++++++++++++++
 drivers/i2c/busses/i2c-mxs.c                      |   13 +++++++++++++
 4 files changed, 49 insertions(+), 0 deletions(-)
&lt;/pre&gt;</description>
    <dc:creator>Shawn Guo</dc:creator>
    <dc:date>2012-05-10T07:31:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11173">
    <title>[PATCH V2 00/11] enable imx6q_sabrelite sgtl5000 audio support</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11173</link>
    <description>&lt;pre&gt;Changes since v1:

 - rebase to latest clk and pinctrl base
 - fix according v1 comments.

You can also get at:
https://github.com/riczhao/kernel-imx/tree/topics/audio

Richard Zhao (11):
  dma: imx-sdma: make channel0 operations atomic
  ARM: dts: imx6q-sabrelite: add i2c1 pinctrl support
  ASoC: imx-audmux: add pinctrl support
  ARM: dts: imx6q-sabrelite: add audmux pinctrl support
  ARM: imx6q: add ssi1_ipg clk_lookup
  ASoC: fsl_ssi: convert to use devm_clk_get
  ARM: imx6q_sabrelite: clk_register_clkdev cko1 for sgtl5000
  ARM: dts: imx6q-sabrelite: add sound device imx6q-sabrelite-sgtl5000
  ARM: dts: imx6q-sabrelite: add serial2 pinctrl support
  ARM: imx6q: change clkdev device name from xxxx.uart to xxxx.serial
  ARM: imx6q: change clkdev device name from xxxx.enet to xxxx.ethernet

 arch/arm/boot/dts/imx6q-sabrelite.dts |   20 +++++++++++
 arch/arm/boot/dts/imx6q.dtsi          |   23 +++++++++++++
 arch/arm/mach-imx/clk-imx6q.c         |   35 +++++++++++---------
 arch/arm/mach-imx/mach-imx6q.c        |   28 ++++++++++++++++
 drivers/dma/imx-sdma.c                |   57 ++++++++++++++++++---------------
 sound/soc/fsl/fsl_ssi.c               |    7 +---
 sound/soc/fsl/imx-audmux.c            |    8 +++++
 7 files changed, 132 insertions(+), 46 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Richard Zhao</dc:creator>
    <dc:date>2012-05-09T11:32:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11142">
    <title>[PATCH 0/2] i2c: open cores I2C changes for XLP</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11142</link>
    <description>&lt;pre&gt;The two patches are to support the OpenCores based I2C controller
integrated into the Netlogic XLP SoC (this is different from the
Netlogic XLR I2C controller submitted earlier).

The first patch is to register i2c devices with of_i2c_register_devices(),
which is needed to add i2c devices from the FDT. The second patch is to
support a 'regwidth' parameter (both platform and device tree), that allows
us do 16-bit or 32-bit register read/write. XLP requires 32-bit IO to its
I2C register space and will use 'regwidth = 4' in its device tree.

Please let us know your comments.

Thanks,
JC.

Ganesan Ramalingam (2):
  i2c-ocore: register OF i2c devices
  i2c-ocore: support 16 and 32-bit wide registers

 drivers/i2c/busses/i2c-ocores.c |   37 ++++++++++++++++++++++++++++++++++---
 include/linux/i2c-ocores.h      |    1 +
 2 files changed, 35 insertions(+), 3 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Jayachandran C</dc:creator>
    <dc:date>2012-05-08T13:25:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11134">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11134</link>
    <description>&lt;pre&gt;
&lt;/pre&gt;</description>
    <dc:creator>Mrs.Dorothy Peters</dc:creator>
    <dc:date>2012-05-08T00:36:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11118">
    <title>[PATCH V1 1/2] i2c: tegra: make all resource allocation through devm_*</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11118</link>
    <description>&lt;pre&gt;Use the devm_* for the memory region allocation, interrupt request,
clock handler request.
By doing this, it does not require to explicitly free it and hence
saving some code.

Signed-off-by: Laxman Dewangan &amp;lt;ldewangan-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 drivers/i2c/busses/i2c-tegra.c |   64 ++++++++++-----------------------------
 1 files changed, 17 insertions(+), 47 deletions(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 18067b3..390d379 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -106,7 +106,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * &amp;lt; at &amp;gt;adapter: core i2c layer adapter information
  * &amp;lt; at &amp;gt;clk: clock reference for i2c controller
  * &amp;lt; at &amp;gt;i2c_clk: clock reference for i2c bus
- * &amp;lt; at &amp;gt;iomem: memory resource for registers
  * &amp;lt; at &amp;gt;base: ioremapped registers cookie
  * &amp;lt; at &amp;gt;cont_id: i2c controller id, used for for packet header
  * &amp;lt; at &amp;gt;irq: irq number of transfer complete interrupt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -124,7 +123,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct tegra_i2c_dev {
 struct i2c_adapter adapter;
 struct clk *clk;
 struct clk *i2c_clk;
-struct resource *iomem;
 void __iomem *base;
 int cont_id;
 int irq;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -573,7 +571,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 struct tegra_i2c_dev *i2c_dev;
 struct tegra_i2c_platform_data *pdata = pdev-&amp;gt;dev.platform_data;
 struct resource *res;
-struct resource *iomem;
 struct clk *clk;
 struct clk *i2c_clk;
 const unsigned int *prop;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -586,50 +583,41 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 dev_err(&amp;amp;pdev-&amp;gt;dev, "no mem resource\n");
 return -EINVAL;
 }
-iomem = request_mem_region(res-&amp;gt;start, resource_size(res), pdev-&amp;gt;name);
-if (!iomem) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "I2C region already claimed\n");
-return -EBUSY;
-}
 
-base = ioremap(iomem-&amp;gt;start, resource_size(iomem));
+base = devm_request_and_ioremap(&amp;amp;pdev-&amp;gt;dev, res);
 if (!base) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot ioremap I2C region\n");
-return -ENOMEM;
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot request/ioremap I2C registers\n");
+return -EADDRNOTAVAIL;
 }
 
 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 if (!res) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "no irq resource\n");
-ret = -EINVAL;
-goto err_iounmap;
+return -EINVAL;
 }
 irq = res-&amp;gt;start;
 
-clk = clk_get(&amp;amp;pdev-&amp;gt;dev, NULL);
+clk = devm_clk_get(&amp;amp;pdev-&amp;gt;dev, NULL);
 if (IS_ERR(clk)) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "missing controller clock");
-ret = PTR_ERR(clk);
-goto err_release_region;
+return PTR_ERR(clk);
 }
 
-i2c_clk = clk_get(&amp;amp;pdev-&amp;gt;dev, "i2c");
+i2c_clk = devm_clk_get(&amp;amp;pdev-&amp;gt;dev, "i2c");
 if (IS_ERR(i2c_clk)) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "missing bus clock");
-ret = PTR_ERR(i2c_clk);
-goto err_clk_put;
+return PTR_ERR(i2c_clk);
 }
 
-i2c_dev = kzalloc(sizeof(struct tegra_i2c_dev), GFP_KERNEL);
+i2c_dev = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*i2c_dev), GFP_KERNEL);
 if (!i2c_dev) {
-ret = -ENOMEM;
-goto err_i2c_clk_put;
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Could not allocate struct tegra_i2c_dev");
+return -ENOMEM;
 }
 
 i2c_dev-&amp;gt;base = base;
 i2c_dev-&amp;gt;clk = clk;
 i2c_dev-&amp;gt;i2c_clk = i2c_clk;
-i2c_dev-&amp;gt;iomem = iomem;
 i2c_dev-&amp;gt;adapter.algo = &amp;amp;tegra_i2c_algo;
 i2c_dev-&amp;gt;irq = irq;
 i2c_dev-&amp;gt;cont_id = pdev-&amp;gt;id;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -658,13 +646,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 ret = tegra_i2c_init(i2c_dev);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to initialize i2c controller");
-goto err_free;
+return ret;
 }
 
-ret = request_irq(i2c_dev-&amp;gt;irq, tegra_i2c_isr, 0, pdev-&amp;gt;name, i2c_dev);
+ret = devm_request_irq(&amp;amp;pdev-&amp;gt;dev, i2c_dev-&amp;gt;irq,
+tegra_i2c_isr, 0, pdev-&amp;gt;name, i2c_dev);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to request irq %i\n", i2c_dev-&amp;gt;irq);
-goto err_free;
+return ret;
 }
 
 clk_enable(i2c_dev-&amp;gt;i2c_clk);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -682,38 +671,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 ret = i2c_add_numbered_adapter(&amp;amp;i2c_dev-&amp;gt;adapter);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to add I2C adapter\n");
-goto err_free_irq;
+clk_disable(i2c_dev-&amp;gt;i2c_clk);
+return ret;
 }
 
 of_i2c_register_devices(&amp;amp;i2c_dev-&amp;gt;adapter);
 
 return 0;
-err_free_irq:
-free_irq(i2c_dev-&amp;gt;irq, i2c_dev);
-err_free:
-kfree(i2c_dev);
-err_i2c_clk_put:
-clk_put(i2c_clk);
-err_clk_put:
-clk_put(clk);
-err_release_region:
-release_mem_region(iomem-&amp;gt;start, resource_size(iomem));
-err_iounmap:
-iounmap(base);
-return ret;
 }
 
 static int __devexit tegra_i2c_remove(struct platform_device *pdev)
 {
 struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 i2c_del_adapter(&amp;amp;i2c_dev-&amp;gt;adapter);
-free_irq(i2c_dev-&amp;gt;irq, i2c_dev);
-clk_put(i2c_dev-&amp;gt;i2c_clk);
-clk_put(i2c_dev-&amp;gt;clk);
-release_mem_region(i2c_dev-&amp;gt;iomem-&amp;gt;start,
-resource_size(i2c_dev-&amp;gt;iomem));
-iounmap(i2c_dev-&amp;gt;base);
-kfree(i2c_dev);
 return 0;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Laxman Dewangan</dc:creator>
    <dc:date>2012-05-07T06:46:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11115">
    <title>[PATCH V1 1/2] i2c: tegra: make all resource allocation through devm_*</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11115</link>
    <description>&lt;pre&gt;Use the devm_* for the memory region allocation, interrupt request,
clock handler request.
By doing this, it does not require to explicitly free it and hence
saving some code.

Signed-off-by: Laxman Dewangan &amp;lt;ldewangan-DDmLM1+adcrQT0dZR+AlfA&amp;lt; at &amp;gt;public.gmane.org&amp;gt;
---
 drivers/i2c/busses/i2c-tegra.c |   64 ++++++++++-----------------------------
 1 files changed, 17 insertions(+), 47 deletions(-)

diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 18067b3..390d379 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -106,7 +106,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * &amp;lt; at &amp;gt;adapter: core i2c layer adapter information
  * &amp;lt; at &amp;gt;clk: clock reference for i2c controller
  * &amp;lt; at &amp;gt;i2c_clk: clock reference for i2c bus
- * &amp;lt; at &amp;gt;iomem: memory resource for registers
  * &amp;lt; at &amp;gt;base: ioremapped registers cookie
  * &amp;lt; at &amp;gt;cont_id: i2c controller id, used for for packet header
  * &amp;lt; at &amp;gt;irq: irq number of transfer complete interrupt
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -124,7 +123,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct tegra_i2c_dev {
 struct i2c_adapter adapter;
 struct clk *clk;
 struct clk *i2c_clk;
-struct resource *iomem;
 void __iomem *base;
 int cont_id;
 int irq;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -573,7 +571,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 struct tegra_i2c_dev *i2c_dev;
 struct tegra_i2c_platform_data *pdata = pdev-&amp;gt;dev.platform_data;
 struct resource *res;
-struct resource *iomem;
 struct clk *clk;
 struct clk *i2c_clk;
 const unsigned int *prop;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -586,50 +583,41 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 dev_err(&amp;amp;pdev-&amp;gt;dev, "no mem resource\n");
 return -EINVAL;
 }
-iomem = request_mem_region(res-&amp;gt;start, resource_size(res), pdev-&amp;gt;name);
-if (!iomem) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "I2C region already claimed\n");
-return -EBUSY;
-}
 
-base = ioremap(iomem-&amp;gt;start, resource_size(iomem));
+base = devm_request_and_ioremap(&amp;amp;pdev-&amp;gt;dev, res);
 if (!base) {
-dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot ioremap I2C region\n");
-return -ENOMEM;
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Cannot request/ioremap I2C registers\n");
+return -EADDRNOTAVAIL;
 }
 
 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 if (!res) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "no irq resource\n");
-ret = -EINVAL;
-goto err_iounmap;
+return -EINVAL;
 }
 irq = res-&amp;gt;start;
 
-clk = clk_get(&amp;amp;pdev-&amp;gt;dev, NULL);
+clk = devm_clk_get(&amp;amp;pdev-&amp;gt;dev, NULL);
 if (IS_ERR(clk)) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "missing controller clock");
-ret = PTR_ERR(clk);
-goto err_release_region;
+return PTR_ERR(clk);
 }
 
-i2c_clk = clk_get(&amp;amp;pdev-&amp;gt;dev, "i2c");
+i2c_clk = devm_clk_get(&amp;amp;pdev-&amp;gt;dev, "i2c");
 if (IS_ERR(i2c_clk)) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "missing bus clock");
-ret = PTR_ERR(i2c_clk);
-goto err_clk_put;
+return PTR_ERR(i2c_clk);
 }
 
-i2c_dev = kzalloc(sizeof(struct tegra_i2c_dev), GFP_KERNEL);
+i2c_dev = devm_kzalloc(&amp;amp;pdev-&amp;gt;dev, sizeof(*i2c_dev), GFP_KERNEL);
 if (!i2c_dev) {
-ret = -ENOMEM;
-goto err_i2c_clk_put;
+dev_err(&amp;amp;pdev-&amp;gt;dev, "Could not allocate struct tegra_i2c_dev");
+return -ENOMEM;
 }
 
 i2c_dev-&amp;gt;base = base;
 i2c_dev-&amp;gt;clk = clk;
 i2c_dev-&amp;gt;i2c_clk = i2c_clk;
-i2c_dev-&amp;gt;iomem = iomem;
 i2c_dev-&amp;gt;adapter.algo = &amp;amp;tegra_i2c_algo;
 i2c_dev-&amp;gt;irq = irq;
 i2c_dev-&amp;gt;cont_id = pdev-&amp;gt;id;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -658,13 +646,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 ret = tegra_i2c_init(i2c_dev);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to initialize i2c controller");
-goto err_free;
+return ret;
 }
 
-ret = request_irq(i2c_dev-&amp;gt;irq, tegra_i2c_isr, 0, pdev-&amp;gt;name, i2c_dev);
+ret = devm_request_irq(&amp;amp;pdev-&amp;gt;dev, i2c_dev-&amp;gt;irq,
+tegra_i2c_isr, 0, pdev-&amp;gt;name, i2c_dev);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to request irq %i\n", i2c_dev-&amp;gt;irq);
-goto err_free;
+return ret;
 }
 
 clk_enable(i2c_dev-&amp;gt;i2c_clk);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -682,38 +671,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 ret = i2c_add_numbered_adapter(&amp;amp;i2c_dev-&amp;gt;adapter);
 if (ret) {
 dev_err(&amp;amp;pdev-&amp;gt;dev, "Failed to add I2C adapter\n");
-goto err_free_irq;
+clk_disable(i2c_dev-&amp;gt;i2c_clk);
+return ret;
 }
 
 of_i2c_register_devices(&amp;amp;i2c_dev-&amp;gt;adapter);
 
 return 0;
-err_free_irq:
-free_irq(i2c_dev-&amp;gt;irq, i2c_dev);
-err_free:
-kfree(i2c_dev);
-err_i2c_clk_put:
-clk_put(i2c_clk);
-err_clk_put:
-clk_put(clk);
-err_release_region:
-release_mem_region(iomem-&amp;gt;start, resource_size(iomem));
-err_iounmap:
-iounmap(base);
-return ret;
 }
 
 static int __devexit tegra_i2c_remove(struct platform_device *pdev)
 {
 struct tegra_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 i2c_del_adapter(&amp;amp;i2c_dev-&amp;gt;adapter);
-free_irq(i2c_dev-&amp;gt;irq, i2c_dev);
-clk_put(i2c_dev-&amp;gt;i2c_clk);
-clk_put(i2c_dev-&amp;gt;clk);
-release_mem_region(i2c_dev-&amp;gt;iomem-&amp;gt;start,
-resource_size(i2c_dev-&amp;gt;iomem));
-iounmap(i2c_dev-&amp;gt;base);
-kfree(i2c_dev);
 return 0;
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Laxman Dewangan</dc:creator>
    <dc:date>2012-05-07T06:44:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11085">
    <title>[PATCH 00/15] DT enablement for Snowball</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11085</link>
    <description>&lt;pre&gt;Here's your next back of DT related doings for the ux500,
along with some bugs encountered fixed along the way.

 arch/arm/boot/dts/db8500.dtsi      |  103 +++++++++++++-
 arch/arm/boot/dts/snowball.dts     |    3 +
 arch/arm/configs/u8500_defconfig   |    1 +
 arch/arm/mach-ux500/board-mop500.c |   55 ++------
 drivers/i2c/busses/i2c-nomadik.c   |   53 ++++++-
 drivers/mfd/Makefile               |    5 +-
 drivers/mfd/ab8500-core.c          |  165 +++++++++++++++++++---
 drivers/mfd/ab8500-i2c.c           |  128 -----------------
 drivers/mfd/db8500-prcmu.c         |   30 ++--
 drivers/power/ab8500_btemp.c       |   12 +-
 drivers/power/ab8500_charger.c     |   12 +-
 drivers/power/ab8500_fg.c          |   12 +-
 drivers/regulator/ab8500.c         |  273 +++++++++++++++++++++++-------------

&lt;/pre&gt;</description>
    <dc:creator>Lee Jones</dc:creator>
    <dc:date>2012-05-04T18:23:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.linux.drivers.i2c/11077">
    <title>[PATCH V4 0/2] I2C: Add bus recovery infrastructure</title>
    <link>http://comments.gmane.org/gmane.linux.drivers.i2c/11077</link>
    <description>&lt;pre&gt;Hi Wolfram,

This patchset adds i2c bus recovery infrastructure to i2c adapters as specified
in the i2c protocol Rev. 03 section 3.16 titled "Bus clear".

http://www.nxp.com/documents/user_manual/UM10204.pdf

This patch was earlier part of a separate thread:
http://www.spinics.net/lists/linux-i2c/msg07267.html

V3-&amp;gt;V4:
- created single i2c_recover_bus() routine instead of two.
- do bus recovery from i2c core files, instead of individual controller drivers.
- created separate struct for gpio configurations
- Documentation updated for bus recovery
- Renamed few variables to give clear names to them
- few prints changed to dev_dbg

V2-&amp;gt;V3:
- gpio flags are now passed from controller drivers
- added support for sda line polling
- Aligned i2c-designware driver with generic recovery support
      
Viresh Kumar (2):
  i2c/adapter: Add bus recovery infrastructure
  i2c/designware: Provide i2c bus recovery support

 Documentation/i2c/bus-recovery              |   87 +++++++++++++++
 drivers/i2c/busses/i2c-designware-core.c    |    1 -
 drivers/i2c/busses/i2c-designware-platdrv.c |   31 +++++
 drivers/i2c/i2c-core.c                      |  160 +++++++++++++++++++++++++++
 drivers/i2c/i2c-mux.c                       |    9 ++-
 include/linux/i2c.h                         |   58 ++++++++++
 include/linux/i2c/i2c-designware.h          |   49 ++++++++
 7 files changed, 393 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/i2c/bus-recovery
 create mode 100644 include/linux/i2c/i2c-designware.h

&lt;/pre&gt;</description>
    <dc:creator>Viresh Kumar</dc:creator>
    <dc:date>2012-05-04T09:40:58</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.linux.drivers.i2c">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.drivers.i2c</link>
  </textinput>
</rdf:RDF>

