Commit Graph

3 Commits (master)

Author SHA1 Message Date
Lars-Peter Clausen a205e63d12 i2c: Ignore the return value of i2c_del_mux_adapter()
i2c_del_mux_adapter() always returns 0. So all checks testing whether it will be
non zero will always evaluate to false and the conditional code is dead code.
This patch updates all callers of i2c_del_mux_adapter() to ignore its return
value and assume that it will always succeed (which it will). A subsequent
patch will make the return type of i2c_del_mux_adapter() void.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-04-02 07:07:29 +02:00
Jean Delvare eee543e824 i2c-mux: Add support for device auto-detection
Let I2C bus segments behind multiplexers have a class. This allows for
device auto-detection on these segments. As long as parent segments
don't share the same class, it should be fine.

I implemented support in drivers i2c-mux-gpio and i2c-mux-pca954x. I
left i2c-mux-pca9541 and i2c-mux-pinctrl alone for the moment as I
don't know if this feature makes sense for the use cases of these
drivers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Korsgaard <peter.korsgaard@barco.com>
Cc: David Daney <david.daney@cavium.com>
Cc: Michael Lawnick <ml.lawnick@gmx.de>
Cc: Rodolfo Giometti <giometti@linux.it>
2012-10-05 22:23:51 +02:00
Wolfram Sang b4f0b74ea3 i2c: muxes: rename first set of drivers to a standard pattern
Apply a naming pattern like in the rest of the subsystem to a first set
of mux drivers. Those drivers are the low-hanging fruit; we want to pick
them to motivate upcoming drivers to follow the new pattern. The missing
GPIO driver will be converted in a later patch.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> (pca9541)
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-05-12 14:28:17 +02:00