@@ -1299,11 +1299,12 @@ static void abx500_chargalg_algorithm(struct abx500_chargalg *di)
abx500_chargalg_check_charger_voltage(di);
charger_status = abx500_chargalg_check_charger_connection(di);
- ret = abx500_chargalg_check_charger_enable(di);
- if (ret < 0)
- dev_err(di->dev, "Checking charger if enabled error: %d line: %d\n",
- ret, __LINE__);
-
+ if (is_ab8500(di->parent)) {
+ ret = abx500_chargalg_check_charger_enable(di);
+ if (ret < 0)
+ dev_err(di->dev, "Checking charger is enabled error");
+ dev_err(di->dev, ": Returned Value %d\n", ret);
+ }
/*
* First check if we have a charger connected.
* Also we don't allow charging of unknown batteries if configured