aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajanikanth H.V <rajanikanth.hv@stericsson.com>2012-11-28 14:27:45 -0500
committerLee Jones <lee.jones@linaro.org>2012-12-11 03:43:51 -0500
commitf5695a39833a2946479f6215f3afc4f672333713 (patch)
tree34bee285578e3743c370d680fa5cbd601387363e
parenteba3b670a9166a91be5a11fe33290dca6b9457a2 (diff)
ab8500: remove explicit handling of battery type
property, battery-type shall be one of supported technology type instead blank - refer: Documentation/devicetree/bindings/power_supply/ab8500/fg.txt for the list supported types - this patch appends to ab8500 bm devs DT binding patch set ref: commit-id e0f1abeba5c2d8a2183566717d99294fd1a29c2e git://git.infradead.org/battery-2.6.git - promote ab8500_fg probe to happen before ab8500_btemp probe as btemp driver depends on fuelgauge list, ref: ab8500_fg_get(...) Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
-rw-r--r--drivers/power/Makefile2
-rw-r--r--drivers/power/ab8500_bmdata.c10
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index 696e3a960b3e..070c73d2ef02 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -38,7 +38,7 @@ obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o
38obj-$(CONFIG_BATTERY_JZ4740) += jz4740-battery.o 38obj-$(CONFIG_BATTERY_JZ4740) += jz4740-battery.o
39obj-$(CONFIG_BATTERY_INTEL_MID) += intel_mid_battery.o 39obj-$(CONFIG_BATTERY_INTEL_MID) += intel_mid_battery.o
40obj-$(CONFIG_BATTERY_RX51) += rx51_battery.o 40obj-$(CONFIG_BATTERY_RX51) += rx51_battery.o
41obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_btemp.o ab8500_fg.o abx500_chargalg.o 41obj-$(CONFIG_AB8500_BM) += ab8500_bmdata.o ab8500_charger.o ab8500_fg.o ab8500_btemp.o abx500_chargalg.o
42obj-$(CONFIG_CHARGER_ISP1704) += isp1704_charger.o 42obj-$(CONFIG_CHARGER_ISP1704) += isp1704_charger.o
43obj-$(CONFIG_CHARGER_MAX8903) += max8903_charger.o 43obj-$(CONFIG_CHARGER_MAX8903) += max8903_charger.o
44obj-$(CONFIG_CHARGER_TWL4030) += twl4030_charger.o 44obj-$(CONFIG_CHARGER_TWL4030) += twl4030_charger.o
diff --git a/drivers/power/ab8500_bmdata.c b/drivers/power/ab8500_bmdata.c
index 03cc528425cb..f16b60cd67de 100644
--- a/drivers/power/ab8500_bmdata.c
+++ b/drivers/power/ab8500_bmdata.c
@@ -461,7 +461,6 @@ bmdevs_of_probe(struct device *dev,
461 struct device_node *np_bat_supply; 461 struct device_node *np_bat_supply;
462 struct abx500_bm_data *bat; 462 struct abx500_bm_data *bat;
463 const char *btech; 463 const char *btech;
464 char bat_tech[8];
465 int i, thermistor; 464 int i, thermistor;
466 465
467 *battery = &ab8500_bm_data; 466 *battery = &ab8500_bm_data;
@@ -488,12 +487,9 @@ bmdevs_of_probe(struct device *dev,
488 "stericsson,battery-type", NULL); 487 "stericsson,battery-type", NULL);
489 if (!btech) { 488 if (!btech) {
490 dev_warn(dev, "missing property battery-name/type\n"); 489 dev_warn(dev, "missing property battery-name/type\n");
491 strcpy(bat_tech, "UNKNOWN"); 490 return -EINVAL;
492 } else {
493 strcpy(bat_tech, btech);
494 } 491 }
495 492 if (strncmp(btech, "LION", 4) == 0) {
496 if (strncmp(bat_tech, "LION", 4) == 0) {
497 bat->no_maintenance = true; 493 bat->no_maintenance = true;
498 bat->chg_unknown_bat = true; 494 bat->chg_unknown_bat = true;
499 bat->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600; 495 bat->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600;
@@ -508,7 +504,7 @@ bmdevs_of_probe(struct device *dev,
508 if (thermistor == NTC_EXTERNAL) { 504 if (thermistor == NTC_EXTERNAL) {
509 btype->batres_tbl = 505 btype->batres_tbl =
510 temp_to_batres_tbl_ext_thermistor; 506 temp_to_batres_tbl_ext_thermistor;
511 } else if (strncmp(bat_tech, "LION", 4) == 0) { 507 } else if (strncmp(btech, "LION", 4) == 0) {
512 btype->batres_tbl = 508 btype->batres_tbl =
513 temp_to_batres_tbl_9100; 509 temp_to_batres_tbl_9100;
514 } else { 510 } else {