kernel_optimize_test/drivers/i2c/muxes
Linus Walleij d308dfbf62 i2c: mux/i801: Switch to use descriptor passing
This switches the i801 GPIO mux to use GPIO descriptors for
handling the GPIO lines. The previous hack which was reaching
inside the GPIO chips etc cannot live on. We pass descriptors
along with the GPIO mux device at creation instead.

The GPIO mux was only used by way of platform data with a
platform device from one place in the kernel: the i801 i2c bus
driver. Let's just associate the GPIO descriptor table with
the actual device like everyone else and dynamically create
a descriptor table passed along with the GPIO i2c mux.

This enables simplification of the GPIO i2c mux driver to
use only the descriptor API and the OF probe path gets
simplified in the process.

The i801 driver was registering the GPIO i2c mux with
PLATFORM_DEVID_AUTO which would make it hard to predict the
device name and assign the descriptor table properly, but
this seems to be a mistake to begin with: all of the
GPIO mux devices are hardcoded to look up GPIO lines from
the "gpio_ich" GPIO chip. If there are more than one mux,
there is certainly more than one gpio chip as well, and
then we have more serious problems. Switch to
PLATFORM_DEVID_NONE instead. There can be only one.

Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Peter Rosin <peda@axentia.se>
Cc: Jean Delvare <jdelvare@suse.com>
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[Removed a newline, suggested by Andy. /Peter]
Signed-off-by: Peter Rosin <peda@axentia.se>
2019-06-22 07:01:34 +02:00
..
i2c-arb-gpio-challenge.c i2c: mux: arb-gpio: Rewrite to use GPIO descriptors 2019-06-10 09:28:50 +02:00
i2c-demux-pinctrl.c Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-5.2 2019-05-03 15:20:58 +02:00
i2c-mux-gpio.c i2c: mux/i801: Switch to use descriptor passing 2019-06-22 07:01:34 +02:00
i2c-mux-gpmux.c i2c: Convert to using %pOFn instead of device_node.name 2018-10-05 14:10:40 +02:00
i2c-mux-ltc4306.c i2c: mux: ltc4306: simplify code to reach the adapter 2018-10-08 23:44:27 +02:00
i2c-mux-mlxcpld.c i2c: mux: mlxcpld: simplify code to reach the adapter 2018-10-08 23:44:28 +02:00
i2c-mux-pca954x.c i2c: mux: pca954x: allow management of device idle state via sysfs 2019-04-21 23:44:37 +02:00
i2c-mux-pca9541.c i2c: mux: pca9541: remove support for unused platform data 2019-04-21 23:44:37 +02:00
i2c-mux-pinctrl.c i2c: mux: pinctrl: use flexible-array member and struct_size() helper 2019-06-10 09:28:56 +02:00
i2c-mux-reg.c Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00