drivers: pinctrl: add support for dynamic pin control

Add support for dynamic pin control, that is, allow to change device pin
configuration at runtime. Because no device de-initialization is
available yet, this API has limited usage options, e.g. modify pin
configuration at early boot stage (before device driver is initialized)

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-09-13 16:30:58 +02:00 committed by Kumar Gala
commit 329f2453c5
3 changed files with 150 additions and 6 deletions

View file

@ -21,4 +21,12 @@ config PINCTRL_NON_STATIC
a driver has to be accessed externally. This can happen, for example, when
dynamic pin control is enabled or in testing environments.
config PINCTRL_DYNAMIC
bool "Enable dynamic configuration of pins"
select PINCTRL_NON_STATIC
help
When this option is enabled pin control configuration can be changed at
runtime. This can be useful, for example, to change the pins assigned to a
peripheral at early boot stages depending on a certain input.
endif # PINCTRL