driver/ina3221.c: Format with clang-format
BRANCH=none
TEST=none
@@ -27,8 +27,7 @@ static uint16_t ina3221_read(unsigned int unit, uint8_t reg)
int res;
int val;
- res = i2c_read16(ina3221[unit].port, ina3221[unit].address,
- reg, &val);
+ res = i2c_read16(ina3221[unit].port, ina3221[unit].address, reg, &val);
if (res) {
CPRINTS("INA3221 I2C read failed");
return 0x0bad;
@@ -51,8 +50,8 @@ static int ina3221_write(unsigned int unit, uint8_t reg, uint16_t val)
int res;
uint16_t be_val = (val >> 8) | ((val & 0xff) << 8);
- res = i2c_write16(ina3221[unit].port, ina3221[unit].address,
- reg, be_val);
+ res = i2c_write16(ina3221[unit].port, ina3221[unit].address, reg,
+ be_val);
if (res)
CPRINTS("INA3221 I2C write failed");
return res;
@@ -93,12 +92,12 @@ static void ina3221_dump(unsigned int unit)
if (ina3221[unit].name[chan] != NULL) {
sv[chan] = ina3221_chan_read(unit, chan,
INA3221_SHUNT_VOLT);
- bv[chan] = ina3221_chan_read(unit, chan,
- INA3221_BUS_VOLT);
- crit[chan] = ina3221_chan_read(unit, chan,
- INA3221_CRITICAL);
- warn[chan] = ina3221_chan_read(unit, chan,
- INA3221_WARNING);
+ bv[chan] =
+ ina3221_chan_read(unit, chan, INA3221_BUS_VOLT);
+ crit[chan] =
+ ina3221_chan_read(unit, chan, INA3221_CRITICAL);
+ warn[chan] =
+ ina3221_chan_read(unit, chan, INA3221_WARNING);
}
}
mask = ina3221_read(unit, INA3221_REG_MASK);
@@ -156,7 +155,6 @@ static int command_ina(int argc, char **argv)
return EC_ERROR_INVAL;
}
-DECLARE_CONSOLE_COMMAND(ina, command_ina,
- "<index> [config|mask <val>]",
+DECLARE_CONSOLE_COMMAND(ina, command_ina, "<index> [config|mask <val>]",
"INA3221 voltage sensing");
#endif
