diff options
author | Théo Lebrun <theo.lebrun@bootlin.com> | 2024-02-28 12:28:04 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2024-02-29 10:22:33 +0100 |
commit | 966942ae493650210b9514f3d4bfc95f78ef0129 (patch) | |
tree | 49165f05e6c0deb06377766942d72824b4aafdc6 /drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c | |
parent | gpio: nomadik: fix offset bug in nmk_pmx_set() (diff) | |
download | linux-966942ae493650210b9514f3d4bfc95f78ef0129.tar.xz linux-966942ae493650210b9514f3d4bfc95f78ef0129.zip |
gpio: nomadik: extract GPIO platform driver from drivers/pinctrl/nomadik/
Previously, drivers/pinctrl/nomadik/pinctrl-nomadik.c registered two
platform drivers: pinctrl & GPIO. Move the GPIO aspect to the
drivers/gpio/ folder, as would be expected.
Both drivers are intertwined for a reason; pinctrl requires access to
GPIO registers for pinmuxing, pull-disable, disabling interrupts while
setting the muxing and wakeup control. Information sharing is done
through a shared array containing GPIO chips and a few helper
functions. That shared array is not touched from gpio-nomadik when
CONFIG_PINCTRL_NOMADIK is not defined.
Make no change to the code that moved into gpio-nomadik; there should be
no behavior change following. A few functions are shared and header
comments are added. Checkpatch warnings are addressed. NUM_BANKS is
renamed to NMK_MAX_BANKS.
It is supported to compile gpio-nomadik without pinctrl-nomadik. The
opposite is not true.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://lore.kernel.org/r/20240228-mbly-gpio-v2-6-3ba757474006@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c')
-rw-r--r-- | drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c b/drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c index 490e0959e8be..0b4a3dd9d8c7 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik-db8500.c @@ -3,8 +3,9 @@ #include <linux/types.h> #include <linux/pinctrl/pinctrl.h> +#include <linux/gpio/driver.h> -#include "pinctrl-nomadik.h" +#include <linux/gpio/gpio-nomadik.h> /* All the pins that can be used for GPIO and some other functions */ #define _GPIO(offset) (offset) |