]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
twl4030 BCI irq and dependencies
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 20 Nov 2008 01:27:36 +0000 (17:27 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 25 Nov 2008 23:29:22 +0000 (15:29 -0800)
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: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/power/Kconfig
drivers/power/twl4030_bci_battery.c
include/linux/i2c/twl4030.h

index 14777f79439b9e56fb0bd3bf280119a38b40d112..3ad22a5bbbf5494d0f9d2ec33cfe1c0c6b6b5db3 100644 (file)
@@ -58,8 +58,7 @@ config BATTERY_TOSA
 
 config TWL4030_BCI_BATTERY
        tristate "OMAP TWL4030 BCI Battery driver"
-       depends on (MACH_OMAP_2430SDP || MACH_OMAP_3430SDP || MACH_OMAP_LDP) && TWL4030_MADC
-       default y
+       depends on TWL4030_CORE && TWL4030_MADC
        help
          Support for OMAP TWL4030 BCI Battery driver.
          This driver can give support for TWL4030 Battery Charge Interface.
index a36eaae3670bf26fd7911087b06717ac51e067c9..ddba62b1a5546683c3b5f0a2743184ad2bf374f0 100644 (file)
@@ -958,17 +958,17 @@ static int __init twl4030_bci_battery_probe(struct platform_device *pdev)
        /* REVISIT do we need to request both IRQs ?? */
 
        /* 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);
        if (ret) {
                dev_dbg(&pdev->dev, "could not request irq %d, status %d\n",
-                       TWL4030_MODIRQ_BCI, ret);
+                       irq, ret);
                goto batt_irq_fail;
        }
 
-       irq = platform_get_irq(pdev, 0);
-
        /* request Power interruption */
+       irq = platform_get_irq(pdev, 0);
        ret = request_irq(irq, twl4030charger_interrupt,
                0, pdev->name, di);
 
@@ -1005,7 +1005,8 @@ bk_batt_failed:
 batt_failed:
        free_irq(irq, di);
 chg_irq_fail:
-       free_irq(TWL4030_MODIRQ_BCI, NULL);
+       irq = platform_get_irq(pdev, 1);
+       free_irq(irq, NULL);
 batt_irq_fail:
 voltage_setup_fail:
 temp_setup_fail:
@@ -1021,16 +1022,19 @@ temp_setup_fail:
 static int __exit twl4030_bci_battery_remove(struct platform_device *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_usb_en(DISABLE);
        twl4030battery_hw_level_en(DISABLE);
        twl4030battery_hw_presence_en(DISABLE);
 
-       free_irq(TWL4030_MODIRQ_BCI, NULL);
+       irq = platform_get_irq(pdev, 0);
        free_irq(irq, di);
 
+       irq = platform_get_irq(pdev, 1);
+       free_irq(irq, NULL);
+
        flush_scheduled_work();
        power_supply_unregister(&di->bat);
        power_supply_unregister(&di->bk_bat);
index 03a5b08efc26fc06d4a04e686d3e30a5bd332289..84f31d196413546078ab6663401beae3c8cbfd7b 100644 (file)
@@ -374,7 +374,7 @@ int twl4030_sih_setup(int module);
 
 /* #define TWL4030_MODIRQ_GPIO         (TWL4030_IRQ_BASE + 0) */
 /* #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_USB          (TWL4030_IRQ_BASE + 4) */
 /* #define TWL4030_MODIRQ_PWR          (TWL4030_IRQ_BASE + 5) */