mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
GPIO: Use gpio_set_flags instead of ..._by_mask
By using gpio_set_flags where we can we remove dependencies on gpio_list and gpio_info. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None TEST=make buildall -j Change-Id: Ie5056a27b69e9c8702da90678ad7be014a04259a Reviewed-on: https://chromium-review.googlesource.com/321912 Commit-Ready: Anton Staaf <robotboy@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
@@ -454,7 +454,6 @@ uint32_t board_get_gpio_hibernate_state(uint32_t port, uint32_t pin)
|
||||
static void board_handle_reboot(void)
|
||||
{
|
||||
int flags;
|
||||
const struct gpio_info *g = &gpio_list[GPIO_BATLOW_L_PMIC_LDO_EN];
|
||||
|
||||
if (system_jumped_to_this_image())
|
||||
return;
|
||||
@@ -477,7 +476,7 @@ static void board_handle_reboot(void)
|
||||
cflush();
|
||||
|
||||
/* Bring down all rails but RTC rail (including EC power). */
|
||||
gpio_set_flags_by_mask(g->port, g->mask, GPIO_OUT_HIGH);
|
||||
gpio_set_flags(GPIO_BATLOW_L_PMIC_LDO_EN, GPIO_OUT_HIGH);
|
||||
while (1)
|
||||
; /* wait here */
|
||||
}
|
||||
|
||||
@@ -413,7 +413,6 @@ void board_set_gpio_state_hibernate(void)
|
||||
static void board_handle_reboot(void)
|
||||
{
|
||||
int flags;
|
||||
const struct gpio_info *g = &gpio_list[GPIO_BATLOW_L_PMIC_LDO_EN];
|
||||
|
||||
if (system_jumped_to_this_image())
|
||||
return;
|
||||
@@ -432,7 +431,7 @@ static void board_handle_reboot(void)
|
||||
cflush();
|
||||
|
||||
/* Bring down all rails but RTC rail (including EC power). */
|
||||
gpio_set_flags_by_mask(g->port, g->mask, GPIO_OUT_HIGH);
|
||||
gpio_set_flags(GPIO_BATLOW_L_PMIC_LDO_EN, GPIO_OUT_HIGH);
|
||||
while (1)
|
||||
; /* wait here */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user