linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: dwmmc: let device core setup the default pin configuration
@ 2013-03-06 12:04 Thomas Abraham
  2013-03-07  8:13 ` Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Abraham @ 2013-03-06 12:04 UTC (permalink / raw)
  To: linux-arm-kernel

With device core now able to setup the default pin configuration,
the pin configuration code based on the deprecated Samsung specific
gpio bindings is removed.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
---
 drivers/mmc/host/dw_mmc-exynos.c |   38 --------------------------------------
 1 files changed, 0 insertions(+), 38 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 72fd0f2..467d043 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -152,43 +152,6 @@ static int dw_mci_exynos_parse_dt(struct dw_mci *host)
 	return 0;
 }
 
-static int dw_mci_exynos_setup_bus(struct dw_mci *host,
-				struct device_node *slot_np, u8 bus_width)
-{
-	int idx, gpio, ret;
-
-	if (!slot_np)
-		return -EINVAL;
-
-	/* cmd + clock + bus-width pins */
-	for (idx = 0; idx < NUM_PINS(bus_width); idx++) {
-		gpio = of_get_gpio(slot_np, idx);
-		if (!gpio_is_valid(gpio)) {
-			dev_err(host->dev, "invalid gpio: %d\n", gpio);
-			return -EINVAL;
-		}
-
-		ret = devm_gpio_request(host->dev, gpio, "dw-mci-bus");
-		if (ret) {
-			dev_err(host->dev, "gpio [%d] request failed\n", gpio);
-			return -EBUSY;
-		}
-	}
-
-	if (host->pdata->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
-		return 0;
-
-	gpio = of_get_named_gpio(slot_np, "samsung,cd-pinmux-gpio", 0);
-	if (gpio_is_valid(gpio)) {
-		if (devm_gpio_request(host->dev, gpio, "dw-mci-cd"))
-			dev_err(host->dev, "gpio [%d] request failed\n", gpio);
-	} else {
-		dev_info(host->dev, "cd gpio not available");
-	}
-
-	return 0;
-}
-
 /* Exynos5250 controller specific capabilities */
 static unsigned long exynos5250_dwmmc_caps[4] = {
 	MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
@@ -205,7 +168,6 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
 	.prepare_command	= dw_mci_exynos_prepare_command,
 	.set_ios		= dw_mci_exynos_set_ios,
 	.parse_dt		= dw_mci_exynos_parse_dt,
-	.setup_bus		= dw_mci_exynos_setup_bus,
 };
 
 static const struct of_device_id dw_mci_exynos_match[] = {
-- 
1.6.6.rc2

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

* [PATCH] mmc: dwmmc: let device core setup the default pin configuration
  2013-03-06 12:04 [PATCH] mmc: dwmmc: let device core setup the default pin configuration Thomas Abraham
@ 2013-03-07  8:13 ` Linus Walleij
  2013-03-07 11:02 ` Seungwon Jeon
  2013-03-11 17:53 ` Doug Anderson
  2 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2013-03-07  8:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Mar 6, 2013 at 1:04 PM, Thomas Abraham
<thomas.abraham@linaro.org> wrote:

> With device core now able to setup the default pin configuration,
> the pin configuration code based on the deprecated Samsung specific
> gpio bindings is removed.
>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH] mmc: dwmmc: let device core setup the default pin configuration
  2013-03-06 12:04 [PATCH] mmc: dwmmc: let device core setup the default pin configuration Thomas Abraham
  2013-03-07  8:13 ` Linus Walleij
@ 2013-03-07 11:02 ` Seungwon Jeon
  2013-03-11 17:53 ` Doug Anderson
  2 siblings, 0 replies; 6+ messages in thread
From: Seungwon Jeon @ 2013-03-07 11:02 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Thomas,

On Wednesday, March 06, 2013, Thomas Abraham wrote:
> With device core now able to setup the default pin configuration,
> the pin configuration code based on the deprecated Samsung specific
> gpio bindings is removed.

'setup_bus' callback is still useful in dw_mci_drv_data?
Considering the purpose, it would be good to remove.
And, could you change commit prefix for consistency?
dwmmc -> dw_mmc

Thanks,
Seungwon Jeon
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
>  drivers/mmc/host/dw_mmc-exynos.c |   38 --------------------------------------
>  1 files changed, 0 insertions(+), 38 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
> index 72fd0f2..467d043 100644
> --- a/drivers/mmc/host/dw_mmc-exynos.c
> +++ b/drivers/mmc/host/dw_mmc-exynos.c
> @@ -152,43 +152,6 @@ static int dw_mci_exynos_parse_dt(struct dw_mci *host)
>  	return 0;
>  }
> 
> -static int dw_mci_exynos_setup_bus(struct dw_mci *host,
> -				struct device_node *slot_np, u8 bus_width)
> -{
> -	int idx, gpio, ret;
> -
> -	if (!slot_np)
> -		return -EINVAL;
> -
> -	/* cmd + clock + bus-width pins */
> -	for (idx = 0; idx < NUM_PINS(bus_width); idx++) {
> -		gpio = of_get_gpio(slot_np, idx);
> -		if (!gpio_is_valid(gpio)) {
> -			dev_err(host->dev, "invalid gpio: %d\n", gpio);
> -			return -EINVAL;
> -		}
> -
> -		ret = devm_gpio_request(host->dev, gpio, "dw-mci-bus");
> -		if (ret) {
> -			dev_err(host->dev, "gpio [%d] request failed\n", gpio);
> -			return -EBUSY;
> -		}
> -	}
> -
> -	if (host->pdata->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
> -		return 0;
> -
> -	gpio = of_get_named_gpio(slot_np, "samsung,cd-pinmux-gpio", 0);
> -	if (gpio_is_valid(gpio)) {
> -		if (devm_gpio_request(host->dev, gpio, "dw-mci-cd"))
> -			dev_err(host->dev, "gpio [%d] request failed\n", gpio);
> -	} else {
> -		dev_info(host->dev, "cd gpio not available");
> -	}
> -
> -	return 0;
> -}
> -
>  /* Exynos5250 controller specific capabilities */
>  static unsigned long exynos5250_dwmmc_caps[4] = {
>  	MMC_CAP_UHS_DDR50 | MMC_CAP_1_8V_DDR |
> @@ -205,7 +168,6 @@ static const struct dw_mci_drv_data exynos5250_drv_data = {
>  	.prepare_command	= dw_mci_exynos_prepare_command,
>  	.set_ios		= dw_mci_exynos_set_ios,
>  	.parse_dt		= dw_mci_exynos_parse_dt,
> -	.setup_bus		= dw_mci_exynos_setup_bus,
>  };
> 
>  static const struct of_device_id dw_mci_exynos_match[] = {
> --
> 1.6.6.rc2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH] mmc: dwmmc: let device core setup the default pin configuration
  2013-03-06 12:04 [PATCH] mmc: dwmmc: let device core setup the default pin configuration Thomas Abraham
  2013-03-07  8:13 ` Linus Walleij
  2013-03-07 11:02 ` Seungwon Jeon
@ 2013-03-11 17:53 ` Doug Anderson
  2013-03-25 16:56   ` Doug Anderson
  2 siblings, 1 reply; 6+ messages in thread
From: Doug Anderson @ 2013-03-11 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

Thomas,

On Wed, Mar 6, 2013 at 4:04 AM, Thomas Abraham
<thomas.abraham@linaro.org> wrote:
> With device core now able to setup the default pin configuration,
> the pin configuration code based on the deprecated Samsung specific
> gpio bindings is removed.
>
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> ---
>  drivers/mmc/host/dw_mmc-exynos.c |   38 --------------------------------------
>  1 files changed, 0 insertions(+), 38 deletions(-)

It would be good to address Seungwon Jeon's comments (change prefix to
dw_mmc and remove setup_bus), but in general this looks good to me,
so...

With <https://patchwork.kernel.org/patch/2225151/> on exynos5250-snow
(ARM Chromebook):

Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>


-Doug

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

* [PATCH] mmc: dwmmc: let device core setup the default pin configuration
  2013-03-11 17:53 ` Doug Anderson
@ 2013-03-25 16:56   ` Doug Anderson
  2013-04-01 18:42     ` Doug Anderson
  0 siblings, 1 reply; 6+ messages in thread
From: Doug Anderson @ 2013-03-25 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

Thomas,

On Mon, Mar 11, 2013 at 10:53 AM, Doug Anderson <dianders@google.com> wrote:
> It would be good to address Seungwon Jeon's comments (change prefix to
> dw_mmc and remove setup_bus), but in general this looks good to me,
> so...

Are you planning on doing this?  I noticed that Chris pulled your
sdhci-s3c change in recently but apparently skipped this one since it
had outstanding comments.  Can you address comments and re-send?  This
is blocking pinmux dts stuff from landing (I think) and that blocks a
lot of other things from landing.

The comments are pretty trivial, so I could always fix them and
re-send myself, but it would be better if you could do it...  :)

-Doug

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

* [PATCH] mmc: dwmmc: let device core setup the default pin configuration
  2013-03-25 16:56   ` Doug Anderson
@ 2013-04-01 18:42     ` Doug Anderson
  0 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2013-04-01 18:42 UTC (permalink / raw)
  To: linux-arm-kernel

Thomas,

On Mon, Mar 25, 2013 at 9:56 AM, Doug Anderson <dianders@google.com> wrote:
> Are you planning on doing this?  I noticed that Chris pulled your
> sdhci-s3c change in recently but apparently skipped this one since it
> had outstanding comments.  Can you address comments and re-send?  This
> is blocking pinmux dts stuff from landing (I think) and that blocks a
> lot of other things from landing.
>
> The comments are pretty trivial, so I could always fix them and
> re-send myself, but it would be better if you could do it...  :)

I didn't hear anything last week and it's getting pretty late in the
process.  I'll post something tomorrow if I don't hear from you...

-Doug

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

end of thread, other threads:[~2013-04-01 18:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06 12:04 [PATCH] mmc: dwmmc: let device core setup the default pin configuration Thomas Abraham
2013-03-07  8:13 ` Linus Walleij
2013-03-07 11:02 ` Seungwon Jeon
2013-03-11 17:53 ` Doug Anderson
2013-03-25 16:56   ` Doug Anderson
2013-04-01 18:42     ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).