OMAP3: GPIO: disable GPIO debounce clocks on idle
Ensure GPIO debounce clocks are disabled when idle. Otherwise, clocks will prevent PER powerdomain from entering retention. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
This commit is contained in:
Родитель
43ffcd9a04
Коммит
8865b9b6d5
|
@ -196,6 +196,7 @@ struct gpio_bank {
|
||||||
struct gpio_chip chip;
|
struct gpio_chip chip;
|
||||||
struct clk *dbck;
|
struct clk *dbck;
|
||||||
u32 mod_usage;
|
u32 mod_usage;
|
||||||
|
u32 dbck_enable_mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define METHOD_MPUIO 0
|
#define METHOD_MPUIO 0
|
||||||
|
@ -647,6 +648,7 @@ void omap_set_gpio_debounce(int gpio, int enable)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
|
if (cpu_is_omap34xx() || cpu_is_omap44xx()) {
|
||||||
|
bank->dbck_enable_mask = val;
|
||||||
if (enable)
|
if (enable)
|
||||||
clk_enable(bank->dbck);
|
clk_enable(bank->dbck);
|
||||||
else
|
else
|
||||||
|
@ -2054,6 +2056,9 @@ void omap2_gpio_prepare_for_idle(int power_state)
|
||||||
struct gpio_bank *bank = &gpio_bank[i];
|
struct gpio_bank *bank = &gpio_bank[i];
|
||||||
u32 l1, l2;
|
u32 l1, l2;
|
||||||
|
|
||||||
|
if (bank->dbck_enable_mask)
|
||||||
|
clk_disable(bank->dbck);
|
||||||
|
|
||||||
if (power_state > PWRDM_POWER_OFF)
|
if (power_state > PWRDM_POWER_OFF)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -2118,6 +2123,9 @@ void omap2_gpio_resume_after_idle(void)
|
||||||
struct gpio_bank *bank = &gpio_bank[i];
|
struct gpio_bank *bank = &gpio_bank[i];
|
||||||
u32 l, gen, gen0, gen1;
|
u32 l, gen, gen0, gen1;
|
||||||
|
|
||||||
|
if (bank->dbck_enable_mask)
|
||||||
|
clk_enable(bank->dbck);
|
||||||
|
|
||||||
if (!workaround_enabled)
|
if (!workaround_enabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче