Re: [PATCH] ARM: mach-shmobile: use GPIO interrupt also for card eject on SDHI0 on mackerel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Magnus

On Thu, 14 Jul 2011, Magnus Damm wrote:

> On Thu, Jul 14, 2011 at 8:25 AM, Guennadi Liakhovetski
> <g.liakhovetski@xxxxxx> wrote:
> > When we switch to transaction-based runtime PM on SDHI / TMIO MMC,
> > also card eject events will have to be detected by the platform.
> > This patch prepares mackerel to this switch.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> > ---
> >  arch/arm/mach-shmobile/board-mackerel.c |   68 +++++++++++++++++++++++++++----
> >  1 files changed, 60 insertions(+), 8 deletions(-)
> 
> Thanks for your work on this.
> 
> What is the reason why we can't use GPIO for all cases of insert/eject
> event detection? Switching between GPIO and function mode for the pin
> seems overly complex IMO - that unless there is a real win behind it.
> Please explain.

Because the way, board-supported (cold) card-detection is currently 
implemented on mackerel is, that on a card slot event a pm_runtime_get() 
is issued, which then calls the .runtime_resume() hook in the tmio driver. 
However, if the runtime PM is inactive, if the hook doesn't get called, 
e.g., bacause the power domain, the respective SDHI controller is in, is 
held on by other devices, the event would be missed. That's why the normal 
pin state is the SDHI card-detection function, which then works performs 
the detection in such cases.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux