i2c: mux: add common data for every i2c-mux instance
authorPeter Rosin <peda@axentia.se>
Wed, 20 Apr 2016 06:38:50 +0000 (08:38 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 22 Apr 2016 12:55:30 +0000 (14:55 +0200)
commita7ab72390b77062420fb50e4451f71c9321aae05
tree7b3482a916e30b402267c4ac37ecd9305c577308
parent1d98d0ec0ef3594901c2356773c191304703f17e
i2c: mux: add common data for every i2c-mux instance

All i2c-muxes have a parent adapter and one or many child
adapters. A mux also has some means of selection. Previously,
this was stored per child adapter, but it is only needed
to keep track of this per mux.

Add an i2c mux core, that keeps track of this consistently.

Also add some glue for users of the old interface, which will
create one implicit mux core per child adapter.

Signed-off-by: Peter Rosin <peda@axentia.se>
Tested-by: Antti Palosaari <crope@iki.fi>
Tested-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-mux.c
include/linux/i2c-mux.h