+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2013 Samsung Electronics
* Piotr Wilczek <p.wilczek@samsung.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <log.h>
#include <power/pmic.h>
#include <power/max77693_fg.h>
#include <i2c.h>
if (pmic_probe(p)) {
puts("Can't find max77693 fuel gauge\n");
- return -1;
+ return -ENODEV;
}
ret = max77693_get_soc(&pb->bat->state_of_chrg);
return ret;
max77693_get_vcell(&pb->bat->voltage_uV);
- if (ret)
- return ret;
return 0;
}
if (pmic_probe(p)) {
puts("Can't find max77693 fuel gauge\n");
- return -1;
+ return -ENODEV;
}
ret = pmic_reg_read(p, MAX77693_STATUS, &val);