[PATCH 04/12] mmci: allow the card detect status not to be inverted
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Aug 5 05:25:31 EDT 2010
On Thu, Aug 05, 2010 at 11:44:54AM +0530, Rabin VINCENT wrote:
> On Thu, Jul 29, 2010 at 16:20:11 +0200, Russell King - ARM Linux wrote:
> > diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> > index 4917af9..8ca38d9 100644
> > --- a/drivers/mmc/host/mmci.c
> > +++ b/drivers/mmc/host/mmci.c
> > @@ -541,7 +541,11 @@ static int mmci_get_cd(struct mmc_host *mmc)
> > else
> > status = gpio_get_value(host->gpio_cd);
> >
> > - return !status;
> > + /*
> > + * Use positive logic throughout - status is zero for no card,
> > + * non-zero for card inserted.
> > + */
> > + return status;
> > }
>
> Your patch in -next has a !gpio_get_value,
Yes, because I at least need it for it to work on my Realview platform.
As no one else seemed interested in replying to my questions about it,
I decided that I'd fix it so at least what I had continued to work.
> so are you OK with the cd_noinvert addition (for the GPIO case)?
> Or a cd_invert and a patch to existing platforms?
I'd much prefer positive logic. Double negatives (eg, not noinverted)
are always bad news.
More information about the linux-arm-kernel
mailing list