bdk: power: homogenize return values
This commit is contained in:
@@ -69,7 +69,7 @@ int max17050_get_version(u32 *value)
|
||||
if (data == 0x00AC)
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int max17050_get_property(enum MAX17050_reg reg, int *value)
|
||||
@@ -138,7 +138,7 @@ int max17050_get_property(enum MAX17050_reg reg, int *value)
|
||||
*value = (int)(s16)data * 15625 / ADJ_RSENSE_MOHM / 10; /* Units of LSB = 1.5625uV / Rsense = 156.25uA */
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ static void _max17050_set_por_bit(u16 value)
|
||||
_max17050_write_verify_reg(MAX17050_STATUS, value);
|
||||
}
|
||||
|
||||
int max17050_fix_configuration()
|
||||
void max17050_fix_configuration()
|
||||
{
|
||||
/* Init phase, set the POR bit */
|
||||
_max17050_set_por_bit(STATUS_POR_BIT);
|
||||
@@ -281,8 +281,6 @@ int max17050_fix_configuration()
|
||||
|
||||
// Sets POR, BI, BR.
|
||||
_max17050_set_por_bit(0x8801);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void max17050_dump_regs(void *buf)
|
||||
|
||||
Reference in New Issue
Block a user