linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i2c bus multiplexing (Version 2).
@ 2009-02-05 13:36 Rodolfo Giometti
       [not found] ` <1233840973-13268-1-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
  2009-12-11 22:41 ` i2c bus multiplexing (Version 2) Muralidharan Karicheri
  0 siblings, 2 replies; 23+ messages in thread
From: Rodolfo Giometti @ 2009-02-05 13:36 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA
  Cc: Jean Delvare, David Brownell, Kumar Gala, Peter Korsgaard

This patch set adds to the I2C core the ability to handle multiplexed
I2C bus topologies by presenting each multiplexed segment as a I2C
adapter.

As you can see from the changelog I had to update i2c-core since when
a real adapter (not multiplexer) driver is inserted into the kernel
_after_ an i2c multiplxer one, function i2c_add_adapter() is called
recursively (and the same for i2c_del_adapter() during module removal)
causing a kernel hang due the i2c's "core_lock" mutex.

Changelog
=========

Version 1 -> 2:
---------------

* Fixes a bug related to recursive calls of i2c_(add|del)_adapter()
  functions when main adapter is inserted or removed _after_ slave
  adapetrs (i2c multiplexers).

  This goal has been achieved by:

  a) using rwsem instead of mutex for accessing board info data struct,

  b) ignoring any active client detaching faults (see relative patch for
     further info),

  c) removing "core_lock" mutex into adapters (de)registration code.

Rodolfo

--

 b/drivers/i2c/Kconfig         |   10 +
 b/drivers/i2c/Makefile        |    3 
 b/drivers/i2c/i2c-boardinfo.c |    6 
 b/drivers/i2c/i2c-core.c      |    4 
 b/drivers/i2c/i2c-core.h      |    2 
 b/drivers/i2c/i2c-mux.c       |  180 +++++++++++++++++++++++
 b/drivers/i2c/muxes/Kconfig   |    8 +
 b/drivers/i2c/muxes/Makefile  |    6
 b/drivers/i2c/muxes/pca954x.c |  325 ++++++++++++++++++++++++++++++++++++++++++
 b/include/linux/i2c-id.h      |    3
 b/include/linux/i2c.h         |   14 +
 b/include/linux/i2c/pca954x.h |   13 +
 drivers/i2c/i2c-core.c        |   78 ++++------
 drivers/i2c/muxes/Kconfig     |    9 +
 drivers/i2c/muxes/Makefile    |    2
 15 files changed, 615 insertions(+), 48 deletions(-)

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

end of thread, other threads:[~2010-04-16 11:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05 13:36 i2c bus multiplexing (Version 2) Rodolfo Giometti
     [not found] ` <1233840973-13268-1-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
2009-02-05 13:36   ` [PATCH 1/6] i2c: put driver_unregister() out of core_lock protection Rodolfo Giometti
     [not found]     ` <1233840973-13268-2-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
2009-02-05 13:36       ` [PATCH 2/6] i2c: use rwsem instead of mutex Rodolfo Giometti
     [not found]         ` <1233840973-13268-3-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
2009-02-05 13:36           ` [PATCH 3/6] i2c: ignore active clients detaching during adapter removal Rodolfo Giometti
     [not found]             ` <1233840973-13268-4-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
2009-02-05 13:36               ` [PATCH 4/6] i2c: free adapters (de)registration from i2c "core_lock" mutex Rodolfo Giometti
     [not found]                 ` <1233840973-13268-5-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
2009-02-05 13:36                   ` [PATCH 5/6] i2c: Multiplexed I2C bus core support Rodolfo Giometti
     [not found]                     ` <1233840973-13268-6-git-send-email-giometti-k2GhghHVRtY@public.gmane.org>
2009-02-05 13:36                       ` [PATCH 6/6] i2c: driver for PCA954x I2C multiplexer series Rodolfo Giometti
2009-02-06  0:02               ` [PATCH 3/6] i2c: ignore active clients detaching during adapter removal David Brownell
     [not found]                 ` <200902051602.44036.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-02-06 10:22                   ` Rodolfo Giometti
     [not found]                     ` <20090206102220.GF28554-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-02-06 12:15                       ` Jean Delvare
     [not found]                         ` <20090206131520.232b53c3-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-06 12:59                           ` Rodolfo Giometti
     [not found]                             ` <20090206125907.GA8581-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-02-06 21:15                               ` Jean Delvare
     [not found]                                 ` <20090206221519.5fc3d2b9-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-09 13:06                                   ` Rodolfo Giometti
     [not found]                                     ` <20090209130642.GV7975-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-02-10 11:08                                       ` Jean Delvare
     [not found]                                         ` <20090210120839.23592e38-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-02-18 16:48                                           ` Rodolfo Giometti
     [not found]                                             ` <20090218164812.GA11217-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-05-28  7:50                                               ` Jean Delvare
     [not found]                                                 ` <20090528095054.03fc2df3-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-05-28  7:58                                                   ` Rodolfo Giometti
     [not found]                                                     ` <20090528075835.GH20243-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-05-28  8:22                                                       ` Jean Delvare
2009-05-29  7:28                                                   ` Rodolfo Giometti
     [not found]                                                     ` <20090529072835.GA4575-AVVDYK/kqiJWk0Htik3J/w@public.gmane.org>
2009-05-29  7:46                                                       ` Jean Delvare
2009-05-28 11:50           ` [PATCH 2/6] i2c: use rwsem instead of mutex Jean Delvare
2009-12-11 22:41 ` i2c bus multiplexing (Version 2) Muralidharan Karicheri
     [not found]   ` <loom.20091211T234046-786-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2010-04-16 11:18     ` Jean Delvare

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).