All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-s3c: call sdhci_card_event() instead of card tasklet
@ 2014-05-30  3:56 Jingoo Han
  2014-05-30  4:41 ` Jaehoon Chung
  0 siblings, 1 reply; 3+ messages in thread
From: Jingoo Han @ 2014-05-30  3:56 UTC (permalink / raw)
  To: 'Ulf Hansson', 'Chris Ball'
  Cc: linux-mmc, 'Ben Dooks', 'Jaehoon Chung',
	'Seungwon Jeon', 'Jingoo Han'

The card tasklet was removed by the commit 3560db8 (mmc: sdhci:
push card_tasklet into threaded irq handler). However, the task
let has been used by sdhci_s3c_notify_change() in order to handle
GPIO detection. Then, it calls sdhci_tasklet_card().

The card tasklet eventually called sdhci_card_event(). Thus,
the sdhci_card_event() should be called directly instead of
the card tasklet.

This patch also fixes the following build error.
drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_notify_change'
drivers/mmc/host/sdhci-s3c.c:402:25: error: 'struct sdhci_host' has no member named 'card_tasklet'

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mmc/host/sdhci-s3c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index 781b8a9..4386e91 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -399,7 +399,8 @@ static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
 			clk_disable_unprepare(sc->clk_io);
 #endif
 		}
-		tasklet_schedule(&host->card_tasklet);
+		host->mmc->ops->card_event(host->mmc);
+		mmc_detect_change(host->mmc, msecs_to_jiffies(200));
 		spin_unlock_irqrestore(&host->lock, flags);
 	}
 }
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: sdhci-s3c: call sdhci_card_event() instead of card tasklet
  2014-05-30  3:56 [PATCH] mmc: sdhci-s3c: call sdhci_card_event() instead of card tasklet Jingoo Han
@ 2014-05-30  4:41 ` Jaehoon Chung
  2014-05-30  5:33   ` Jingoo Han
  0 siblings, 1 reply; 3+ messages in thread
From: Jaehoon Chung @ 2014-05-30  4:41 UTC (permalink / raw)
  To: Jingoo Han, 'Ulf Hansson', 'Chris Ball'
  Cc: linux-mmc, 'Ben Dooks', 'Jaehoon Chung',
	'Seungwon Jeon'

Hi, Jingoo.

did you test with your patch? It didn't work.
And we don't maintain the sdhci_s3c_notify_change(). Instead, we can use the API of slot-gpio and mmc_of_parse().

https://patchwork.kernel.org/patch/4239541/

Best Regards,
Jaehoon Chung

On 05/30/2014 12:56 PM, Jingoo Han wrote:
> The card tasklet was removed by the commit 3560db8 (mmc: sdhci:
> push card_tasklet into threaded irq handler). However, the task
> let has been used by sdhci_s3c_notify_change() in order to handle
> GPIO detection. Then, it calls sdhci_tasklet_card().
> 
> The card tasklet eventually called sdhci_card_event(). Thus,
> the sdhci_card_event() should be called directly instead of
> the card tasklet.
> 
> This patch also fixes the following build error.
> drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_notify_change'
> drivers/mmc/host/sdhci-s3c.c:402:25: error: 'struct sdhci_host' has no member named 'card_tasklet'
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/mmc/host/sdhci-s3c.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 781b8a9..4386e91 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -399,7 +399,8 @@ static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
>  			clk_disable_unprepare(sc->clk_io);
>  #endif
>  		}
> -		tasklet_schedule(&host->card_tasklet);
> +		host->mmc->ops->card_event(host->mmc);
> +		mmc_detect_change(host->mmc, msecs_to_jiffies(200));
>  		spin_unlock_irqrestore(&host->lock, flags);
>  	}
>  }
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mmc: sdhci-s3c: call sdhci_card_event() instead of card tasklet
  2014-05-30  4:41 ` Jaehoon Chung
@ 2014-05-30  5:33   ` Jingoo Han
  0 siblings, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2014-05-30  5:33 UTC (permalink / raw)
  To: 'Jaehoon Chung'
  Cc: 'Ulf Hansson', 'Chris Ball',
	linux-mmc, 'Ben Dooks', 'Seungwon Jeon',
	'Jingoo Han'

On Friday, May 30, 2014 1:42 PM, Jaehoon Chung wrote:
> 
> Hi, Jingoo.
> 
> did you test with your patch? It didn't work.

Sorry, I didn't test it with SMDK4210 board.

> And we don't maintain the sdhci_s3c_notify_change(). Instead, we can
> use the API of slot-gpio and mmc_of_parse().
> 
> https://patchwork.kernel.org/patch/4239541/

OK, I see. Please ignore my patch.
Thank you for your comment.

Best regards,
Jingoo Han

> 
> Best Regards,
> Jaehoon Chung
> 
> On 05/30/2014 12:56 PM, Jingoo Han wrote:
> > The card tasklet was removed by the commit 3560db8 (mmc: sdhci:
> > push card_tasklet into threaded irq handler). However, the task
> > let has been used by sdhci_s3c_notify_change() in order to handle
> > GPIO detection. Then, it calls sdhci_tasklet_card().
> >
> > The card tasklet eventually called sdhci_card_event(). Thus,
> > the sdhci_card_event() should be called directly instead of
> > the card tasklet.
> >
> > This patch also fixes the following build error.
> > drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_notify_change'
> > drivers/mmc/host/sdhci-s3c.c:402:25: error: 'struct sdhci_host' has no member named 'card_tasklet'
> >
> > Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> > ---
> >  drivers/mmc/host/sdhci-s3c.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> > index 781b8a9..4386e91 100644
> > --- a/drivers/mmc/host/sdhci-s3c.c
> > +++ b/drivers/mmc/host/sdhci-s3c.c
> > @@ -399,7 +399,8 @@ static void sdhci_s3c_notify_change(struct platform_device *dev, int state)
> >  			clk_disable_unprepare(sc->clk_io);
> >  #endif
> >  		}
> > -		tasklet_schedule(&host->card_tasklet);
> > +		host->mmc->ops->card_event(host->mmc);
> > +		mmc_detect_change(host->mmc, msecs_to_jiffies(200));
> >  		spin_unlock_irqrestore(&host->lock, flags);
> >  	}
> >  }
> >


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-30  5:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-30  3:56 [PATCH] mmc: sdhci-s3c: call sdhci_card_event() instead of card tasklet Jingoo Han
2014-05-30  4:41 ` Jaehoon Chung
2014-05-30  5:33   ` Jingoo Han

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.