diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2019-10-25 03:38:30 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-01 02:46:00 +0000 |
commit | 3b390264a415ce121a8c6f8db9fa9c42c647aaec (patch) | |
tree | ef137798bf0672d035e644784c27f2f7162d3db2 /chip/mt_scp | |
parent | 946402100fd0589b5480eebd8444a7c3eb9b6aa5 (diff) | |
download | chrome-ec-3b390264a415ce121a8c6f8db9fa9c42c647aaec.tar.gz |
Cleanup: Correct GPIO alternate function parameter
Added code to correct the GPIO alternate function parameter at Chipset
level. Optionally board level functions can cleanup the code in additional
change lists.
BUG=b:139427854
BRANCH=none
TEST=make buildall -j
Change-Id: I1171ca36a703291070fc89f972f84414adcf04fc
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1880974
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'chip/mt_scp')
-rw-r--r-- | chip/mt_scp/gpio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/mt_scp/gpio.c b/chip/mt_scp/gpio.c index 896baab93a..736a961951 100644 --- a/chip/mt_scp/gpio.c +++ b/chip/mt_scp/gpio.c @@ -12,13 +12,14 @@ #include "task.h" #include "util.h" -void gpio_set_alternate_function(uint32_t port, uint32_t mask, int func) +void gpio_set_alternate_function(uint32_t port, uint32_t mask, + enum gpio_alternate_func func) { int bit, mode_reg_index, shift; uint32_t mode_bits, mode_mask; /* Up to 8 alt functions per port */ - if (func > 7) + if (func > GPIO_ALT_FUNC_7) return; while (mask) { |