gpio/omap: save and restore debounce registers
Subsystems (2)
PATCH v8 21/24 gpio/omap: save and restore debounce registers
From: Nishanth Menon <[email protected]>
GPIO debounce registers need to be saved and restored for proper functioning of driver. To save the registers, we cannot cut the clock before the save, hence move the clk disable after the save.
---
Rebased on top of:
[PATCH v8 REPOST 17/24] gpio/omap: fix debounce clock handling
drivers/gpio/gpio-omap.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
drivers/gpio/gpio-omap.c +11 -0
@@ -42,6 +42,8 @@ struct gpio_regs {u32 risingdetect;u32 fallingdetect;u32 dataout; +u32 debounce; +u32 debounce_en; };struct gpio_bank {
@@ -219,6 +221,9 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,__raw_writel (val, reg);clk_disable (bank->dbck); + + bank->context.debounce = debounce; + bank->context.debounce_en = val; } static inline void set_gpio_trigger(struct gpio_bank *bank, int gpio,
@@ -1350,6 +1355,12 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)__raw_writel (bank->context.fallingdetect, bank->base + bank->regs->fallingdetect);__raw_writel (bank->context.dataout, bank->base + bank->regs->dataout); +if (bank->dbck_enable_mask) { +__raw_writel (bank->context.debounce, bank->base + + bank->regs->debounce); +__raw_writel (bank->context.debounce_en, + bank->base + bank->regs->debounce_en); + } }#else #define omap_gpio_suspend NULL
Signature · 1 line
1.7.0.4
PATCH v8 21/24 gpio/omap: save and restore debounce registers
Quoted 4 lines · Tarun Kanti DebBarma
From: Nishanth Menon <[email protected]>
GPIO debounce registers need to be saved and restored for proper functioning of driver.
OK.
Quoted 2 lines
To save the registers, we cannot cut the clock before the save, hence move the clk disable after the save.
This patch doesn't move any clk disable.
I suspect you made some changes to the original patch from Nishanth. Please note that in the changelog. This is typically done by adding something like:
[my at email.addr: describe changes made]
just before your signoff.
Kevin
PATCH v8 21/24 gpio/omap: save and restore debounce registers
Quoted 14 lines · Kevin Hilman
Quoted 4 lines · Tarun Kanti DebBarma
From: Nishanth Menon <[email protected]>
GPIO debounce registers need to be saved and restored for proper functioning of driver.
OK.
Quoted 2 lines
To save the registers, we cannot cut the clock before the save, hence move the clk disable after the save.
This patch doesn't move any clk disable.
Quoted 7 lines
I suspect you made some changes to the original patch from Nishanth. Please note that in the changelog. ?This is typically done by adding something like:
[my at email.addr: describe changes made]
just before your signoff.
Yes, quite a bit of changes happened which not captured in the description. The save context has been moved from *_runtime_suspend() to _set_gpio_debounce() as part of your comment in v6 to reduce overhead.
Also, the clock disable is moved to *_prepare_for_idle().
I will add changelog to capture above changes.
--
Tarun
Quoted 3 lines
Kevin