Messages in this thread | | | Date | Thu, 22 May 2008 21:34:32 +0200 | From | Pierre Ossman <> | Subject | Re: [PATCH 3/4] [MMC] mmc_spi: add polling support for the card detect line |
| |
On Thu, 22 May 2008 22:17:13 +0400 Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
> On Wed, May 21, 2008 at 09:28:31PM +0200, Pierre Ossman wrote: > > > > Fair enough. You should probably add a comment about this somewhere so > > that people do not call get_cd() in the core request function and > > similar places. Place it so that both get_cd() and get_ro() are covered > > though, as it should be relevant for both. > > I think this is applicable to the .set_ios() too. >
Indeed. That tends to be more obvious that it is costly though.
> > > > This can be solved by allowing get_cd() to return an error that will be > > treated as if get_cd() wasn't defined. -ENODEV seems suitable. > > -ENOSYS (not implemented) sounds better for this purpose... >
Even better. :)
> > (get_ro() needs the same treatment, but I haven't gotten around to > > that) > > Ok. How about this version? >
Perfect. Unless there is some way you can pass flags in platform data? Using the lack of an init() to determine the need for polling is a bit circumstantial.
Rgds -- -- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org rdesktop, core developer http://www.rdesktop.org
| |