diff mbox

[U-Boot,01/14] mmc: s5p: set SD detection pin as input

Message ID 1414165510-10383-2-git-send-email-p.marczak@samsung.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Przemyslaw Marczak Oct. 24, 2014, 3:44 p.m. UTC
The SD Card slot detection pin should be configured as input.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
---
 drivers/mmc/s5p_sdhci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Oct. 28, 2014, 1:01 a.m. UTC | #1
On 24 October 2014 09:44, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> The SD Card slot detection pin should be configured as input.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Oct. 28, 2014, 1:15 a.m. UTC | #2
Hi Tom,

On 27 October 2014 19:01, Simon Glass <sjg@chromium.org> wrote:
> On 24 October 2014 09:44, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>> The SD Card slot detection pin should be configured as input.
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>
> Acked-by: Simon Glass <sjg@chromium.org>

As this directly relates to fixes for the driver model series, I will
pick this up in the DM tree. Some of the patches need a respin but I
will pull in those that are ready.

Regards,
Simon
Simon Glass Oct. 28, 2014, 1:28 a.m. UTC | #3
On 27 October 2014 19:15, Simon Glass <sjg@chromium.org> wrote:
> Hi Tom,
>
> On 27 October 2014 19:01, Simon Glass <sjg@chromium.org> wrote:
>> On 24 October 2014 09:44, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
>>> The SD Card slot detection pin should be configured as input.
>>>
>>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>>
>> Acked-by: Simon Glass <sjg@chromium.org>
>
> As this directly relates to fixes for the driver model series, I will
> pick this up in the DM tree. Some of the patches need a respin but I
> will pull in those that are ready.

Applied to u-boot-dm, thanks!
Jaehoon Chung Oct. 28, 2014, 5:14 a.m. UTC | #4
Hi, Przemyslaw.

On 10/25/2014 12:44 AM, Przemyslaw Marczak wrote:
> The SD Card slot detection pin should be configured as input.
> 
> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> ---
>  drivers/mmc/s5p_sdhci.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
> index 0dea45d..a5d3487 100644
> --- a/drivers/mmc/s5p_sdhci.c
> +++ b/drivers/mmc/s5p_sdhci.c
> @@ -123,7 +123,7 @@ static int do_sdhci_init(struct sdhci_host *host)
>  	if (fdt_gpio_isvalid(&host->cd_gpio)) {
>  		sprintf(str, "sdhci%d_cd", host->index & 0xf);
>  		gpio_request(host->cd_gpio.gpio, str);
> -		gpio_direction_output(host->cd_gpio.gpio, 1);
> +		gpio_direction_input(host->cd_gpio.gpio);

Input is right?

Best Regards,
Jaehoon Chung
>  		if (gpio_get_value(host->cd_gpio.gpio))
>  			return -ENODEV;
>  
>
Przemyslaw Marczak Oct. 28, 2014, 7:15 a.m. UTC | #5
Hello,

On 10/28/2014 06:14 AM, Jaehoon Chung wrote:
> Hi, Przemyslaw.
>
> On 10/25/2014 12:44 AM, Przemyslaw Marczak wrote:
>> The SD Card slot detection pin should be configured as input.
>>
>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>> ---
>>   drivers/mmc/s5p_sdhci.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
>> index 0dea45d..a5d3487 100644
>> --- a/drivers/mmc/s5p_sdhci.c
>> +++ b/drivers/mmc/s5p_sdhci.c
>> @@ -123,7 +123,7 @@ static int do_sdhci_init(struct sdhci_host *host)
>>   	if (fdt_gpio_isvalid(&host->cd_gpio)) {
>>   		sprintf(str, "sdhci%d_cd", host->index & 0xf);
>>   		gpio_request(host->cd_gpio.gpio, str);
>> -		gpio_direction_output(host->cd_gpio.gpio, 1);
>> +		gpio_direction_input(host->cd_gpio.gpio);
>
> Input is right?
>
Yes, this works fine. The input value changes when you insert or remove 
the card, so I don't know why there was output.

> Best Regards,
> Jaehoon Chung
>>   		if (gpio_get_value(host->cd_gpio.gpio))
>>   			return -ENODEV;
>>
>>
>
>

Best Regards,
diff mbox

Patch

diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index 0dea45d..a5d3487 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -123,7 +123,7 @@  static int do_sdhci_init(struct sdhci_host *host)
 	if (fdt_gpio_isvalid(&host->cd_gpio)) {
 		sprintf(str, "sdhci%d_cd", host->index & 0xf);
 		gpio_request(host->cd_gpio.gpio, str);
-		gpio_direction_output(host->cd_gpio.gpio, 1);
+		gpio_direction_input(host->cd_gpio.gpio);
 		if (gpio_get_value(host->cd_gpio.gpio))
 			return -ENODEV;