/* Return the battery Voltage in milivolts Or < 0 if something fails.  */
static int bq27x00_battery_voltage(struct bq27x00_device_info *di)
/* Return the battery Voltage in milivolts Or < 0 if something fails.  */
static int bq27x00_battery_voltage(struct bq27x00_device_info *di)
{
	int ret;
	int volt = 0;
	ret = bq27x00_read(BQ27x00_REG_VOLT, &volt, 0, di);
	if (ret) {
		dev_err(di->dev, "error reading voltage\n");
		return ret;
	}
	return volt;
}