linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] devicetree cleanup for i2c muxes/arbs/gates
@ 2016-07-27  8:43 Peter Rosin
  2016-07-27  8:43 ` [PATCH 1/7] dt-bindings: i2c: add support for 'i2c-mux' subnode Peter Rosin
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Peter Rosin @ 2016-07-27  8:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Rosin, Wolfram Sang, Rob Herring, Mark Rutland,
	Guenter Roeck, David S. Miller, Greg Kroah-Hartman,
	Andrew Morton, Kalle Valo, Mauro Carvalho Chehab, Emil Velikov,
	linux-i2c, devicetree, Crestez Dan Leonard

Hi!

The nxp pca9541 chip does not have any devicetree bindings.
When trying to write such bindings matching the implementation,
I stumbled upon something which I did not like. I had to
give the node holding the i2c child bus a 'reg' property that
is left unused and is really odd to explain from a devicetree
point of view. It really is a leftover from the fact that linux
implements i2c arbitrators (and i2c gates) using the i2c mux
code. See this thread for history [1].

This series resolves the issues, and maintains backwards compat
with old device trees (well, one could, in theory, create a
device tree that would break with these changes, but my guess
is that the odds for that happening inadvertedly are high...)

This should also help Crestez Dan Leonard with the mpu6050
series containing the changes for its auxiliary i2c master [2],
especially if you also consider the recent (very similar) changes
from Jon Hunter that adds an optional 'i2c-bus' subnode [3].

If this is ok, I will follow up with patches for other drivers
so that they inform the i2c mux core if they are muxes, arbs or
gates. As stated, they will continue to work with these changes,
so there is no huge rush.

The mux core does not really need to differentiate between
arbitrators and gates. Should they be folded? What to call them
in that case?

Cheers,
Peter

[1] https://lkml.org/lkml/2016/6/27/203
[2] https://lkml.org/lkml/2016/5/18/355
[3] https://patchwork.ozlabs.org/patch/641934/

Peter Rosin (7):
  dt-bindings: i2c: add support for 'i2c-mux' subnode
  dt-bindings: i2c: add support for 'i2c-arb' subnode
  dt-bindings: i2c: add support for 'i2c-gate' subnode
  dt-bindings: i2c: add bindings for nxp,pca9541
  i2c: mux: add support for 'i2c-mux', 'i2c-arb' and 'i2c-gate' DT
    subnodes
  i2c: pca9541: add device tree binding
  i2c: pca954x: add device tree binding

 .../bindings/i2c/i2c-arb-gpio-challenge.txt        |  8 +---
 Documentation/devicetree/bindings/i2c/i2c-arb.txt  | 35 ++++++++++++++++
 Documentation/devicetree/bindings/i2c/i2c-gate.txt | 35 ++++++++++++++++
 Documentation/devicetree/bindings/i2c/i2c-mux.txt  | 23 ++++++++---
 .../devicetree/bindings/i2c/nxp,pca9541.txt        | 29 ++++++++++++++
 MAINTAINERS                                        |  2 +
 drivers/i2c/i2c-mux.c                              | 44 +++++++++++++++++----
 drivers/i2c/muxes/i2c-mux-pca9541.c                |  8 ++++
 drivers/i2c/muxes/i2c-mux-pca954x.c                | 46 ++++++++++++++++------
 include/linux/i2c-mux.h                            |  8 +++-
 10 files changed, 205 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-arb.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-gate.txt
 create mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9541.txt

-- 
2.1.4

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

end of thread, other threads:[~2016-07-31 22:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-27  8:43 [PATCH 0/7] devicetree cleanup for i2c muxes/arbs/gates Peter Rosin
2016-07-27  8:43 ` [PATCH 1/7] dt-bindings: i2c: add support for 'i2c-mux' subnode Peter Rosin
2016-07-29 21:17   ` Rob Herring
2016-07-27  8:43 ` [PATCH 2/7] dt-bindings: i2c: add support for 'i2c-arb' subnode Peter Rosin
2016-07-29 21:24   ` Rob Herring
2016-07-27  8:43 ` [PATCH 3/7] dt-bindings: i2c: add support for 'i2c-gate' subnode Peter Rosin
2016-07-29 21:25   ` Rob Herring
2016-07-31 22:05     ` Peter Rosin
2016-07-27  8:43 ` [PATCH 4/7] dt-bindings: i2c: add bindings for nxp,pca9541 Peter Rosin
2016-07-29 21:27   ` Rob Herring
2016-07-27  8:43 ` [PATCH 5/7] i2c: mux: add support for 'i2c-mux', 'i2c-arb' and 'i2c-gate' DT subnodes Peter Rosin
2016-07-27  8:43 ` [PATCH 6/7] i2c: pca9541: add device tree binding Peter Rosin
2016-07-27  8:43 ` [PATCH 7/7] i2c: pca954x: " Peter Rosin

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