drivers: gpio: gpio_sam.c: Add missing config
When added SAM4E and SAMV71 platform the huge amount of refactor left out this two configurations. This add missing configuration for all supported devices. Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This commit is contained in:
parent
43babb5d5f
commit
24a7cdea98
1 changed files with 8 additions and 2 deletions
|
@ -54,7 +54,10 @@ static int gpio_sam_port_configure(struct device *dev, u32_t mask,
|
|||
pio->PIO_IDR = mask;
|
||||
/* Disable pull-up. */
|
||||
pio->PIO_PUDR = mask;
|
||||
#if defined(CONFIG_SOC_SERIES_SAM4S) || defined(CONFIG_SOC_SERIES_SAME70)
|
||||
#if defined(CONFIG_SOC_SERIES_SAM4S) || \
|
||||
defined(CONFIG_SOC_SERIES_SAM4E) || \
|
||||
defined(CONFIG_SOC_SERIES_SAME70) || \
|
||||
defined(CONFIG_SOC_SERIES_SAMV71)
|
||||
/* Disable pull-down. */
|
||||
pio->PIO_PPDDR = mask;
|
||||
#endif
|
||||
|
@ -93,7 +96,10 @@ static int gpio_sam_port_configure(struct device *dev, u32_t mask,
|
|||
* Clear both pulls, then enable the one we need.
|
||||
*/
|
||||
pio->PIO_PUDR = mask;
|
||||
#if defined(CONFIG_SOC_SERIES_SAM4S) || defined(CONFIG_SOC_SERIES_SAME70)
|
||||
#if defined(CONFIG_SOC_SERIES_SAM4S) || \
|
||||
defined(CONFIG_SOC_SERIES_SAM4E) || \
|
||||
defined(CONFIG_SOC_SERIES_SAME70) || \
|
||||
defined(CONFIG_SOC_SERIES_SAMV71)
|
||||
pio->PIO_PPDDR = mask;
|
||||
#endif
|
||||
if (flags & GPIO_PULL_UP) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue