* [OMAP tree][RFC 2.6.28-rc2-omap 0/9]
@ 2008-10-31 12:18 Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 1/9] USB: EHCI-OMAP: Switch to gpio_request/free calls Jarkko Nikula
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap
This is from the "Continue phasing out legacy GPIO calls" set I sent earlier
and include files which are in linux-omap tree only.
This is generated on top of David's recent 4+5 "legacy gpio phaseout.." patches
in linux-omap tree.
Note that this still includes the drivers/leds/leds-omap.c which should vanish
and board-palmtt.c which should be converted to use leds-gpio.c instead.
--
Jarkko
^ permalink raw reply [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 1/9] USB: EHCI-OMAP: Switch to gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 2/9] ARM: OMAP: Switch to gpio_request/free calls (part 2) Jarkko Nikula
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/usb/host/ehci-omap.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 4dffba6..1b3266c 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -225,9 +225,9 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
#ifdef EXTERNAL_PHY_RESET
/* Refer: ISSUE1 */
- omap_request_gpio(EXT_PHY_RESET_GPIO_PORT1);
+ gpio_request(EXT_PHY_RESET_GPIO_PORT1, "USB1 PHY reset");
gpio_direction_output(EXT_PHY_RESET_GPIO_PORT1, 0);
- omap_request_gpio(EXT_PHY_RESET_GPIO_PORT2);
+ gpio_request(EXT_PHY_RESET_GPIO_PORT2, "USB2 PHY reset");
gpio_direction_output(EXT_PHY_RESET_GPIO_PORT2, 0);
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(EXT_PHY_RESET_DELAY);
@@ -393,8 +393,8 @@ static void omap_stop_ehc(struct platform_device *dev, struct usb_hcd *hcd)
#ifdef EXTERNAL_PHY_RESET
- omap_free_gpio(EXT_PHY_RESET_GPIO_PORT1);
- omap_free_gpio(EXT_PHY_RESET_GPIO_PORT2);
+ gpio_free(EXT_PHY_RESET_GPIO_PORT1);
+ gpio_free(EXT_PHY_RESET_GPIO_PORT2);
#endif
dev_dbg(hcd->self.controller,
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 2/9] ARM: OMAP: Switch to gpio_request/free calls (part 2)
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 1/9] USB: EHCI-OMAP: Switch to gpio_request/free calls Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 3/9] ARM: OMAP: Switch OMAP LCD panels to use gpio_request/free calls Jarkko Nikula
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
This converts new files which are not yet merged upstream including
gpio-switch and board files for 3430sdp, Nokia N800 and omap3evm.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
arch/arm/mach-omap2/board-3430sdp.c | 4 ++--
arch/arm/mach-omap2/board-n800-camera.c | 4 ++--
arch/arm/mach-omap2/board-n800-mmc.c | 14 +++++++-------
arch/arm/mach-omap2/board-n800-usb.c | 6 +++---
arch/arm/mach-omap2/board-n800.c | 6 +++---
arch/arm/mach-omap2/board-omap3evm.c | 4 ++--
arch/arm/plat-omap/gpio-switch.c | 8 ++++----
7 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 1feeff6..0155920 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -165,7 +165,7 @@ out:
*/
static void ads7846_dev_init(void)
{
- if (omap_request_gpio(ts_gpio) < 0) {
+ if (gpio_request(ts_gpio, "ADS7846 pendown") < 0) {
printk(KERN_ERR "can't get ads746 pen down GPIO\n");
return;
}
@@ -273,7 +273,7 @@ static inline void __init sdp3430_init_smc91x(void)
sdp3430_smc91x_resources[1].start = gpio_to_irq(eth_gpio);
- if (omap_request_gpio(eth_gpio) < 0) {
+ if (gpio_request(eth_gpio, "SMC91x irq") < 0) {
printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n",
eth_gpio);
return;
diff --git a/arch/arm/mach-omap2/board-n800-camera.c b/arch/arm/mach-omap2/board-n800-camera.c
index 1f3b1e9..3959128 100644
--- a/arch/arm/mach-omap2/board-n800-camera.c
+++ b/arch/arm/mach-omap2/board-n800-camera.c
@@ -25,13 +25,13 @@
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
+#include <linux/gpio.h>
#include <linux/i2c/menelaus.h>
#include <media/v4l2-int-device.h>
#include <asm/mach-types.h>
-#include <mach/gpio.h>
#include <mach/board.h>
#include <../drivers/cbus/retu.h>
@@ -356,7 +356,7 @@ void __init n800_cam_init(void)
{
int r;
- r = omap_request_gpio(N800_CAM_SENSOR_RESET_GPIO);
+ r = gpio_request(N800_CAM_SENSOR_RESET_GPIO, "TCM825x reset");
if (r < 0) {
printk(KERN_WARNING "%s: failed to request gpio\n",
__func__);
diff --git a/arch/arm/mach-omap2/board-n800-mmc.c b/arch/arm/mach-omap2/board-n800-mmc.c
index 52328c0..2ec8192 100644
--- a/arch/arm/mach-omap2/board-n800-mmc.c
+++ b/arch/arm/mach-omap2/board-n800-mmc.c
@@ -11,12 +11,12 @@
#include <linux/delay.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <linux/i2c/menelaus.h>
#include <asm/mach-types.h>
#include <mach/mmc.h>
-#include <mach/gpio.h>
#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
@@ -284,11 +284,11 @@ static void n800_mmc_cleanup(struct device *dev)
{
menelaus_unregister_mmc_callback();
- omap_free_gpio(slot_switch_gpio);
+ gpio_free(slot_switch_gpio);
if (machine_is_nokia_n810()) {
- omap_free_gpio(n810_slot2_pw_vddf);
- omap_free_gpio(n810_slot2_pw_vdd);
+ gpio_free(n810_slot2_pw_vddf);
+ gpio_free(n810_slot2_pw_vdd);
}
}
@@ -344,16 +344,16 @@ void __init n800_mmc_init(void)
mmc1_data.slots[1].ban_openended = 1;
}
- if (omap_request_gpio(slot_switch_gpio) < 0)
+ if (gpio_request(slot_switch_gpio, "MMC slot switch") < 0)
BUG();
gpio_direction_output(slot_switch_gpio, 0);
if (machine_is_nokia_n810()) {
- if (omap_request_gpio(n810_slot2_pw_vddf) < 0)
+ if (gpio_request(n810_slot2_pw_vddf, "MMC slot 2 Vddf") < 0)
BUG();
gpio_direction_output(n810_slot2_pw_vddf, 0);
- if (omap_request_gpio(n810_slot2_pw_vdd) < 0)
+ if (gpio_request(n810_slot2_pw_vdd, "MMC slot 2 Vdd") < 0)
BUG();
gpio_direction_output(n810_slot2_pw_vdd, 0);
}
diff --git a/arch/arm/mach-omap2/board-n800-usb.c b/arch/arm/mach-omap2/board-n800-usb.c
index 5ab453d..e182a93 100644
--- a/arch/arm/mach-omap2/board-n800-usb.c
+++ b/arch/arm/mach-omap2/board-n800-usb.c
@@ -14,9 +14,9 @@
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/err.h>
+#include <linux/gpio.h>
#include <linux/usb/musb.h>
#include <mach/gpmc.h>
-#include <mach/gpio.h>
#include <mach/pm.h>
#define TUSB_ASYNC_CS 1
@@ -150,7 +150,7 @@ void __init n800_usb_init(void)
static char announce[] __initdata = KERN_INFO "TUSB 6010\n";
/* PM companion chip power control pin */
- ret = omap_request_gpio(GPIO_TUSB_ENABLE);
+ ret = gpio_request(GPIO_TUSB_ENABLE, "TUSB6010 enable");
if (ret != 0) {
printk(KERN_ERR "Could not get TUSB power GPIO%i\n",
GPIO_TUSB_ENABLE);
@@ -171,5 +171,5 @@ void __init n800_usb_init(void)
return;
err:
- omap_free_gpio(GPIO_TUSB_ENABLE);
+ gpio_free(GPIO_TUSB_ENABLE);
}
diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index 66c7d18..b38b295 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -127,7 +127,7 @@ void __init nokia_n800_init_irq(void)
omap_gpio_init();
#ifdef CONFIG_OMAP_STI
- if (omap_request_gpio(N800_STI_GPIO) < 0) {
+ if (gpio_request(N800_STI_GPIO, "STI") < 0) {
printk(KERN_ERR "Failed to request GPIO %d for STI\n",
N800_STI_GPIO);
return;
@@ -254,7 +254,7 @@ static void __init blizzard_dev_init(void)
{
int r;
- r = omap_request_gpio(N800_BLIZZARD_POWERDOWN_GPIO);
+ r = gpio_request(N800_BLIZZARD_POWERDOWN_GPIO, "Blizzard pd");
if (r < 0)
return;
gpio_direction_output(N800_BLIZZARD_POWERDOWN_GPIO, 1);
@@ -331,7 +331,7 @@ static int __init tea5761_dev_init(void)
pr_debug("Enabling tea5761 at GPIO %d\n",
enable_gpio);
- if (omap_request_gpio(enable_gpio) < 0) {
+ if (gpio_request(enable_gpio, "TEA5761 enable") < 0) {
printk(KERN_ERR "Can't request GPIO %d\n",
enable_gpio);
return -ENODEV;
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 8a8b2fa..7644cf6 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -75,7 +75,7 @@ static inline void __init omap3evm_init_smc911x(void)
else
rate = clk_get_rate(l3ck);
- if (omap_request_gpio(OMAP3EVM_ETHR_GPIO_IRQ) < 0) {
+ if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMC911x irq") < 0) {
printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
OMAP3EVM_ETHR_GPIO_IRQ);
return;
@@ -171,7 +171,7 @@ static struct omap_lcd_config omap3_evm_lcd_config __initdata = {
static void ads7846_dev_init(void)
{
- if (omap_request_gpio(OMAP3_EVM_TS_GPIO) < 0)
+ if (gpio_request(OMAP3_EVM_TS_GPIO, "ADS7846 pendown") < 0)
printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
gpio_direction_input(OMAP3_EVM_TS_GPIO);
diff --git a/arch/arm/plat-omap/gpio-switch.c b/arch/arm/plat-omap/gpio-switch.c
index f18f6df..2b5665d 100644
--- a/arch/arm/plat-omap/gpio-switch.c
+++ b/arch/arm/plat-omap/gpio-switch.c
@@ -19,8 +19,8 @@
#include <linux/platform_device.h>
#include <linux/timer.h>
#include <linux/err.h>
+#include <linux/gpio.h>
#include <mach/hardware.h>
-#include <mach/gpio.h>
#include <mach/irqs.h>
#include <mach/mux.h>
#include <mach/board.h>
@@ -278,7 +278,7 @@ static int __init new_switch(struct gpio_switch *sw)
}
dev_set_drvdata(&sw->pdev.dev, sw);
- r = omap_request_gpio(sw->gpio);
+ r = gpio_request(sw->gpio, sw->name);
if (r < 0) {
platform_device_unregister(&sw->pdev);
return r;
@@ -319,7 +319,7 @@ static int __init new_switch(struct gpio_switch *sw)
printk(KERN_ERR "gpio-switch: request_irq() failed "
"for GPIO %d\n", sw->gpio);
platform_device_unregister(&sw->pdev);
- omap_free_gpio(sw->gpio);
+ gpio_free(sw->gpio);
return r;
}
@@ -455,7 +455,7 @@ static void gpio_sw_cleanup(void)
device_remove_file(&sw->pdev.dev, &dev_attr_direction);
platform_device_unregister(&sw->pdev);
- omap_free_gpio(sw->gpio);
+ gpio_free(sw->gpio);
old = sw;
}
kfree(old);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 3/9] ARM: OMAP: Switch OMAP LCD panels to use gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 1/9] USB: EHCI-OMAP: Switch to gpio_request/free calls Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 2/9] ARM: OMAP: Switch to gpio_request/free calls (part 2) Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 4/9] SPI: TSC2301: Switch to " Jarkko Nikula
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/video/omap/lcd_2430sdp.c | 6 +++---
drivers/video/omap/lcd_omap2evm.c | 14 +++++++-------
drivers/video/omap/lcd_omap3beagle.c | 4 ++--
drivers/video/omap/lcd_omap3evm.c | 12 ++++++------
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/video/omap/lcd_2430sdp.c b/drivers/video/omap/lcd_2430sdp.c
index d60e846..2763117 100644
--- a/drivers/video/omap/lcd_2430sdp.c
+++ b/drivers/video/omap/lcd_2430sdp.c
@@ -24,9 +24,9 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
+#include <linux/gpio.h>
#include <linux/i2c/twl4030.h>
-#include <mach/gpio.h>
#include <mach/mux.h>
#include <mach/omapfb.h>
#include <asm/mach-types.h>
@@ -65,8 +65,8 @@ static int sdp2430_panel_init(struct lcd_panel *panel,
backlight_gpio = SDP2430_LCD_PANEL_BACKLIGHT_GPIO;
}
- omap_request_gpio(enable_gpio); /* LCD panel */
- omap_request_gpio(backlight_gpio); /* LCD backlight */
+ gpio_request(enable_gpio, "LCD enable"); /* LCD panel */
+ gpio_request(backlight_gpio, "LCD bl"); /* LCD backlight */
gpio_direction_output(enable_gpio, 0);
gpio_direction_output(backlight_gpio, 0);
diff --git a/drivers/video/omap/lcd_omap2evm.c b/drivers/video/omap/lcd_omap2evm.c
index 424fbae..2fc46c2 100644
--- a/drivers/video/omap/lcd_omap2evm.c
+++ b/drivers/video/omap/lcd_omap2evm.c
@@ -23,9 +23,9 @@
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <linux/i2c/twl4030.h>
-#include <mach/gpio.h>
#include <mach/mux.h>
#include <mach/omapfb.h>
#include <asm/mach-types.h>
@@ -50,12 +50,12 @@ static unsigned int bklight_level;
static int omap2evm_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev)
{
- omap_request_gpio(LCD_PANEL_ENABLE_GPIO);
- omap_request_gpio(LCD_PANEL_LR);
- omap_request_gpio(LCD_PANEL_UD);
- omap_request_gpio(LCD_PANEL_INI);
- omap_request_gpio(LCD_PANEL_QVGA);
- omap_request_gpio(LCD_PANEL_RESB);
+ gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable");
+ gpio_request(LCD_PANEL_LR, "LCD lr");
+ gpio_request(LCD_PANEL_UD, "LCD ud");
+ gpio_request(LCD_PANEL_INI, "LCD ini");
+ gpio_request(LCD_PANEL_QVGA, "LCD qvga");
+ gpio_request(LCD_PANEL_RESB, "LCD resb");
gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 1);
gpio_direction_output(LCD_PANEL_RESB, 1);
diff --git a/drivers/video/omap/lcd_omap3beagle.c b/drivers/video/omap/lcd_omap3beagle.c
index 0c779e4..eae43e4 100644
--- a/drivers/video/omap/lcd_omap3beagle.c
+++ b/drivers/video/omap/lcd_omap3beagle.c
@@ -22,9 +22,9 @@
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <linux/i2c/twl4030.h>
-#include <mach/gpio.h>
#include <mach/mux.h>
#include <mach/omapfb.h>
#include <asm/mach-types.h>
@@ -38,7 +38,7 @@
static int omap3beagle_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev)
{
- omap_request_gpio(LCD_PANEL_ENABLE_GPIO);
+ gpio_request(LCD_PANEL_ENABLE_GPIO, "LCD enable");
return 0;
}
diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
index 90aa015..1c3d814 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -22,9 +22,9 @@
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <linux/i2c/twl4030.h>
-#include <mach/gpio.h>
#include <mach/mux.h>
#include <mach/omapfb.h>
#include <asm/mach-types.h>
@@ -54,11 +54,11 @@ static unsigned int bklight_level;
static int omap3evm_panel_init(struct lcd_panel *panel,
struct omapfb_device *fbdev)
{
- omap_request_gpio(LCD_PANEL_LR);
- omap_request_gpio(LCD_PANEL_UD);
- omap_request_gpio(LCD_PANEL_INI);
- omap_request_gpio(LCD_PANEL_RESB);
- omap_request_gpio(LCD_PANEL_QVGA);
+ gpio_request(LCD_PANEL_LR, "LCD lr");
+ gpio_request(LCD_PANEL_UD, "LCD ud");
+ gpio_request(LCD_PANEL_INI, "LCD ini");
+ gpio_request(LCD_PANEL_RESB, "LCD resb");
+ gpio_request(LCD_PANEL_QVGA, "LCD qvga");
gpio_direction_output(LCD_PANEL_RESB, 1);
gpio_direction_output(LCD_PANEL_INI, 1);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 4/9] SPI: TSC2301: Switch to gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (2 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 3/9] ARM: OMAP: Switch OMAP LCD panels to use gpio_request/free calls Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 5/9] [Bluetooth] Switch brf6150 and hci_h4p to use " Jarkko Nikula
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/spi/tsc2301-core.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/spi/tsc2301-core.c b/drivers/spi/tsc2301-core.c
index 715e400..4b565b7 100644
--- a/drivers/spi/tsc2301-core.c
+++ b/drivers/spi/tsc2301-core.c
@@ -22,13 +22,10 @@
#include <linux/module.h>
#include <linux/device.h>
#include <linux/delay.h>
+#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/tsc2301.h>
-#ifdef CONFIG_ARCH_OMAP
-#include <mach/gpio.h>
-#endif
-
u16 tsc2301_read_reg(struct tsc2301 *tsc, int reg)
{
struct spi_transfer t[2];
@@ -157,14 +154,12 @@ static int __devinit tsc2301_probe(struct spi_device *spi)
if (pdata->reset_gpio >= 0) {
tsc->reset_gpio = pdata->reset_gpio;
-#ifdef CONFIG_ARCH_OMAP
- r = omap_request_gpio(tsc->reset_gpio);
+ r = gpio_request(tsc->reset_gpio, "TSC2301 reset");
if (r < 0)
goto err1;
gpio_direction_output(tsc->reset_gpio, 1);
mdelay(1);
gpio_set_value(tsc->reset_gpio, 0);
-#endif
} else
tsc->reset_gpio = -1;
@@ -229,8 +224,10 @@ static int __devexit tsc2301_remove(struct spi_device *spi)
struct tsc2301 *tsc = dev_get_drvdata(&spi->dev);
tsc2301_mixer_exit(tsc);
- tsc2301_ts_exit(tsc);
- tsc2301_kp_exit(tsc);
+ tsc2301_ts_exit(tsc);
+ tsc2301_kp_exit(tsc);
+ if (tsc->reset_gpio >= 0)
+ gpio_free(tsc->reset_gpio);
kfree(tsc);
return 0;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 5/9] [Bluetooth] Switch brf6150 and hci_h4p to use gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (3 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 4/9] SPI: TSC2301: Switch to " Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 6/9] CBUS: Switch to " Jarkko Nikula
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/bluetooth/brf6150.c | 26 +++++++++++++-------------
drivers/bluetooth/hci_h4p/core.c | 26 +++++++++++++-------------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/bluetooth/brf6150.c b/drivers/bluetooth/brf6150.c
index 256ecde..2d22aec 100644
--- a/drivers/bluetooth/brf6150.c
+++ b/drivers/bluetooth/brf6150.c
@@ -33,9 +33,9 @@
#include <linux/timer.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <mach/hardware.h>
-#include <mach/gpio.h>
#include <mach/board.h>
#include <mach/irqs.h>
@@ -913,7 +913,7 @@ static int __init brf6150_init(void)
NBT_DBG("Uart: %d\n", info->btinfo->bt_uart);
NBT_DBG("sysclk: %d\n", info->btinfo->bt_sysclk);
- err = omap_request_gpio(info->btinfo->reset_gpio);
+ err = gpio_request(info->btinfo->reset_gpio, "BT reset");
if (err < 0)
{
printk(KERN_WARNING "Cannot get GPIO line %d",
@@ -922,23 +922,23 @@ static int __init brf6150_init(void)
return err;
}
- err = omap_request_gpio(info->btinfo->bt_wakeup_gpio);
+ err = gpio_request(info->btinfo->bt_wakeup_gpio, "BT wakeup");
if (err < 0)
{
printk(KERN_WARNING "Cannot get GPIO line 0x%d",
info->btinfo->bt_wakeup_gpio);
- omap_free_gpio(info->btinfo->reset_gpio);
+ gpio_free(info->btinfo->reset_gpio);
kfree(info);
return err;
}
- err = omap_request_gpio(info->btinfo->host_wakeup_gpio);
+ err = gpio_request(info->btinfo->host_wakeup_gpio, "BT host wakeup");
if (err < 0)
{
printk(KERN_WARNING "Cannot get GPIO line %d",
info->btinfo->host_wakeup_gpio);
- omap_free_gpio(info->btinfo->reset_gpio);
- omap_free_gpio(info->btinfo->bt_wakeup_gpio);
+ gpio_free(info->btinfo->reset_gpio);
+ gpio_free(info->btinfo->bt_wakeup_gpio);
kfree(info);
return err;
}
@@ -1022,9 +1022,9 @@ cleanup_irq:
free_irq(irq, (void *)info);
free_irq(gpio_to_irq(info->btinfo->host_wakeup_gpio), (void *)info);
cleanup:
- omap_free_gpio(info->btinfo->reset_gpio);
- omap_free_gpio(info->btinfo->bt_wakeup_gpio);
- omap_free_gpio(info->btinfo->host_wakeup_gpio);
+ gpio_free(info->btinfo->reset_gpio);
+ gpio_free(info->btinfo->bt_wakeup_gpio);
+ gpio_free(info->btinfo->host_wakeup_gpio);
kfree(info);
return err;
@@ -1034,9 +1034,9 @@ static void __exit brf6150_exit(void)
{
brf6150_hci_close(exit_info->hdev);
hci_free_dev(exit_info->hdev);
- omap_free_gpio(exit_info->btinfo->reset_gpio);
- omap_free_gpio(exit_info->btinfo->bt_wakeup_gpio);
- omap_free_gpio(exit_info->btinfo->host_wakeup_gpio);
+ gpio_free(exit_info->btinfo->reset_gpio);
+ gpio_free(exit_info->btinfo->bt_wakeup_gpio);
+ gpio_free(exit_info->btinfo->host_wakeup_gpio);
free_irq(exit_info->irq, (void *)exit_info);
free_irq(gpio_to_irq(exit_info->btinfo->host_wakeup_gpio), (void *)exit_info);
kfree(exit_info);
diff --git a/drivers/bluetooth/hci_h4p/core.c b/drivers/bluetooth/hci_h4p/core.c
index 9964a0c..a5b76ad 100644
--- a/drivers/bluetooth/hci_h4p/core.c
+++ b/drivers/bluetooth/hci_h4p/core.c
@@ -34,9 +34,9 @@
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
+#include <linux/gpio.h>
#include <mach/hardware.h>
-#include <mach/gpio.h>
#include <mach/board.h>
#include <mach/irqs.h>
#include <mach/pm.h>
@@ -823,7 +823,7 @@ static int hci_h4p_probe(struct platform_device *pdev)
NBT_DBG("Uart: %d\n", bt_config->bt_uart);
NBT_DBG("sysclk: %d\n", info->bt_sysclk);
- err = omap_request_gpio(info->reset_gpio);
+ err = gpio_request(info->reset_gpio, "BT reset");
if (err < 0) {
dev_err(&pdev->dev, "Cannot get GPIO line %d\n",
info->reset_gpio);
@@ -831,23 +831,23 @@ static int hci_h4p_probe(struct platform_device *pdev)
goto cleanup;
}
- err = omap_request_gpio(info->bt_wakeup_gpio);
+ err = gpio_request(info->bt_wakeup_gpio, "BT wakeup");
if (err < 0)
{
dev_err(info->dev, "Cannot get GPIO line 0x%d",
info->bt_wakeup_gpio);
- omap_free_gpio(info->reset_gpio);
+ gpio_free(info->reset_gpio);
kfree(info);
goto cleanup;
}
- err = omap_request_gpio(info->host_wakeup_gpio);
+ err = gpio_request(info->host_wakeup_gpio, "BT host wakeup");
if (err < 0)
{
dev_err(info->dev, "Cannot get GPIO line %d",
info->host_wakeup_gpio);
- omap_free_gpio(info->reset_gpio);
- omap_free_gpio(info->bt_wakeup_gpio);
+ gpio_free(info->reset_gpio);
+ gpio_free(info->bt_wakeup_gpio);
kfree(info);
goto cleanup;
}
@@ -953,9 +953,9 @@ cleanup_irq:
free_irq(gpio_to_irq(info->host_wakeup_gpio), (void *)info);
cleanup:
gpio_set_value(info->reset_gpio, 0);
- omap_free_gpio(info->reset_gpio);
- omap_free_gpio(info->bt_wakeup_gpio);
- omap_free_gpio(info->host_wakeup_gpio);
+ gpio_free(info->reset_gpio);
+ gpio_free(info->bt_wakeup_gpio);
+ gpio_free(info->host_wakeup_gpio);
kfree(info);
return err;
@@ -971,9 +971,9 @@ static int hci_h4p_remove(struct platform_device *dev)
hci_h4p_hci_close(info->hdev);
free_irq(gpio_to_irq(info->host_wakeup_gpio), (void *) info);
hci_free_dev(info->hdev);
- omap_free_gpio(info->reset_gpio);
- omap_free_gpio(info->bt_wakeup_gpio);
- omap_free_gpio(info->host_wakeup_gpio);
+ gpio_free(info->reset_gpio);
+ gpio_free(info->bt_wakeup_gpio);
+ gpio_free(info->host_wakeup_gpio);
free_irq(info->irq, (void *) info);
kfree(info);
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 6/9] CBUS: Switch to gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (4 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 5/9] [Bluetooth] Switch brf6150 and hci_h4p to use " Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 7/9] INPUT: TSC2005: " Jarkko Nikula
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/cbus/cbus.c | 12 ++++++------
drivers/cbus/retu.c | 10 +++++-----
drivers/cbus/tahvo.c | 10 +++++-----
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/cbus/cbus.c b/drivers/cbus/cbus.c
index 1a184b0..020afad 100644
--- a/drivers/cbus/cbus.c
+++ b/drivers/cbus/cbus.c
@@ -28,8 +28,8 @@
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
+#include <linux/gpio.h>
-#include <mach/gpio.h>
#include <mach/board.h>
#include <asm/io.h>
@@ -253,13 +253,13 @@ int __init cbus_bus_init(void)
}
#endif
- if ((ret = omap_request_gpio(chost->clk_gpio)) < 0)
+ if ((ret = gpio_request(chost->clk_gpio, "CBUS clk")) < 0)
goto exit1;
- if ((ret = omap_request_gpio(chost->dat_gpio)) < 0)
+ if ((ret = gpio_request(chost->dat_gpio, "CBUS data")) < 0)
goto exit2;
- if ((ret = omap_request_gpio(chost->sel_gpio)) < 0)
+ if ((ret = gpio_request(chost->sel_gpio, "CBUS sel")) < 0)
goto exit3;
gpio_direction_output(chost->clk_gpio, 0);
@@ -273,9 +273,9 @@ int __init cbus_bus_init(void)
return 0;
exit3:
- omap_free_gpio(chost->dat_gpio);
+ gpio_free(chost->dat_gpio);
exit2:
- omap_free_gpio(chost->clk_gpio);
+ gpio_free(chost->clk_gpio);
exit1:
kfree(chost);
return ret;
diff --git a/drivers/cbus/retu.c b/drivers/cbus/retu.c
index 5f9a20a..35ea149 100644
--- a/drivers/cbus/retu.c
+++ b/drivers/cbus/retu.c
@@ -35,11 +35,11 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <asm/uaccess.h>
#include <mach/mux.h>
-#include <mach/gpio.h>
#include <mach/board.h>
#include "cbus.h"
@@ -335,7 +335,7 @@ static int __devinit retu_probe(struct device *dev)
retu_irq_pin = em_asic_config->retu_irq_gpio;
- if ((ret = omap_request_gpio(retu_irq_pin)) < 0) {
+ if ((ret = gpio_request(retu_irq_pin, "RETU irq")) < 0) {
printk(KERN_ERR PFX "Unable to reserve IRQ GPIO\n");
return ret;
}
@@ -362,7 +362,7 @@ static int __devinit retu_probe(struct device *dev)
"retu", 0);
if (ret < 0) {
printk(KERN_ERR PFX "Unable to register IRQ handler\n");
- omap_free_gpio(retu_irq_pin);
+ gpio_free(retu_irq_pin);
return ret;
}
set_irq_wake(gpio_to_irq(retu_irq_pin), 1);
@@ -375,7 +375,7 @@ static int __devinit retu_probe(struct device *dev)
if (retu_user_init() < 0) {
printk(KERN_ERR "Unable to initialize driver\n");
free_irq(gpio_to_irq(retu_irq_pin), 0);
- omap_free_gpio(retu_irq_pin);
+ gpio_free(retu_irq_pin);
return ret;
}
#endif
@@ -391,7 +391,7 @@ static int retu_remove(struct device *dev)
/* Mask all RETU interrupts */
retu_write_reg(RETU_REG_IMR, 0xffff);
free_irq(gpio_to_irq(retu_irq_pin), 0);
- omap_free_gpio(retu_irq_pin);
+ gpio_free(retu_irq_pin);
tasklet_kill(&retu_tasklet);
return 0;
diff --git a/drivers/cbus/tahvo.c b/drivers/cbus/tahvo.c
index fe665d4..eab593f 100644
--- a/drivers/cbus/tahvo.c
+++ b/drivers/cbus/tahvo.c
@@ -35,11 +35,11 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
+#include <linux/gpio.h>
#include <asm/uaccess.h>
#include <mach/mux.h>
-#include <mach/gpio.h>
#include <mach/board.h>
#include "cbus.h"
@@ -322,7 +322,7 @@ static int __devinit tahvo_probe(struct device *dev)
tahvo_irq_pin = em_asic_config->tahvo_irq_gpio;
- if ((ret = omap_request_gpio(tahvo_irq_pin)) < 0) {
+ if ((ret = gpio_request(tahvo_irq_pin, "TAHVO irq")) < 0) {
printk(KERN_ERR PFX "Unable to reserve IRQ GPIO\n");
return ret;
}
@@ -340,7 +340,7 @@ static int __devinit tahvo_probe(struct device *dev)
"tahvo", 0);
if (ret < 0) {
printk(KERN_ERR PFX "Unable to register IRQ handler\n");
- omap_free_gpio(tahvo_irq_pin);
+ gpio_free(tahvo_irq_pin);
return ret;
}
#ifdef CONFIG_CBUS_TAHVO_USER
@@ -348,7 +348,7 @@ static int __devinit tahvo_probe(struct device *dev)
if (tahvo_user_init() < 0) {
printk(KERN_ERR "Unable to initialize driver\n");
free_irq(gpio_to_irq(tahvo_irq_pin), 0);
- omap_free_gpio(tahvo_irq_pin);
+ gpio_free(tahvo_irq_pin);
return ret;
}
#endif
@@ -363,7 +363,7 @@ static int tahvo_remove(struct device *dev)
/* Mask all TAHVO interrupts */
tahvo_write_reg(TAHVO_REG_IMR, 0xffff);
free_irq(gpio_to_irq(tahvo_irq_pin), 0);
- omap_free_gpio(tahvo_irq_pin);
+ gpio_free(tahvo_irq_pin);
tasklet_kill(&tahvo_tasklet);
return 0;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 7/9] INPUT: TSC2005: Switch to gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (5 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 6/9] CBUS: Switch to " Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 8/9] INPUT: TS_Hx: " Jarkko Nikula
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/input/touchscreen/tsc2005.c | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
index 38ac537..03c3a10 100644
--- a/drivers/input/touchscreen/tsc2005.c
+++ b/drivers/input/touchscreen/tsc2005.c
@@ -27,12 +27,9 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
+#include <linux/gpio.h>
#include <linux/spi/spi.h>
-#ifdef CONFIG_ARCH_OMAP
-#include <mach/gpio.h>
-#endif
-
#include <linux/spi/tsc2005.h>
/**
@@ -534,8 +531,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
ts->dav_gpio = dav_gpio;
dev_dbg(&ts->spi->dev, "TSC2005: DAV GPIO = %d\n", dav_gpio);
-#ifdef CONFIG_ARCH_OMAP
- r = omap_request_gpio(dav_gpio);
+ r = gpio_request(dav_gpio, "TSC2005 dav");
if (r < 0) {
dev_err(&ts->spi->dev, "unable to get DAV GPIO");
goto err1;
@@ -543,7 +539,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
gpio_direction_input(dav_gpio);
ts->irq = gpio_to_irq(dav_gpio);
dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq);
-#endif
+
init_timer(&ts->penup_timer);
setup_timer(&ts->penup_timer, tsc2005_ts_penup_timer_handler,
(unsigned long)ts);
@@ -612,9 +608,7 @@ err3:
tsc2005_stop_scan(ts);
input_free_device(idev);
err2:
-#ifdef CONFIG_ARCH_OMAP
- omap_free_gpio(dav_gpio);
-#endif
+ gpio_free(dav_gpio);
err1:
return r;
}
@@ -672,9 +666,7 @@ static int __devexit tsc2005_remove(struct spi_device *spi)
free_irq(ts->irq, ts);
input_unregister_device(ts->idev);
-#ifdef CONFIG_ARCH_OMAP
- omap_free_gpio(ts->dav_gpio);
-#endif
+ gpio_free(ts->dav_gpio);
kfree(ts);
return 0;
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 8/9] INPUT: TS_Hx: Switch to gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (6 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 7/9] INPUT: TSC2005: " Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 9/9] LEDS: Switch leds-omap to use " Jarkko Nikula
2008-11-21 22:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Tony Lindgren
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/input/touchscreen/omap/ts_hx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/omap/ts_hx.c b/drivers/input/touchscreen/omap/ts_hx.c
index 0ef7f6c..9d3ec97 100644
--- a/drivers/input/touchscreen/omap/ts_hx.c
+++ b/drivers/input/touchscreen/omap/ts_hx.c
@@ -28,8 +28,8 @@
#include <linux/input.h>
#include <linux/device.h>
+#include <linux/gpio.h>
#include <asm/mach-types.h>
-#include <asm/arch/gpio.h>
#include <asm/arch/mux.h>
#include <asm/arch/hardware.h>
#include <asm/hardware/tsc2101.h>
@@ -92,7 +92,7 @@ static int __init hx_ts_probe(struct omap_ts_t *ts)
return -ENODEV;
ts->irq = gpio_to_irq(gpio);
- if (omap_request_gpio(gpio) != 0) {
+ if (gpio_request(gpio, "TS irq") != 0) {
printk(KERN_ERR "hX_ts_init.c: Could not reserve GPIO!\n");
return -EINVAL;
};
@@ -177,8 +177,8 @@ static void hx_ts_disable(void)
static void __exit hx_ts_remove(void)
{
if (machine_is_omap_h2())
- omap_free_gpio(H2_GPIO_NUM);
+ gpio_free(H2_GPIO_NUM);
else if (machine_is_omap_h3())
- omap_free_gpio(H3_GPIO_NUM);
+ gpio_free(H3_GPIO_NUM);
}
#endif
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [OMAP tree][RFC 2.6.28-rc2-omap 9/9] LEDS: Switch leds-omap to use gpio_request/free calls
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (7 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 8/9] INPUT: TS_Hx: " Jarkko Nikula
@ 2008-10-31 12:18 ` Jarkko Nikula
2008-11-21 22:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Tony Lindgren
9 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2008-10-31 12:18 UTC (permalink / raw)
To: linux-omap; +Cc: Jarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
---
drivers/leds/leds-omap.c | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/leds/leds-omap.c b/drivers/leds/leds-omap.c
index 05776cd..e936403 100644
--- a/drivers/leds/leds-omap.c
+++ b/drivers/leds/leds-omap.c
@@ -14,8 +14,8 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
+#include <linux/gpio.h>
-#include <mach/gpio.h>
#include <mach/hardware.h>
#include <mach/led.h>
@@ -30,15 +30,6 @@ static void omap_set_led_gpio(struct led_classdev *led_cdev,
gpio_set_value(led_dev->gpio, value);
}
-static void omap_configure_led_gpio(int gpio)
-{
- if (omap_request_gpio(gpio) < 0) {
- printk(KERN_ERR "Failed to request GPIO%d for LEDs\n", gpio);
- return;
- }
- gpio_direction_output(gpio, 0);
-}
-
static int omap_led_probe(struct platform_device *dev)
{
struct omap_led_platform_data *pdata = dev->dev.platform_data;
@@ -46,7 +37,10 @@ static int omap_led_probe(struct platform_device *dev)
int i, ret = 0;
for (i = 0; ret >= 0 && i < pdata->nr_leds; i++) {
- omap_configure_led_gpio(leds[i].gpio);
+ ret = gpio_request(leds[i].gpio, leds[i].cdev.name);
+ if (ret < 0)
+ break;
+ gpio_direction_output(leds[i].gpio, 0);
if (!leds[i].cdev.brightness_set)
leds[i].cdev.brightness_set = omap_set_led_gpio;
@@ -54,8 +48,10 @@ static int omap_led_probe(struct platform_device *dev)
}
if (ret < 0 && i > 1) {
- for (i = i - 2; i >= 0; i--)
+ for (i = i - 2; i >= 0; i--) {
led_classdev_unregister(&leds[i].cdev);
+ gpio_free(leds[i].gpio);
+ }
}
return ret;
@@ -67,8 +63,10 @@ static int omap_led_remove(struct platform_device *dev)
struct omap_led_config *leds = pdata->leds;
int i;
- for (i = 0; i < pdata->nr_leds; i++)
+ for (i = 0; i < pdata->nr_leds; i++) {
led_classdev_unregister(&leds[i].cdev);
+ gpio_free(leds[i].gpio);
+ }
return 0;
}
--
1.5.6.5
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [OMAP tree][RFC 2.6.28-rc2-omap 0/9]
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
` (8 preceding siblings ...)
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 9/9] LEDS: Switch leds-omap to use " Jarkko Nikula
@ 2008-11-21 22:18 ` Tony Lindgren
9 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2008-11-21 22:18 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: linux-omap
* Jarkko Nikula <jarkko.nikula@nokia.com> [081031 05:20]:
> This is from the "Continue phasing out legacy GPIO calls" set I sent earlier
> and include files which are in linux-omap tree only.
>
> This is generated on top of David's recent 4+5 "legacy gpio phaseout.." patches
> in linux-omap tree.
>
> Note that this still includes the drivers/leds/leds-omap.c which should vanish
> and board-palmtt.c which should be converted to use leds-gpio.c instead.
Pushing this series to l-o tree.
Tony
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-11-21 22:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 12:18 [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 1/9] USB: EHCI-OMAP: Switch to gpio_request/free calls Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 2/9] ARM: OMAP: Switch to gpio_request/free calls (part 2) Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 3/9] ARM: OMAP: Switch OMAP LCD panels to use gpio_request/free calls Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 4/9] SPI: TSC2301: Switch to " Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 5/9] [Bluetooth] Switch brf6150 and hci_h4p to use " Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 6/9] CBUS: Switch to " Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 7/9] INPUT: TSC2005: " Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 8/9] INPUT: TS_Hx: " Jarkko Nikula
2008-10-31 12:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 9/9] LEDS: Switch leds-omap to use " Jarkko Nikula
2008-11-21 22:18 ` [OMAP tree][RFC 2.6.28-rc2-omap 0/9] Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox