[PATCH v2 3/3] drivers:power:twl4030-charger: don't check if battery is present
From: H. Nikolaus Schaller
Date: Mon Nov 02 2015 - 06:28:23 EST
We can't assume that the battery is present after probing (it can
sometimes be removed/hot swapped by the user while device
(e.g. GTA04 or OpenPanodra) is operated through external AC
or USB power).
So it makes no sense to check for this situation (only) during probe.
Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
---
drivers/power/twl4030_charger.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
index 05d693d..6fbdf24 100644
--- a/drivers/power/twl4030_charger.c
+++ b/drivers/power/twl4030_charger.c
@@ -1006,13 +1006,6 @@ static int twl4030_bci_probe(struct platform_device *pdev)
bci->irq_chg = platform_get_irq(pdev, 0);
bci->irq_bci = platform_get_irq(pdev, 1);
- /* Only proceed further *IF* battery is physically present */
- ret = twl4030_is_battery_present(bci);
- if (ret) {
- dev_crit(&pdev->dev, "Battery was not detected:%d\n", ret);
- return ret;
- }
-
platform_set_drvdata(pdev, bci);
bci->ac = devm_power_supply_register(&pdev->dev, &twl4030_bci_ac_desc,
--
2.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/