diff mbox

mfd: Correct ro and cd implemantion on DM355

Message ID 1248257278-5033-1-git-send-email-vipin.bhandari@ti.com (mailing list archive)
State Superseded
Headers show

Commit Message

Vipin Bhandari July 22, 2009, 10:07 a.m. UTC
This patch corrects the support for MMCSD card detection
and read only feature for SoC DM355.

EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that
Bit 2 and 4 should be checked for card detection. However
on the EVM, bits 1 and 3 gives this status, for MMC/SD
instance 0 and 1 respectively. The pdf also suggests that
Bit 1 and 3 should be checked for write protection. However
on the EVM bits 2 and 4 gives this status.

This document can be downloaded from
http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf 

Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
---
 This patch has been tested on DM355 EVM.

 drivers/mfd/dm355evm_msp.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

Comments

Sergei Shtylyov July 22, 2009, 12:11 p.m. UTC | #1
Hello.

Vipin Bhandari wrote:

> This patch corrects the support for MMCSD card detection
> and read only feature for SoC DM355.

> EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that
> Bit 2 and 4 should be checked for card detection. However
> on the EVM, bits 1 and 3 gives this status, for MMC/SD
> instance 0 and 1 respectively. The pdf also suggests that
> Bit 1 and 3 should be checked for write protection. However
> on the EVM bits 2 and 4 gives this status.

> This document can be downloaded from
> http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.pdf 

> Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
> ---

[...]

> diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c
> index 5b6e58a..507fde0 100644
> --- a/drivers/mfd/dm355evm_msp.c
> +++ b/drivers/mfd/dm355evm_msp.c
> @@ -107,8 +107,14 @@ static const u8 msp_gpios[] = {
>  	MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1),
>  	MSP_GPIO(4, SWITCH1),
>  	/* switches on MMC/SD sockets */
> -	MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC),	/* mmc0 WP, nCD */
> -	MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC),	/* mmc1 WP, nCD */
> +	/* Note: EVMDM355_ECP_VA4.pdf suggests that Bit 2 and 4 should be
> +	 * checked for card detection. However on the EVM bit 1 and 3 gives
> +	 * this status, for 0 and 1 instance respectively. The pdf also
> +	 * suggests that Bit 1 and 3 should be checked for write protection.
> +	 * However on the EVM bit 2 and 4 gives this status,for 0 and 1
> +	 * instance respectively */

    Documentation/CodingStyle, chapter 8:

The preferred style for long (multi-line) comments is:
 

         /*
          * This is the preferred style for multi-line
          * comments in the Linux kernel source code.
          * Please use it consistently.
          *
          * Description:  A column of asterisks on the left side,
          * with beginning and ending almost-blank lines.
          */

WBR, Sergei
Vipin Bhandari July 22, 2009, 12:33 p.m. UTC | #2
Thank you for the comments. I'll incorporate the same and send the updated
patch shortly.

Thanks and regards,
~Vipin


> -----Original Message-----
> From: Sergei Shtylyov [mailto:sshtylyov@ru.mvista.com]
> Sent: Wednesday, July 22, 2009 5:41 PM
> To: Vipin Bhandari
> Cc: davinci-linux-open-source@linux.davincidsp.com
> Subject: Re: [PATCH] mfd: Correct ro and cd implemantion on DM355
> 
> Hello.
> 
> Vipin Bhandari wrote:
> 
> > This patch corrects the support for MMCSD card detection
> > and read only feature for SoC DM355.
> 
> > EVMDM355_ECP_VA4.pdf, from Spectrum digital, suggests that
> > Bit 2 and 4 should be checked for card detection. However
> > on the EVM, bits 1 and 3 gives this status, for MMC/SD
> > instance 0 and 1 respectively. The pdf also suggests that
> > Bit 1 and 3 should be checked for write protection. However
> > on the EVM bits 2 and 4 gives this status.
> 
> > This document can be downloaded from
> >
> http://c6000.spectrumdigital.com/evmdm355/reve/files/EVMDM355_ECP_VA4.p
> df
> 
> > Signed-off-by: Vipin Bhandari <vipin.bhandari@ti.com>
> > ---
> 
> [...]
> 
> > diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c
> > index 5b6e58a..507fde0 100644
> > --- a/drivers/mfd/dm355evm_msp.c
> > +++ b/drivers/mfd/dm355evm_msp.c
> > @@ -107,8 +107,14 @@ static const u8 msp_gpios[] = {
> >  	MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1),
> >  	MSP_GPIO(4, SWITCH1),
> >  	/* switches on MMC/SD sockets */
> > -	MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC),	/* mmc0 WP, nCD */
> > -	MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC),	/* mmc1 WP, nCD */
> > +	/* Note: EVMDM355_ECP_VA4.pdf suggests that Bit 2 and 4 should be
> > +	 * checked for card detection. However on the EVM bit 1 and 3
> gives
> > +	 * this status, for 0 and 1 instance respectively. The pdf also
> > +	 * suggests that Bit 1 and 3 should be checked for write
> protection.
> > +	 * However on the EVM bit 2 and 4 gives this status,for 0 and 1
> > +	 * instance respectively */
> 
>     Documentation/CodingStyle, chapter 8:
> 
> The preferred style for long (multi-line) comments is:
> 
> 
>          /*
>           * This is the preferred style for multi-line
>           * comments in the Linux kernel source code.
>           * Please use it consistently.
>           *
>           * Description:  A column of asterisks on the left side,
>           * with beginning and ending almost-blank lines.
>           */
> 
> WBR, Sergei
diff mbox

Patch

diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c
index 5b6e58a..507fde0 100644
--- a/drivers/mfd/dm355evm_msp.c
+++ b/drivers/mfd/dm355evm_msp.c
@@ -107,8 +107,14 @@  static const u8 msp_gpios[] = {
 	MSP_GPIO(2, SWITCH1), MSP_GPIO(3, SWITCH1),
 	MSP_GPIO(4, SWITCH1),
 	/* switches on MMC/SD sockets */
-	MSP_GPIO(1, SDMMC), MSP_GPIO(2, SDMMC),	/* mmc0 WP, nCD */
-	MSP_GPIO(3, SDMMC), MSP_GPIO(4, SDMMC),	/* mmc1 WP, nCD */
+	/* Note: EVMDM355_ECP_VA4.pdf suggests that Bit 2 and 4 should be
+	 * checked for card detection. However on the EVM bit 1 and 3 gives
+	 * this status, for 0 and 1 instance respectively. The pdf also
+	 * suggests that Bit 1 and 3 should be checked for write protection.
+	 * However on the EVM bit 2 and 4 gives this status,for 0 and 1
+	 * instance respectively */
+	MSP_GPIO(2, SDMMC), MSP_GPIO(1, SDMMC),	/* mmc0 WP, nCD */
+	MSP_GPIO(4, SDMMC), MSP_GPIO(3, SDMMC),	/* mmc1 WP, nCD */
 };
 
 #define MSP_GPIO_REG(offset)	(msp_gpios[(offset)] >> 3)