From c0814644b003412ac81b83068028749fe8a0ae76 Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Wed, 27 Mar 2019 17:58:32 -0700 Subject: gpio: add config option for using gpio_get_flags Separate gpio_get_flags from the CONFIG_CMD_GPIO_EXTENDED, so we can enable getting the gpio flags without enabling the ability to set them. BUG=none BRANCH=cr50 TEST=none Change-Id: Ib8e3a13fdcfe8ebec4523eb070b2425b5dc28278 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/1542798 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Vadim Bendebury --- include/gpio.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/gpio.h') diff --git a/include/gpio.h b/include/gpio.h index f01cd5147e..c778c5d3a8 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -161,7 +161,11 @@ int gpio_is_implemented(enum gpio_signal signal); */ void gpio_set_flags(enum gpio_signal signal, int flags); -#ifdef CONFIG_CMD_GPIO_EXTENDED +#if defined(CONFIG_CMD_GPIO_EXTENDED) && !defined(CONFIG_GPIO_GET_EXTENDED) +#define CONFIG_GPIO_GET_EXTENDED +#endif + +#ifdef CONFIG_GPIO_GET_EXTENDED /** * Get the current flags for a signal. * -- cgit v1.2.1