linux/drivers/pinctrl/mediatek
Mika Westerberg 2956b5d94a pinctrl / gpio: Introduce .set_config() callback for GPIO chips
Currently we already have two pin configuration related callbacks
available for GPIO chips .set_single_ended() and .set_debounce(). In
future we expect to have even more, which does not scale well if we need
to add yet another callback to the GPIO chip structure for each possible
configuration parameter.

Better solution is to reuse what we already have available in the
generic pinconf.

To support this, we introduce a new .set_config() callback for GPIO
chips. The callback takes a single packed pin configuration value as
parameter. This can then be extended easily beyond what is currently
supported by just adding new types to the generic pinconf enum.

If the GPIO driver is backed up by a pinctrl driver the GPIO driver can
just assign gpiochip_generic_config() (introduced in this patch) to
.set_config and that will take care configuration requests are directed
to the pinctrl driver.

We then convert the existing drivers over .set_config() and finally
remove the .set_single_ended() and .set_debounce() callbacks.

Suggested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-01-26 15:27:37 +01:00
..
Kconfig pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for MT7623 2016-02-19 10:05:14 +01:00
Makefile pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for MT7623 2016-02-19 10:05:14 +01:00
pinctrl-mt2701.c pinctrl: mtk2701: skip setting .owner 2016-02-17 17:08:47 +01:00
pinctrl-mt6397.c pinctrl: mediatek: use builtin_platform_driver 2016-11-22 10:17:28 +01:00
pinctrl-mt7623.c pinctrl: mediatek/7623: delete unnecessary .owner 2016-02-25 16:25:55 +01:00
pinctrl-mt8127.c pinctrl: mediatek: mt8* make driver explicitly non-modular 2016-01-27 14:59:31 +01:00
pinctrl-mt8135.c pinctrl: mediatek: mt8* make driver explicitly non-modular 2016-01-27 14:59:31 +01:00
pinctrl-mt8173.c pinctrl: mediatek: mt8* make driver explicitly non-modular 2016-01-27 14:59:31 +01:00
pinctrl-mtk-common.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
pinctrl-mtk-common.h pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for mt2701 2016-01-28 11:12:03 +01:00
pinctrl-mtk-mt2701.h pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for mt2701 2016-01-28 11:12:03 +01:00
pinctrl-mtk-mt6397.h pinctrl: mediatek: Add Pinctrl/GPIO driver for mt6397. 2015-05-19 11:16:17 +02:00
pinctrl-mtk-mt7623.h pinctrl: mediatek: Add Pinctrl/GPIO/EINT driver for MT7623 2016-02-19 10:05:14 +01:00
pinctrl-mtk-mt8127.h pinctrl: mediatek: add pinctrl/GPIO/EINT driver for mt8127 2015-05-19 11:17:45 +02:00
pinctrl-mtk-mt8135.h pinctrl: mediatek: Fix include directive 2015-03-18 10:58:21 +01:00
pinctrl-mtk-mt8173.h pinctrl: mt8173: set GPIO16 to usb iddig mode 2016-12-07 15:27:01 +01:00