Add single register pin controller driver
Subsystems (2)
PATCH v4 1/1 Add single register pin controller driver
This patch adds a pin controller driver supporting devices using a single configuration register per pin.
---
Changes in v4:
- add James Balean's modifications according to v3 to this patch
Changes in v3:
The use of pinctrl_ops.set_state_simple wile defining CONFIG_PINCTRL_FULL seems to be wrong.
- use pinctrl_ops.set_state instead of pinctrl_ops.set_state_simple
Changes in v2:
- add a comment on function single_configure_pins() explaining the function and its parameters
- use fdt_getprop() to simplify retrieval of property 'pinctrl-single,pins' from FDT
- change the return value of single_ofdata_to_platdata() to -EINVAL in case of failure
- change the driver name from pcs_pinctrl to single_pinctrl
- minor reformatting to comply with coding style
drivers/pinctrl/Kconfig | 10 +++ drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-single.c | 142 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 drivers/pinctrl/pinctrl-single.c
drivers/pinctrl/Kconfig +10 -0
@@ -175,6 +175,16 @@ config PIC32_PINCTRL by a device tree node which contains both GPIO defintion and pin control functions. +config PINCTRL_SINGLE + bool "Single register pin-control and pin-multiplex driver" + depends on DM + help + This enables pinctrl driver for systems using a single register for + pin configuration and multiplexing. TI's AM335X SoCs are examples of + such systems. + Depending on the platform make sure to also enable OF_TRANSLATE and + eventually SPL_OF_TRANSLATE to get correct address translations. + endif source "drivers/pinctrl/meson/Kconfig"
drivers/pinctrl/Makefile +1 -0
@@ -16,3 +16,4 @@ obj-$(CONFIG_PIC32_PINCTRL) += pinctrl_pic32.o obj-$(CONFIG_PINCTRL_EXYNOS) += exynos/ obj-$(CONFIG_PINCTRL_MESON) += meson/ obj-$(CONFIG_PINCTRL_MVEBU) += mvebu/ +obj-$(CONFIG_PINCTRL_SINGLE) += pinctrl-single.o
drivers/pinctrl/pinctrl-single.c new file +142 -0
142 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v4 1/1 Add single register pin controller driver
Quoted 23 lines · Felix Brack
This patch adds a pin controller driver supporting devices using a single configuration register per pin.
Signed-off-by Felix Brack <[email protected]>---
Changes in v4:
- add James Balean's modifications according to v3 to this patchChanges in v3:
The use of pinctrl_ops.set_state_simple wile definingCONFIG_PINCTRL_FULLseems to be wrong.
- use pinctrl_ops.set_state instead of pinctrl_ops.set_state_simpleChanges in v2:
- add a comment on functionsingle_configure_pins()explaining the function and its parameters
- usefdt_getprop()to simplify retrieval of property 'pinctrl-single,pins' from FDT
- change the return value ofsingle_ofdata_to_platdata()to-EINVALin case of failure
- change the driver name frompcs_pinctrltosingle_pinctrl
- minor reformatting to comply with coding style
Quoted 5 lines
drivers/pinctrl/Kconfig | 10 +++ drivers/pinctrl/Makefile | 1 + drivers/pinctrl/pinctrl-single.c | 142 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 drivers/pinctrl/pinctrl-single.c
Applied to u-boot-dm, thanks!