public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] mmc: omap_hsmmc: simplify cover/card detect logic
@ 2015-03-03 12:28 Andreas Fenkart
  2015-03-03 12:28 ` [PATCH 1/6] mmc: omap_hsmmc: remove unused fields from struct omap_hsmmc_host Andreas Fenkart
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Andreas Fenkart @ 2015-03-03 12:28 UTC (permalink / raw)
  To: linux-mmc
  Cc: linux-omap, NeilBrown, Tony Lindgren, Ulf Hansson,
	Andreas Fenkart

These patches are trying to clean up the cover/card detect logic.

  Mobile phones (some) have no card detect pin, but
  can detect if the cover is removed. The purpose is the
  same; detect if card is being added/removed, but the
  details differ.
  When the cover is removed, it does not mean the card is
  gone. But it might, since it is accessible now. It's like
  a warning. All the driver does is to limit write access to
  the card, see protect_card flag. In contrast, card detect
  notifies us after the fact, e.g. card is gone, card is
  inserted.

While cover detect is only used by one platform (rx51), it
complicates the card detect logic. By separating the code
paths they both become easier to understand and maintain 

Patches have been tested by reverting: 95bebb5696ab
'mmc: omap_hsmmc: use mmc_of_parse to parse common mmc configuration'
otherwise gpio detection is handled by mmc_of_parse

compile tested
OMAP2:
CONFIG_MACH_OMAP2_TUSB6010=y
CONFIG_MACH_OMAP3_BEAGLE=y
CONFIG_MACH_DEVKIT8000=y
CONFIG_MACH_OMAP_LDP=y
CONFIG_MACH_OMAP3530_LV_SOM=y
CONFIG_MACH_OMAP3_TORPEDO=y
CONFIG_MACH_OVERO=y
CONFIG_MACH_OMAP3517EVM=y
CONFIG_MACH_CRANEBOARD=y
CONFIG_MACH_OMAP3_PANDORA=y
CONFIG_MACH_TOUCHBOOK=y
CONFIG_MACH_OMAP_3430SDP=y
CONFIG_MACH_NOKIA_N810=y
CONFIG_MACH_NOKIA_N810_WIMAX=y
CONFIG_MACH_NOKIA_N8X0=y
CONFIG_MACH_NOKIA_RX51=y
CONFIG_MACH_CM_T35=y
CONFIG_MACH_CM_T3517=y
CONFIG_MACH_CM_T3730=y
CONFIG_MACH_SBC3530=y
CONFIG_MACH_TI8168EVM=y
CONFIG_MACH_TI8148EVM=y

Andreas Fenkart (6):
  mmc: omap_hsmmc: remove unused fields from struct omap_hsmmc_host
  mmc: omap_hsmmc: use slot-gpio functions to manage read-only pin
    directly
  mmc: omap_hsmmc: use distinctive code paths for cover / card detect
    logic
  ARM: OMAP2: HSMMC: platform_data: explicit gpio_cover / gpio_cd fields
  mmc: omap_hsmmc: simplify card/cover detect isr
  mmc: omap_hsmmc: use generic slot-gpio isr to manage card detect pin

 arch/arm/mach-omap2/hsmmc.c              | 33 +++++++++----
 drivers/mmc/host/omap_hsmmc.c            | 80 +++++++++-----------------------
 include/linux/platform_data/hsmmc-omap.h |  6 +--
 3 files changed, 48 insertions(+), 71 deletions(-)

-- 
2.1.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-03-30  9:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 12:28 [PATCH 0/6] mmc: omap_hsmmc: simplify cover/card detect logic Andreas Fenkart
2015-03-03 12:28 ` [PATCH 1/6] mmc: omap_hsmmc: remove unused fields from struct omap_hsmmc_host Andreas Fenkart
2015-03-03 12:28 ` [PATCH 2/6] mmc: omap_hsmmc: use slot-gpio functions to manage read-only pin directly Andreas Fenkart
2015-03-03 12:28 ` [PATCH 3/6] mmc: omap_hsmmc: use distinctive code paths for cover / card detect logic Andreas Fenkart
2015-03-03 12:28 ` [PATCH 4/6] ARM: OMAP2: HSMMC: platform_data: explicit gpio_cover / gpio_cd fields Andreas Fenkart
2015-03-03 12:28 ` [PATCH 5/6] mmc: omap_hsmmc: simplify card/cover detect isr Andreas Fenkart
2015-03-30  9:34   ` Ulf Hansson
2015-03-03 12:28 ` [PATCH 6/6] mmc: omap_hsmmc: use generic slot-gpio isr to manage card detect pin Andreas Fenkart
2015-03-30  9:34   ` Ulf Hansson
2015-03-04  5:31 ` [PATCH 0/6] mmc: omap_hsmmc: simplify cover/card detect logic NeilBrown
2015-03-04  8:06   ` Andreas Fenkart
2015-03-05 13:43 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox