All of lore.kernel.org
 help / color / mirror / Atom feed
From: fabio.estevam@freescale.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 5/6] ARM: mach-imx/mx27_3ds: Use the standard gpio_to_irq function
Date: Wed, 22 Jun 2011 09:25:27 -0300	[thread overview]
Message-ID: <1308745528-22089-5-git-send-email-fabio.estevam@freescale.com> (raw)
In-Reply-To: <1308745528-22089-4-git-send-email-fabio.estevam@freescale.com>

Use the standard gpio_to_irq function instead of a dedicated IRQ_GPIOx macro.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Rebased on Sascha's for-next branch

 arch/arm/mach-imx/mach-mx27_3ds.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index aefe751..e6d811d 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -51,6 +51,7 @@
 #define SPI1_SS0		IMX_GPIO_NR(4, 28)
 #define LCD_RESET		IMX_GPIO_NR(1, 3)
 #define LCD_ENABLE		IMX_GPIO_NR(1, 31)
+#define SD1_CD			IMX_GPIO_NR(2, 26)
 
 static const int mx27pdk_pins[] __initconst = {
 	/* UART1 */
@@ -170,13 +171,13 @@ static const struct matrix_keymap_data mx27_3ds_keymap_data __initconst = {
 static int mx27_3ds_sdhc1_init(struct device *dev, irq_handler_t detect_irq,
 				void *data)
 {
-	return request_irq(IRQ_GPIOB(26), detect_irq, IRQF_TRIGGER_FALLING |
-			IRQF_TRIGGER_RISING, "sdhc1-card-detect", data);
+	return request_irq(gpio_to_irq(SD1_CD), detect_irq,
+	IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "sdhc1-card-detect", data);
 }
 
 static void mx27_3ds_sdhc1_exit(struct device *dev, void *data)
 {
-	free_irq(IRQ_GPIOB(26), data);
+	free_irq(gpio_to_irq(SD1_CD), data);
 }
 
 static const struct imxmmc_platform_data sdhc1_pdata __initconst = {
@@ -357,7 +358,7 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
 		.bus_num	= 1,
 		.chip_select	= 0, /* SS0 */
 		.platform_data	= &mc13783_pdata,
-		.irq = IRQ_GPIOC(14),
+		.irq = gpio_to_irq(PMIC_INT),
 		.mode = SPI_CS_HIGH,
 	}, {
 		.modalias	= "l4f00242t03",
-- 
1.6.0.4

  reply	other threads:[~2011-06-22 12:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 12:25 [PATCH v2 1/6] ARM: mach-imx/mx27_3ds: Use the standard i.MX macro for GPIO numbering Fabio Estevam
2011-06-22 12:25 ` [PATCH v2 2/6] ARM: mach-imx/mx27_3ds: Fix regulator support Fabio Estevam
2011-06-22 12:25   ` [PATCH v2 3/6] ARM: mach-imx/mx27_3ds: Add LCD support Fabio Estevam
2011-06-22 12:25     ` [PATCH v2 4/6] ARM: mach-imx/mx27_3ds: Add touchscreen support Fabio Estevam
2011-06-22 12:25       ` Fabio Estevam [this message]
2011-06-22 12:25         ` [PATCH v2 6/6] ARM: mach-imx/mx27_3ds: Do not annotate the chip select as internal Fabio Estevam
2011-06-23  7:46 ` [PATCH v2 1/6] ARM: mach-imx/mx27_3ds: Use the standard i.MX macro for GPIO numbering Sascha Hauer

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=1308745528-22089-5-git-send-email-fabio.estevam@freescale.com \
    --to=fabio.estevam@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.