diff options
author | Rajanikanth H.V <rajanikanth.hv@stericsson.com> | 2012-11-19 03:45:41 +0100 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-11-19 04:37:04 +0100 |
commit | e0f1abeba5c2d8a2183566717d99294fd1a29c2e (patch) | |
tree | bf4b3582791d3e4baa298f4268cf2bbad8169b74 /drivers/power/abx500_chargalg.c | |
parent | twl4030_charger: Change TWL4030_MODULE_* ids to TWL_MODULE_* (diff) | |
download | linux-e0f1abeba5c2d8a2183566717d99294fd1a29c2e.tar.xz linux-e0f1abeba5c2d8a2183566717d99294fd1a29c2e.zip |
ab8500: Add devicetree support for fuelgauge
- This patch adds device tree support for fuelgauge driver
- optimize bm devices platform_data usage and of_probe(...)
Note: of_probe() routine for battery managed devices is made
common across all bm drivers.
- test status:
- interrupt numbers assigned differs between legacy and FDT mode.
Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power/abx500_chargalg.c')
-rw-r--r-- | drivers/power/abx500_chargalg.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index 4d302803ffcc..758ea76de2f8 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -231,7 +231,7 @@ struct abx500_chargalg { struct abx500_chargalg_charger_info chg_info; struct abx500_chargalg_battery_data batt_data; struct abx500_chargalg_suspension_status susp_status; - struct abx500_chargalg_platform_data *pdata; + struct abx500_bmdevs_plat_data *pdata; struct abx500_bm_data *bat; struct power_supply chargalg_psy; struct ux500_charger *ac_chg; @@ -1802,7 +1802,7 @@ static int __devexit abx500_chargalg_remove(struct platform_device *pdev) static int __devinit abx500_chargalg_probe(struct platform_device *pdev) { - struct abx500_bm_plat_data *plat_data; + struct abx500_bmdevs_plat_data *plat_data; int ret = 0; struct abx500_chargalg *di = @@ -1812,10 +1812,8 @@ static int __devinit abx500_chargalg_probe(struct platform_device *pdev) /* get device struct */ di->dev = &pdev->dev; - plat_data = pdev->dev.platform_data; - di->pdata = plat_data->chargalg; - di->bat = plat_data->battery; + di->pdata = plat_data; /* chargalg supply */ di->chargalg_psy.name = "abx500_chargalg"; |