new pinctrl API #37621
@mbolivar-nordic need to see how we handle
From a usage point of view, having
So we could do something like:
I see a problem with this approach when it comes to runtime support (considering we want to have such feature).
Pin configuration can usually be changed only if a device is turned off. Let's assume for a moment that we had
With the approach proposed in this PR, step (2) can't be performed. An application can configure pins on its own, but I assume this is only useful if the application is directly managing the device, that is, without using a Zephyr driver. As an example: a device driver that implements power management and uses pinctrl would overwrite any pinctrl change made by the application as soon as it runs PM hooks. This is difficult to solve if the driver stores its own pinctrl settings internally.
In some cases such as nRF or STM32F1 it is necessary to know the device register address to configure pins (some pin settings are stored in each device registers or there are actions to be taken that are device dependent).
Update driver to use new pinctrl APIs to setup pins. Signed-off-by: Piotr Mienkowski <email@example.com>
Update driver to use new pinctrl APIs to setup pins Signed-off-by: Kumar Gala <firstname.lastname@example.org
Add initial support for nRF pin controller driver. The implementation in this patch does not yet support any peripheral. Only states representation and basic driver functionality is introduced. Signed-off-by: Gerard Marull-Paretas <email@example.com>
Add support for managing UARTE peripheral pins. Signed-off-by: Gerard Marull-Paretas <firstname.lastname@example.org>
This patch replaces driver specific pin configuration code with the new pinctrl generic API. Notes: - uart driver has not been ported yet (this is an RFC!) - Some build assertions cannot be performed since the driver does not have direct access to pin settings anymore. As a result user will not be notified if HWFC is enabled but RTS/CTS pins are not configured. - Some RX enable checks that were performed using pin information has been replaced with a DT property that informs if RX is enabled or not. Signed-off-by: Gerard Marull-Paretas <email@example.com>
tweaks to uarte driver to build with pinctrl API Signed-off-by: Kumar Gala <firstname.lastname@example.org>
This patch changes old pin based configuration to the state based pinctrl configuration. All pin selection and GPIO configuration are now described in devicetree. Signed-off-by: Gerard Marull-Paretas <email@example.com>