Skip to contentSkip to conversation

GPIO: OMAP: Driver Cleanup and Fixes

PATCH Superseded Tarun Kanti DebBarma 2 participants 4 messages Jun 14, 2011 – Jun 20, 2011

v2 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v2 cover GPIO: OMAP: Driver Cleanup and Fixes

This series is continuation of cleanup of OMAP GPIO driver and fixes. The cleanup include getting rid of cpu_is_* checks wherever possible, use of gpio_bank list instead of static array, use of unique platform specific value associated data member to OMAP platforms to avoid cpu_is_* checks. The series also include PM runtime support.

Baseline: git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git
Branch: wip/gpio-cleanup
commit 1bb718191ab0158837ea6633d6fbdeb08fb755dc
GPIO: OMAP: cleanup show revision, remove cpu_is checks, display only once

v2:
(1) Do special handling of non-wakeup GPIOs only on OMAP2420. Avoid this handling on OMAP3430.

(2) Isolate cleanups and fixes into separate set of patches. Keep the cleanup first followed by the fixes.

(3) Avoid calling omap_gpio_get_context_loss() directly and instead call it through function pointer in pdata initialized during init.

(4) workaround_enabled flag is not longer needed and is removed.

(5) Call pwrdm_post_transition() before calling omap_gpio_resume_after_idle().

(6) In omap2_gpio_resume_after_idle() do context restore before handling workaround.

(7) Use PM runtime framework.

(8) Modify register offset names to : wkup_status, wkup_clear, wkup_set. Also use 'base + offset' for readibility in all relevant places.

(9) Remove unwanted messages from commit section like TODO, etc.

Test Details:
* Compile tested for omap1_defconfig and omap2plus_defconfig.
* OMAP1710-H3: Bootup test.
* OMAP2430-SDP, OMAP3430-SDP, OMAP4430-SDP: Functional testing.
* PM Testing on OMAP3430-SDP: retention, off_mode, system_wide suspend and gpio wakeup.

Charulatha V (13):
OMAP: GPIO: Remove dependency on gpio_bank_count
OMAP2PLUS: GPIO: Use flag to identify wakeup domain
OMAP: GPIO: Make gpio_context part of gpio_bank structure
OMAP: GPIO: Fix pwrdm_post_transition call sequence
OMAP: GPIO: handle save/restore ctx in GPIO driver
OMAP2PLUS: GPIO: make non-wakeup GPIO part of pdata
OMAP: GPIO: Avoid cpu checks during module ena/disable
OMAP: GPIO: clean set_gpio_triggering function
OMAP: GPIO: clean omap_gpio_mod_init function
OMAP15xx: GPIO: Use pinctrl offset instead of macro
OMAP: GPIO: Fix use of readl/readw to access isr_reg
OMAP: GPIO: Remove bank->method & METHOD_* macros
OMAP: GPIO: Fix bankwidth for OMAP7xx MPUIO

Tarun Kanti DebBarma (5):
OMAP: GPIO: Use wkup regs off/suspend support flag
OMAP: GPIO: Use level/edge detect reg offsets
OMAP: GPIO: Remove hardcoded offsets in ctxt save/restore
OMAP: GPIO: use PM runtime framework
OMAP2: GPIO: clean prepare_for_idle and resume_after_idle

 arch/arm/mach-omap1/gpio15xx.c         |    7 +-
 arch/arm/mach-omap1/gpio16xx.c         |   20 +-
 arch/arm/mach-omap1/gpio7xx.c          |   14 +-
 arch/arm/mach-omap2/gpio.c             |   52 ++-
 arch/arm/mach-omap2/pm34xx.c           |   21 +-
 arch/arm/plat-omap/include/plat/gpio.h |   35 +-
 drivers/gpio/gpio-omap.c               | 1082 ++++++++++++++------------------
 7 files changed, 572 insertions(+), 659 deletions(-)
#1 lore raw

v2 cover GPIO: OMAP: Driver Cleanup and Fixes

Quoted 5 lines · Tarun Kanti DebBarma

This series is continuation of cleanup of OMAP GPIO driver and fixes. The cleanup include getting rid of cpu_is_* checks wherever possible, use of gpio_bank list instead of static array, use of unique platform specific value associated data member to OMAP platforms to avoid cpu_is_* checks. The series also include PM runtime support.

A quick test of this series on 3430/n900 shows that it prevents PER retention. I see CM_FCLKEN_PER=0000c000 (debounce clock for GPIO banks 3 & 4 are still enabled.)

Can you retest with debounce enabled on one of the GPIOs for one of your platforms?

Kevin

#2 lore raw

v2 cover GPIO: OMAP: Driver Cleanup and Fixes

Quoted 16 lines

-----Original Message-----
From: Hilman, Kevin
Sent: Thursday, June 16, 2011 9:46 PM
To: DebBarma, Tarun Kanti
Cc: linux-omap at vger.kernel.org; Shilimkar, Santosh; tony at atomide.com; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH v2 00/18] GPIO: OMAP: Driver Cleanup and Fixes

Quoted 5 lines · Tarun Kanti DebBarma

This series is continuation of cleanup of OMAP GPIO driver and fixes. The cleanup include getting rid of cpu_is_* checks wherever possible, use of gpio_bank list instead of static array, use of unique platform specific value associated data member to OMAP platforms to avoid cpu_is_* checks. The series also include PM runtime support.

Quoted 6 lines

A quick test of this series on 3430/n900 shows that it prevents PER retention. I see CM_FCLKEN_PER=0000c000 (debounce clock for GPIO banks 3 & 4 are still enabled.)

Can you retest with debounce enabled on one of the GPIOs for one of your platforms?

Sure, I will.
--
Tarun

Quoted 4 lines

Kevin

#3 lore raw

v2 cover GPIO: OMAP: Driver Cleanup and Fixes

In reply to Kevin Hilman

[...]

Quoted 7 lines

A quick test of this series on 3430/n900 shows that it prevents PER retention. I see CM_FCLKEN_PER=0000c000 (debounce clock for GPIO banks 3 & 4 are still enabled.)

Can you retest with debounce enabled on one of the GPIOs for one of your platforms?

With one of the module debounce clock enabled it doesn't go to retention. Later I disabled all modules debounce clock. It doesn't to retention either. So this is same as your observation. I am surprised what has happened now. The only thing I could recollect is few patches to solve LDO and OMAP1 issues while testing before posting. I will investigate further. --
Tarun

Quoted 4 lines

Kevin