[PATCH 04/12] mmci: allow the card detect status not to be inverted

Rabin VINCENT rabin.vincent at stericsson.com
Thu Aug 5 02:14:54 EDT 2010


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, so are you OK with the
cd_noinvert addition (for the GPIO case)?  Or a cd_invert and a patch to
existing platforms?

Rabin



More information about the linux-arm-kernel mailing list