All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>, Paul Mundt <lethal@linux-sh.org>,
	linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 04/10 v3] mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
Date: Thu, 09 Feb 2012 21:57:10 +0000	[thread overview]
Message-ID: <1328824636-10553-5-git-send-email-g.liakhovetski@gmx.de> (raw)
In-Reply-To: <1328824636-10553-1-git-send-email-g.liakhovetski@gmx.de>

To use TMIO MMC driver ability to interface to the generic MMC GPIO card
hotplug detection helper, the SDHI driver has to pass the GPIO number
from its own platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mobile_sdhi.c  |    3 ++-
 include/linux/mmc/sh_mobile_sdhi.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 58da3c4..cb279b4 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -129,6 +129,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 			mmc_data->write16_hook = sh_mobile_sdhi_write16_hook;
 		mmc_data->ocr_mask = p->tmio_ocr_mask;
 		mmc_data->capabilities |= p->tmio_caps;
+		mmc_data->cd_gpio = p->cd_gpio;
 
 		if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
 			priv->param_tx.slave_id = p->dma_slave_tx;
@@ -211,7 +212,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 
 	dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",
 		 mmc_hostname(host->mmc), (unsigned long)
-		 (platform_get_resource(pdev,IORESOURCE_MEM, 0)->start),
+		 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
 		 mmc_data->hclk / 1000000);
 
 	return ret;
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index 71b8054..082a736 100644
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
@@ -16,6 +16,7 @@ struct sh_mobile_sdhi_info {
 	unsigned long tmio_flags;
 	unsigned long tmio_caps;
 	u32 tmio_ocr_mask;	/* available MMC voltages */
+	unsigned int cd_gpio;
 	struct tmio_mmc_data *pdata;
 	void (*set_pwr)(struct platform_device *pdev, int state);
 	int (*get_cd)(struct platform_device *pdev);
-- 
1.7.2.5


WARNING: multiple messages have this Message-ID (diff)
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-mmc@vger.kernel.org
Cc: Chris Ball <cjb@laptop.org>, Paul Mundt <lethal@linux-sh.org>,
	linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH 04/10 v3] mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC
Date: Thu,  9 Feb 2012 22:57:10 +0100	[thread overview]
Message-ID: <1328824636-10553-5-git-send-email-g.liakhovetski@gmx.de> (raw)
In-Reply-To: <1328824636-10553-1-git-send-email-g.liakhovetski@gmx.de>

To use TMIO MMC driver ability to interface to the generic MMC GPIO card
hotplug detection helper, the SDHI driver has to pass the GPIO number
from its own platform data.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mobile_sdhi.c  |    3 ++-
 include/linux/mmc/sh_mobile_sdhi.h |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
index 58da3c4..cb279b4 100644
--- a/drivers/mmc/host/sh_mobile_sdhi.c
+++ b/drivers/mmc/host/sh_mobile_sdhi.c
@@ -129,6 +129,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 			mmc_data->write16_hook = sh_mobile_sdhi_write16_hook;
 		mmc_data->ocr_mask = p->tmio_ocr_mask;
 		mmc_data->capabilities |= p->tmio_caps;
+		mmc_data->cd_gpio = p->cd_gpio;
 
 		if (p->dma_slave_tx > 0 && p->dma_slave_rx > 0) {
 			priv->param_tx.slave_id = p->dma_slave_tx;
@@ -211,7 +212,7 @@ static int __devinit sh_mobile_sdhi_probe(struct platform_device *pdev)
 
 	dev_info(&pdev->dev, "%s base at 0x%08lx clock rate %u MHz\n",
 		 mmc_hostname(host->mmc), (unsigned long)
-		 (platform_get_resource(pdev,IORESOURCE_MEM, 0)->start),
+		 (platform_get_resource(pdev, IORESOURCE_MEM, 0)->start),
 		 mmc_data->hclk / 1000000);
 
 	return ret;
diff --git a/include/linux/mmc/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h
index 71b8054..082a736 100644
--- a/include/linux/mmc/sh_mobile_sdhi.h
+++ b/include/linux/mmc/sh_mobile_sdhi.h
@@ -16,6 +16,7 @@ struct sh_mobile_sdhi_info {
 	unsigned long tmio_flags;
 	unsigned long tmio_caps;
 	u32 tmio_ocr_mask;	/* available MMC voltages */
+	unsigned int cd_gpio;
 	struct tmio_mmc_data *pdata;
 	void (*set_pwr)(struct platform_device *pdev, int state);
 	int (*get_cd)(struct platform_device *pdev);
-- 
1.7.2.5


  parent reply	other threads:[~2012-02-09 21:57 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 21:57 [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM Guennadi Liakhovetski
2012-02-09 21:57 ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 01/10 v3] mmc: simplify mmc_cd_gpio_request() by removing two parameters Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 02/10 v3] mmc: tmio: calculate the native hotplug condition only once Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 03/10 v3] mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` Guennadi Liakhovetski [this message]
2012-02-09 21:57   ` [PATCH 04/10 v3] mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 05/10 v3] ARM: mach-shmobile: convert mackerel to use the generic MMC GPIO hotplug helper Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-04-16  2:08   ` Simon Horman
2012-04-16  2:08     ` Simon Horman
2012-02-09 21:57 ` [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm " Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-04-08 11:33   ` Guennadi Liakhovetski
2012-04-08 11:33     ` Guennadi Liakhovetski
2012-04-13 12:46     ` outstanding ARM patches Guennadi Liakhovetski
2012-04-13 12:46       ` Guennadi Liakhovetski
2012-04-16 16:24       ` Rafael J. Wysocki
2012-04-16 16:24         ` Rafael J. Wysocki
2012-04-16 21:08         ` Guennadi Liakhovetski
2012-04-16 21:08           ` Guennadi Liakhovetski
2012-04-16  2:16   ` [PATCH 06/10 v3] ARM: mach-shmobile: convert ag5evm to use the generic MMC GPIO hotplug helper Simon Horman
2012-04-16  2:16     ` Simon Horman
2012-02-09 21:57 ` [PATCH 07/10 v3] mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 08/10 v3] mmc: tmio_mmc: remove unused sdio_irq_enabled flag Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 09/10 v3] mmc: sh_mobile_sdhi: do not manage PM clocks manually Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-02-09 21:57 ` [PATCH 10/10 v3] mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function Guennadi Liakhovetski
2012-02-09 21:57   ` Guennadi Liakhovetski
2012-03-09  4:17 ` [PATCH 00/10 v3] mmc: tmio/sdhi: hotplug & PM Chris Ball
2012-03-09  4:17   ` Chris Ball
2012-03-16 11:55   ` Chris Ball
2012-03-16 11:55     ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328824636-10553-5-git-send-email-g.liakhovetski@gmx.de \
    --to=g.liakhovetski@gmx.de \
    --cc=cjb@laptop.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.