gpio_smartbond: Set pin to input when it is configured as GPIO_DISCONNECTED
Set pin to input with no resistors selected when it is configured as GPIO_DISCONNECTED. Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
This commit is contained in:
parent
bacd6c31d6
commit
df86860319
1 changed files with 2 additions and 4 deletions
|
|
@ -17,8 +17,6 @@
|
|||
#include <da1469x_pdc.h>
|
||||
#include <da1469x_pd.h>
|
||||
|
||||
#define GPIO_MODE_RESET 0x200
|
||||
|
||||
#define GPIO_PUPD_INPUT 0
|
||||
#define GPIO_PUPD_INPUT_PU 1
|
||||
#define GPIO_PUPD_INPUT_PD 2
|
||||
|
|
@ -117,8 +115,8 @@ static int gpio_smartbond_pin_configure(const struct device *dev,
|
|||
const struct gpio_smartbond_config *config = dev->config;
|
||||
|
||||
if (flags == GPIO_DISCONNECTED) {
|
||||
/* Reset to default value */
|
||||
config->mode_regs[pin] = GPIO_MODE_RESET;
|
||||
/* Set pin as input with no resistors selected */
|
||||
config->mode_regs[pin] = GPIO_PUPD_INPUT << GPIO_P0_00_MODE_REG_PUPD_Pos;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue