lkml.org 
[lkml]   [2008]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] [MMC] mmc_spi: add polling support for the card detect line
On Fri, 16 May 2008 20:50:57 +0400
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:

> Some boards do not use interrupts on the CD line, so we want to poll
> the CD and see if there was a change. 1 second poll interval seems
> resonable.
>

The idea isn't bad, but I'm not sure about the mechanism.

To poll a MMC slot, you do not really need a card detect at all. The
MMC layer can just shoot off some requests and see if anything
responds. The PXA driver (if my memory serves me right) already does
this. So the best idea there would be to add this feature to the MMC
core and let the host indicate that it needs it via MMC_CAP_NEEDS_POLL
or something like that.

The card detection pin then becomes an optimisation, something that is
also useful in other ways. Have the host driver check the card detection
pin at the start of every request, and quickly fail it if there is no
card present.

That should give you what you want with much more flexibility for other
uses as well.

Rgds
--
-- Pierre Ossman

Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org


\
 
 \ /
  Last update: 2008-05-17 13:49    [W:0.066 / U:13.312 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site