Skip to content

Commit

Permalink
Merge branch 'ib-move-axp209' of /home/linus/linux-gpio into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Walleij committed Dec 7, 2017
2 parents 33b6cb5 + e119008 commit c6e40f9
Show file tree
Hide file tree
Showing 7 changed files with 534 additions and 197 deletions.
49 changes: 47 additions & 2 deletions Documentation/devicetree/bindings/gpio/gpio-axp209.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
AXP209 GPIO controller
AXP209 GPIO & pinctrl controller

This driver follows the usual GPIO bindings found in
Documentation/devicetree/bindings/gpio/gpio.txt

This driver follows the usual pinctrl bindings found in
Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt

This driver employs the per-pin muxing pattern.

Required properties:
- compatible: Should be "x-powers,axp209-gpio"
- compatible: Should be one of:
- "x-powers,axp209-gpio"
- "x-powers,axp813-gpio"
- #gpio-cells: Should be two. The first cell is the pin number and the
second is the GPIO flags.
- gpio-controller: Marks the device node as a GPIO controller.
Expand All @@ -28,3 +35,41 @@ axp209: pmic@34 {
#gpio-cells = <2>;
};
};

The GPIOs can be muxed to other functions and therefore, must be a subnode of
axp_gpio.

Example:

&axp_gpio {
gpio0_adc: gpio0-adc {
pins = "GPIO0";
function = "adc";
};
};

&example_node {
pinctrl-names = "default";
pinctrl-0 = <&gpio0_adc>;
};

GPIOs and their functions
-------------------------

Each GPIO is independent from the other (i.e. GPIO0 in gpio_in function does
not force GPIO1 and GPIO2 to be in gpio_in function as well).

axp209
------
GPIO | Functions
------------------------
GPIO0 | gpio_in, gpio_out, ldo, adc
GPIO1 | gpio_in, gpio_out, ldo, adc
GPIO2 | gpio_in, gpio_out

axp813
------
GPIO | Functions
------------------------
GPIO0 | gpio_in, gpio_out, ldo, adc
GPIO1 | gpio_in, gpio_out, ldo
6 changes: 0 additions & 6 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ config GPIO_ATH79
Select this option to enable GPIO driver for
Atheros AR71XX/AR724X/AR913X SoC devices.

config GPIO_AXP209
tristate "X-Powers AXP209 PMIC GPIO Support"
depends on MFD_AXP20X
help
Say yes to enable GPIO support for the AXP209 PMIC

config GPIO_BCM_KONA
bool "Broadcom Kona GPIO"
depends on OF_GPIO && (ARCH_BCM_MOBILE || COMPILE_TEST)
Expand Down
1 change: 0 additions & 1 deletion drivers/gpio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ obj-$(CONFIG_GPIO_AMDPT) += gpio-amdpt.o
obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o
obj-$(CONFIG_GPIO_ATH79) += gpio-ath79.o
obj-$(CONFIG_GPIO_ASPEED) += gpio-aspeed.o
obj-$(CONFIG_GPIO_AXP209) += gpio-axp209.o
obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o
obj-$(CONFIG_GPIO_BD9571MWV) += gpio-bd9571mwv.o
obj-$(CONFIG_GPIO_BRCMSTB) += gpio-brcmstb.o
Expand Down
188 changes: 0 additions & 188 deletions drivers/gpio/gpio-axp209.c

This file was deleted.

10 changes: 10 additions & 0 deletions drivers/pinctrl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ config PINCTRL_AS3722
open drain configuration for the GPIO pins of AS3722 devices. It also
supports the GPIO functionality through gpiolib.

config PINCTRL_AXP209
tristate "X-Powers AXP209 PMIC pinctrl and GPIO Support"
depends on MFD_AXP20X
help
AXP PMICs provides multiple GPIOs that can be muxed for different
functions. This driver bundles a pinctrl driver to select the function
muxing and a GPIO driver to handle the GPIO when the GPIO function is
selected.
Say yes to enable pinctrl and GPIO support for the AXP209 PMIC

config PINCTRL_BF54x
def_bool y if BF54x
select PINCTRL_ADI2
Expand Down
1 change: 1 addition & 0 deletions drivers/pinctrl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o
obj-$(CONFIG_PINCTRL_ADI2) += pinctrl-adi2.o
obj-$(CONFIG_PINCTRL_ARTPEC6) += pinctrl-artpec6.o
obj-$(CONFIG_PINCTRL_AS3722) += pinctrl-as3722.o
obj-$(CONFIG_PINCTRL_AXP209) += pinctrl-axp209.o
obj-$(CONFIG_PINCTRL_BF54x) += pinctrl-adi2-bf54x.o
obj-$(CONFIG_PINCTRL_BF60x) += pinctrl-adi2-bf60x.o
obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o
Expand Down
Loading

0 comments on commit c6e40f9

Please sign in to comment.