summaryrefslogtreecommitdiff
path: root/include/gpio.h
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2014-07-09 10:58:55 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-17 00:39:47 +0000
commit1e73a1ba06b7879de3b03c7cefec9135bf73fcf5 (patch)
treeb505dc075465c02b383062e0f6ed15c8a4d2acc7 /include/gpio.h
parent950894b27e7c97af15738e56e0ecd2fd8abd4874 (diff)
downloadchrome-ec-1e73a1ba06b7879de3b03c7cefec9135bf73fcf5.tar.gz
GPIO: Reduce code duplication in STM32 gpio driver
Previously the F0 and L variants had almost identical driver files and the F variant shared about half of its driver. This refactor moves the shared code into gpio.c and gpio-f0-l.c, the latter is for code shared between the F0 and L variants. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Followed by manual testing of interrupt on change and UART functionality on STM32F0 based discovery board. Change-Id: I920babd1861548272af2857c8bd3e4f9dac4985c Reviewed-on: https://chromium-review.googlesource.com/207986 Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r--include/gpio.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/gpio.h b/include/gpio.h
index 093d1566f2..3f76d43bfd 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -201,4 +201,20 @@ 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);
+/**
+ * Return true if the EC is warm booting.
+ *
+ * This function is used by the GPIO implementation and should not be called
+ * outside of that context.
+ */
+int gpio_is_reboot_warm(void);
+
+/**
+ * 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);
+
#endif /* __CROS_EC_GPIO_H */