summaryrefslogtreecommitdiff
path: root/chip/mt_scp
diff options
context:
space:
mode:
Diffstat (limited to 'chip/mt_scp')
-rw-r--r--chip/mt_scp/gpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/chip/mt_scp/gpio.c b/chip/mt_scp/gpio.c
index 736a961951..a4896aae72 100644
--- a/chip/mt_scp/gpio.c
+++ b/chip/mt_scp/gpio.c
@@ -22,6 +22,9 @@ void gpio_set_alternate_function(uint32_t port, uint32_t mask,
if (func > GPIO_ALT_FUNC_7)
return;
+ if (func == GPIO_ALT_FUNC_NONE)
+ func = GPIO_ALT_FUNC_DEFAULT;
+
while (mask) {
/* 32 gpio per port */
bit = get_next_bit(&mask);
@@ -175,4 +178,3 @@ void __keep gpio_interrupt(void)
}
}
DECLARE_IRQ(SCP_IRQ_EINT, gpio_interrupt, 1);
-