int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res);
 int ab8500_fg_inst_curr_started(struct ab8500_fg *di);
 int ab8500_fg_inst_curr_done(struct ab8500_fg *di);
-int ab8500_bm_of_probe(struct device *dev,
-                      struct device_node *np,
+int ab8500_bm_of_probe(struct power_supply *psy,
                       struct ab8500_bm_data *bm);
 
 extern struct platform_driver ab8500_fg_driver;
 
         .n_chg_in_curr          = ARRAY_SIZE(ab8500_charge_input_curr_map),
 };
 
-int ab8500_bm_of_probe(struct device *dev,
-                      struct device_node *np,
+int ab8500_bm_of_probe(struct power_supply *psy,
                       struct ab8500_bm_data *bm)
 {
        const struct batres_vs_temp *tmp_batres_tbl;
-       struct device_node *battery_node;
-       const char *btech;
+       struct power_supply_battery_info info;
+       struct device *dev = &psy->dev;
+       int ret;
        int i;
 
-       battery_node = of_parse_phandle(np, "monitored-battery", 0);
-       if (!battery_node) {
-               dev_err(dev, "battery node or reference missing\n");
-               return -EINVAL;
+       ret = power_supply_get_battery_info(psy, &info);
+       if (ret) {
+               dev_err(dev, "cannot retrieve battery info\n");
+               return ret;
        }
 
-       btech = of_get_property(battery_node, "stericsson,battery-type", NULL);
-       if (!btech) {
-               dev_warn(dev, "missing property battery-name/type\n");
-               of_node_put(battery_node);
-               return -EINVAL;
-       }
-
-       if (strncmp(btech, "LION", 4) == 0) {
+       if (info.technology == POWER_SUPPLY_TECHNOLOGY_LION) {
                bm->no_maintenance  = true;
                bm->chg_unknown_bat = true;
                bm->bat_type[BATTERY_UNKNOWN].charge_full_design = 2600;
                bm->bat_type[BATTERY_UNKNOWN].normal_vol_lvl     = 4200;
        }
 
-       if (of_property_read_bool(battery_node, "thermistor-on-batctrl")) {
-               if (strncmp(btech, "LION", 4) == 0)
+       if (of_property_read_bool(psy->of_node, "thermistor-on-batctrl")) {
+               if (info.technology == POWER_SUPPLY_TECHNOLOGY_LION)
                        tmp_batres_tbl = temp_to_batres_tbl_9100;
                else
                        tmp_batres_tbl = temp_to_batres_tbl_thermistor;
        for (i = 0; i < bm->n_btypes; ++i)
                bm->bat_type[i].batres_tbl = tmp_batres_tbl;
 
-       of_node_put(battery_node);
+       power_supply_put_battery_info(psy, &info);
 
        return 0;
 }
 
 
        di->bm = &ab8500_bm_data;
 
-       ret = ab8500_bm_of_probe(dev, np, di->bm);
-       if (ret) {
-               dev_err(dev, "failed to get battery information\n");
-               return ret;
-       }
        di->autopower_cfg = of_property_read_bool(np, "autopower_cfg");
 
        /* get parent data */
        di->invalid_charger_detect_state = 0;
 
        /* AC and USB supply config */
+       ac_psy_cfg.of_node = np;
        ac_psy_cfg.supplied_to = supply_interface;
        ac_psy_cfg.num_supplicants = ARRAY_SIZE(supply_interface);
        ac_psy_cfg.drv_data = &di->ac_chg;
+       usb_psy_cfg.of_node = np;
        usb_psy_cfg.supplied_to = supply_interface;
        usb_psy_cfg.num_supplicants = ARRAY_SIZE(supply_interface);
        usb_psy_cfg.drv_data = &di->usb_chg;
                return PTR_ERR(di->usb_chg.psy);
        }
 
+       /*
+        * Check what battery we have, since we always have the USB
+        * psy, use that as a handle.
+        */
+       ret = ab8500_bm_of_probe(di->usb_chg.psy, di->bm);
+       if (ret)
+               return dev_err_probe(dev, ret,
+                                    "failed to get battery information\n");
+
        /* Identify the connected charger types during startup */
        charger_status = ab8500_charger_detect_chargers(di, true);
        if (charger_status & AC_PW_CONN) {