mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
power: ab8500: Require device tree
The core AB8500 driver and the whole platform is completely dependent on being probed from device tree so remove the non-DT probe paths. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
a38fd87484
commit
53207aa1a7
5 changed files with 19 additions and 28 deletions
|
@ -698,7 +698,7 @@ config BATTERY_GAUGE_LTC2941
|
||||||
|
|
||||||
config AB8500_BM
|
config AB8500_BM
|
||||||
bool "AB8500 Battery Management Driver"
|
bool "AB8500 Battery Management Driver"
|
||||||
depends on AB8500_CORE && AB8500_GPADC && (IIO = y)
|
depends on AB8500_CORE && AB8500_GPADC && (IIO = y) && OF
|
||||||
help
|
help
|
||||||
Say Y to include support for AB8500 battery management.
|
Say Y to include support for AB8500 battery management.
|
||||||
|
|
||||||
|
|
|
@ -1008,13 +1008,11 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
di->bm = plat;
|
di->bm = plat;
|
||||||
|
|
||||||
if (np) {
|
|
||||||
ret = ab8500_bm_of_probe(dev, np, di->bm);
|
ret = ab8500_bm_of_probe(dev, np, di->bm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to get battery information\n");
|
dev_err(dev, "failed to get battery information\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* get parent data */
|
/* get parent data */
|
||||||
di->dev = dev;
|
di->dev = dev;
|
||||||
|
|
|
@ -3360,15 +3360,12 @@ static int ab8500_charger_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
di->bm = plat;
|
di->bm = plat;
|
||||||
|
|
||||||
if (np) {
|
|
||||||
ret = ab8500_bm_of_probe(dev, np, di->bm);
|
ret = ab8500_bm_of_probe(dev, np, di->bm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to get battery information\n");
|
dev_err(dev, "failed to get battery information\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
di->autopower_cfg = of_property_read_bool(np, "autopower_cfg");
|
di->autopower_cfg = of_property_read_bool(np, "autopower_cfg");
|
||||||
} else
|
|
||||||
di->autopower_cfg = false;
|
|
||||||
|
|
||||||
/* get parent data */
|
/* get parent data */
|
||||||
di->dev = dev;
|
di->dev = dev;
|
||||||
|
|
|
@ -3043,13 +3043,11 @@ static int ab8500_fg_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
di->bm = plat;
|
di->bm = plat;
|
||||||
|
|
||||||
if (np) {
|
|
||||||
ret = ab8500_bm_of_probe(dev, np, di->bm);
|
ret = ab8500_bm_of_probe(dev, np, di->bm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to get battery information\n");
|
dev_err(dev, "failed to get battery information\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mutex_init(&di->cc_lock);
|
mutex_init(&di->cc_lock);
|
||||||
|
|
||||||
|
|
|
@ -1997,13 +1997,11 @@ static int abx500_chargalg_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
di->bm = plat;
|
di->bm = plat;
|
||||||
|
|
||||||
if (np) {
|
|
||||||
ret = ab8500_bm_of_probe(&pdev->dev, np, di->bm);
|
ret = ab8500_bm_of_probe(&pdev->dev, np, di->bm);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "failed to get battery information\n");
|
dev_err(&pdev->dev, "failed to get battery information\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* get device struct and parent */
|
/* get device struct and parent */
|
||||||
di->dev = &pdev->dev;
|
di->dev = &pdev->dev;
|
||||||
|
|
Loading…
Reference in a new issue