diff options
author | Anton Staaf <robotboy@chromium.org> | 2016-03-02 09:00:43 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-03-02 20:26:20 -0800 |
commit | faa870945e5614fcc02c1e63459b93198a49fbd2 (patch) | |
tree | e249d297b83c617ef036d650a96e841c35871520 | |
parent | bb0c3687e650415314284dabe6b00c1f5a6c42da (diff) | |
download | chrome-ec-faa870945e5614fcc02c1e63459b93198a49fbd2.tar.gz |
GPIO: Move STM32 specific gpio_enabled_clocks
This function should not be part of the public GPIO API. It is only
available and used in the STM32 implementation. This moves the
prototype to a chip specific gpio.h that is used within the STM32 chip
directoy.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Manually verify GPIO functionality on discovery board
Change-Id: If9c97f8038b26815318652ca62c1132c95519fa2
Reviewed-on: https://chromium-review.googlesource.com/329968
Commit-Ready: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | chip/stm32/gpio-f0-l.c | 2 | ||||
-rw-r--r-- | chip/stm32/gpio.c | 2 | ||||
-rw-r--r-- | chip/stm32/gpio_chip.h | 16 | ||||
-rw-r--r-- | include/gpio.h | 8 |
4 files changed, 18 insertions, 10 deletions
diff --git a/chip/stm32/gpio-f0-l.c b/chip/stm32/gpio-f0-l.c index 826cb7c591..df45c15aa5 100644 --- a/chip/stm32/gpio-f0-l.c +++ b/chip/stm32/gpio-f0-l.c @@ -10,7 +10,7 @@ */ #include "common.h" -#include "gpio.h" +#include "gpio_chip.h" #include "registers.h" #include "util.h" diff --git a/chip/stm32/gpio.c b/chip/stm32/gpio.c index ee34df4565..3a5f6265c2 100644 --- a/chip/stm32/gpio.c +++ b/chip/stm32/gpio.c @@ -8,7 +8,7 @@ #include "clock.h" #include "common.h" #include "console.h" -#include "gpio.h" +#include "gpio_chip.h" #include "hooks.h" #include "registers.h" #include "system.h" diff --git a/chip/stm32/gpio_chip.h b/chip/stm32/gpio_chip.h new file mode 100644 index 0000000000..ec9da96e14 --- /dev/null +++ b/chip/stm32/gpio_chip.h @@ -0,0 +1,16 @@ +/* Copyright 2016 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_CHIP_STM32_GPIO_CHIP_H +#define __CROS_EC_CHIP_STM32_GPIO_CHIP_H + +#include "include/gpio.h" + +/** + * Enable GPIO peripheral clocks. + */ +void gpio_enable_clocks(void); + +#endif /* __CROS_EC_CHIP_STM32_GPIO_CHIP_H */ diff --git a/include/gpio.h b/include/gpio.h index 7c0a4cad22..741f41f3d7 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -225,14 +225,6 @@ void gpio_set_flags_by_mask(uint32_t port, uint32_t mask, uint32_t flags); */ void gpio_set_alternate_function(uint32_t port, uint32_t mask, int func); -/** - * Enable GPIO peripheral clocks. - * - * This function is used by the GPIO implementation and should not be called - * outside of that context. - */ -void gpio_enable_clocks(void); - /* Optional board-level function to set hibernate GPIO states. */ void board_set_gpio_hibernate_state(void) __attribute__((weak)); |