]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
i2c: mux: add support for 'i2c-mux', 'i2c-arb' and 'i2c-gate' DT subnodes
authorPeter Rosin <peda@axentia.se>
Sat, 9 Jul 2016 19:53:42 +0000 (21:53 +0200)
committerPeter Rosin <peda@axentia.se>
Thu, 25 Aug 2016 20:11:02 +0000 (22:11 +0200)
commitb2d57b56047b99f2992fc958d7ac5ead283e9088
treeb5df552ab814d3c1fb852a941b361b767cf14015
parent8f7720b950cf42d316fe5b625867e163a260a83c
i2c: mux: add support for 'i2c-mux', 'i2c-arb' and 'i2c-gate' DT subnodes

Backwards compatibility is preserved; the subnodes are in practice
optional.

However, the mux core needs to know what subnode it should examine, so add
a couple of new flags for i2c_mux_alloc for this purpose.

The rule is that if the mux core finds a 'reg' property in the appropriate
subnode, e.g. if 'reg' exists in the 'i2c-mux' subnode, then the mux core
will assume that this is an old style entry and not an i2c-mux subnode
(correspondingly for arbitrators and gates with 'i2c-arb' and 'i2c-gate').

Reviewed-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Peter Rosin <peda@axentia.se>
drivers/i2c/i2c-mux.c
include/linux/i2c-mux.h