diff --git a/src/board/system76/common/charger/bq24780s.c b/src/board/system76/common/charger/bq24780s.c index 3b3e1ad..eb3d102 100644 --- a/src/board/system76/common/charger/bq24780s.c +++ b/src/board/system76/common/charger/bq24780s.c @@ -145,7 +145,11 @@ int16_t battery_charger_enable(void) { return res; // Set input current in mA - res = smbus_write(CHARGER_ADDRESS, REG_INPUT_CURRENT, INPUT_CURRENT(battery_charger_input_current)); + res = smbus_write( + CHARGER_ADDRESS, + REG_INPUT_CURRENT, + INPUT_CURRENT(battery_charger_input_current) + ); if (res < 0) return res; diff --git a/src/board/system76/common/charger/oz26786.c b/src/board/system76/common/charger/oz26786.c index 391259a..81e92a2 100644 --- a/src/board/system76/common/charger/oz26786.c +++ b/src/board/system76/common/charger/oz26786.c @@ -145,7 +145,11 @@ int16_t battery_charger_enable(void) { return res; // Set input current in mA - res = smbus_write(CHARGER_ADDRESS, REG_ADAPTER_CURRENT, INPUT_CURRENT(battery_charger_input_current)); + res = smbus_write( + CHARGER_ADDRESS, + REG_ADAPTER_CURRENT, + INPUT_CURRENT(battery_charger_input_current) + ); if (res < 0) return res; diff --git a/src/board/system76/common/power.c b/src/board/system76/common/power.c index 0ea1032..a0e89b6 100644 --- a/src/board/system76/common/power.c +++ b/src/board/system76/common/power.c @@ -355,8 +355,7 @@ void power_cpu_reset(void) { //TODO: if this returns false, retry? power_peci_limit( // AC is connected - (!gpio_get(&ACIN_N)) - && + (!gpio_get(&ACIN_N)) && // There is available current (battery_charger_input_current >= CHARGER_INPUT_CURRENT) ); diff --git a/src/board/system76/common/usbpd/tps65987.c b/src/board/system76/common/usbpd/tps65987.c index 2af7ef6..9b0341a 100644 --- a/src/board/system76/common/usbpd/tps65987.c +++ b/src/board/system76/common/usbpd/tps65987.c @@ -23,11 +23,8 @@ static int16_t usbpd_current_limit(void) { int16_t res = i2c_get(&I2C_USBPD, USBPD_ADDRESS, REG_ACTIVE_CONTRACT_PDO, value, sizeof(value)); if (res == 7) { if (value[0] == 6) { - uint32_t pdo = - ((uint32_t)value[1]) | - (((uint32_t)value[2]) << 8) | - (((uint32_t)value[3]) << 16) | - (((uint32_t)value[4]) << 24); + uint32_t pdo = ((uint32_t)value[1]) | (((uint32_t)value[2]) << 8) | + (((uint32_t)value[3]) << 16) | (((uint32_t)value[4]) << 24); DEBUG("USBPD PDO %08lX ", pdo); uint8_t kind = (uint8_t)((pdo >> 30) & 0b11); if (kind == 0b00) { @@ -73,7 +70,7 @@ static int16_t usbpd_current_limit(void) { static void usbpd_dump(void) { /* Dump all registers for debugging */ - for(uint8_t reg = 0x00; reg < 0x40; reg+=1) { + for (uint8_t reg = 0x00; reg < 0x40; reg += 1) { uint8_t value[65] = { 0 }; int16_t res = i2c_get(&I2C_USBPD, USBPD_ADDRESS, reg, value, sizeof(value)); if (res < 0) {