Commit d1811537 authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

twl4030 BCI irq and dependencies

Disable the TWL4030_MODIRQ_BCI symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these BCI devices.

Also remove inappropriate board-specific Kconfig dependencies.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent cba22045
...@@ -58,8 +58,7 @@ config BATTERY_TOSA ...@@ -58,8 +58,7 @@ config BATTERY_TOSA
config TWL4030_BCI_BATTERY config TWL4030_BCI_BATTERY
tristate "OMAP TWL4030 BCI Battery driver" tristate "OMAP TWL4030 BCI Battery driver"
depends on (MACH_OMAP_2430SDP || MACH_OMAP_3430SDP || MACH_OMAP_LDP) && TWL4030_MADC depends on TWL4030_CORE && TWL4030_MADC
default y
help help
Support for OMAP TWL4030 BCI Battery driver. Support for OMAP TWL4030 BCI Battery driver.
This driver can give support for TWL4030 Battery Charge Interface. This driver can give support for TWL4030 Battery Charge Interface.
......
...@@ -958,17 +958,17 @@ static int __init twl4030_bci_battery_probe(struct platform_device *pdev) ...@@ -958,17 +958,17 @@ static int __init twl4030_bci_battery_probe(struct platform_device *pdev)
/* REVISIT do we need to request both IRQs ?? */ /* REVISIT do we need to request both IRQs ?? */
/* request BCI interruption */ /* request BCI interruption */
ret = request_irq(TWL4030_MODIRQ_BCI, twl4030battery_interrupt, irq = platform_get_irq(pdev, 1);
ret = request_irq(irq, twl4030battery_interrupt,
0, pdev->name, NULL); 0, pdev->name, NULL);
if (ret) { if (ret) {
dev_dbg(&pdev->dev, "could not request irq %d, status %d\n", dev_dbg(&pdev->dev, "could not request irq %d, status %d\n",
TWL4030_MODIRQ_BCI, ret); irq, ret);
goto batt_irq_fail; goto batt_irq_fail;
} }
irq = platform_get_irq(pdev, 0);
/* request Power interruption */ /* request Power interruption */
irq = platform_get_irq(pdev, 0);
ret = request_irq(irq, twl4030charger_interrupt, ret = request_irq(irq, twl4030charger_interrupt,
0, pdev->name, di); 0, pdev->name, di);
...@@ -1005,7 +1005,8 @@ bk_batt_failed: ...@@ -1005,7 +1005,8 @@ bk_batt_failed:
batt_failed: batt_failed:
free_irq(irq, di); free_irq(irq, di);
chg_irq_fail: chg_irq_fail:
free_irq(TWL4030_MODIRQ_BCI, NULL); irq = platform_get_irq(pdev, 1);
free_irq(irq, NULL);
batt_irq_fail: batt_irq_fail:
voltage_setup_fail: voltage_setup_fail:
temp_setup_fail: temp_setup_fail:
...@@ -1021,16 +1022,19 @@ temp_setup_fail: ...@@ -1021,16 +1022,19 @@ temp_setup_fail:
static int __exit twl4030_bci_battery_remove(struct platform_device *pdev) static int __exit twl4030_bci_battery_remove(struct platform_device *pdev)
{ {
struct twl4030_bci_device_info *di = platform_get_drvdata(pdev); struct twl4030_bci_device_info *di = platform_get_drvdata(pdev);
int irq = platform_get_irq(pdev, 0); int irq;
twl4030charger_ac_en(DISABLE); twl4030charger_ac_en(DISABLE);
twl4030charger_usb_en(DISABLE); twl4030charger_usb_en(DISABLE);
twl4030battery_hw_level_en(DISABLE); twl4030battery_hw_level_en(DISABLE);
twl4030battery_hw_presence_en(DISABLE); twl4030battery_hw_presence_en(DISABLE);
free_irq(TWL4030_MODIRQ_BCI, NULL); irq = platform_get_irq(pdev, 0);
free_irq(irq, di); free_irq(irq, di);
irq = platform_get_irq(pdev, 1);
free_irq(irq, NULL);
flush_scheduled_work(); flush_scheduled_work();
power_supply_unregister(&di->bat); power_supply_unregister(&di->bat);
power_supply_unregister(&di->bk_bat); power_supply_unregister(&di->bk_bat);
......
...@@ -374,7 +374,7 @@ int twl4030_sih_setup(int module); ...@@ -374,7 +374,7 @@ int twl4030_sih_setup(int module);
/* #define TWL4030_MODIRQ_GPIO (TWL4030_IRQ_BASE + 0) */ /* #define TWL4030_MODIRQ_GPIO (TWL4030_IRQ_BASE + 0) */
/* #define TWL4030_MODIRQ_KEYPAD (TWL4030_IRQ_BASE + 1) */ /* #define TWL4030_MODIRQ_KEYPAD (TWL4030_IRQ_BASE + 1) */
#define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2) /* #define TWL4030_MODIRQ_BCI (TWL4030_IRQ_BASE + 2) */
#define TWL4030_MODIRQ_MADC (TWL4030_IRQ_BASE + 3) #define TWL4030_MODIRQ_MADC (TWL4030_IRQ_BASE + 3)
/* #define TWL4030_MODIRQ_USB (TWL4030_IRQ_BASE + 4) */ /* #define TWL4030_MODIRQ_USB (TWL4030_IRQ_BASE + 4) */
/* #define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5) */ /* #define TWL4030_MODIRQ_PWR (TWL4030_IRQ_BASE + 5) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment