diff options
-rw-r--r-- | common/gpio.c | 33 | ||||
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | include/gpio.h | 13 |
3 files changed, 0 insertions, 52 deletions
diff --git a/common/gpio.c b/common/gpio.c index 76dbf58e14..cb3723f865 100644 --- a/common/gpio.c +++ b/common/gpio.c @@ -162,39 +162,6 @@ int gpio_get_ternary(enum gpio_signal signal) return pu && !pd ? 2 : pd; } -#ifdef CONFIG_GPIO_POWER_DOWN -/* - * Power down a group of GPIO pins marked with a module ID - * in board/board_name/gpio.inc - * Hibernation/sleep entry: - * gpio_power_down_module(MODULE_xxxx) - * Chip level code will power down all pins in module. - * Wake: - * Use gpio_config_module to put the module pin(s) - * back to enabled state. Chip level code will re-power - * and configure the pin(s). - * This mechanism does not handle dynamic changing of - * pin configuration at run time. - */ -int gpio_power_down_module(enum module_id id) -{ - const struct gpio_alt_func *af; - int rv = EC_ERROR_INVAL; - - /* Find pins and power down */ - for (af = gpio_alt_funcs; - af < gpio_alt_funcs + ARRAY_SIZE(gpio_alt_funcs); af++) { - if (af->module_id != id) - continue; /* Pins for some other module */ - - gpio_set_flags_by_mask(af->port, af->mask, GPIO_POWER_DOWN); - rv = EC_SUCCESS; - } - - return rv; -} -#endif /* #ifdef CONFIG_GPIO_POWER_DOWN */ - __attribute__((weak)) void gpio_set_wakepin(enum gpio_signal signal, uint32_t flags) { diff --git a/include/config.h b/include/config.h index 75193567c6..c3ad6cacd3 100644 --- a/include/config.h +++ b/include/config.h @@ -1203,12 +1203,6 @@ #undef CONFIG_IO_EXPANDER /* - * EC's supporting powering down GPIO pins. - * Add flag GPIO_POWER_DOWN and additional API's. - */ -#undef CONFIG_GPIO_POWER_DOWN - -/* * Provide common runtime layer code (tasks, hooks ...) * You want this unless you are doing a really tiny firmware. */ diff --git a/include/gpio.h b/include/gpio.h index b45c47d413..b0291b40f1 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -37,9 +37,6 @@ #define GPIO_HIB_WAKE_LOW BIT(20) /* Hibernate wake on low level */ #define GPIO_HIB_WAKE_RISING BIT(21) /* Hibernate wake on rising edge */ #define GPIO_HIB_WAKE_FALLING BIT(22) /* Hibernate wake on falling edge */ -#ifdef CONFIG_GPIO_POWER_DOWN -#define GPIO_POWER_DOWN BIT(23) /* Pin and pad is powered off */ -#endif /* Common flag combinations */ #define GPIO_OUT_LOW (GPIO_OUTPUT | GPIO_LOW) @@ -280,16 +277,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); -#ifdef CONFIG_GPIO_POWER_DOWN -/** - * Power down all GPIO pins in a module. - * - * @param id Module ID to initialize - * @return EC_SUCCESS, or non-zero if module_id is not found. - */ -int gpio_power_down_module(enum module_id id); -#endif - /** * Configure a GPIO as wake source on a given condition and enable it, or * disable it. |