drivers: gpio: stm32: Keep port clock in input configuration
When pin is configured in input mode, clock is also required. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
5fab7a5173
commit
428700f709
@ -550,8 +550,8 @@ static int gpio_stm32_config(const struct device *dev,
|
||||
|
||||
gpio_stm32_configure_raw(dev, pin, pincfg, 0);
|
||||
|
||||
/* Release clock only if configuration doesn't require bank writes */
|
||||
if ((flags & GPIO_OUTPUT) == 0) {
|
||||
/* Release clock only if pin is disconnected */
|
||||
if (((flags & GPIO_OUTPUT) == 0) && ((flags & GPIO_INPUT) == 0)) {
|
||||
err = pm_device_runtime_put(dev);
|
||||
if (err < 0) {
|
||||
return err;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user