Skip to content

Commit 0f9d722

Browse files
committed
Fix style
1 parent d565cae commit 0f9d722

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

src/board/system76/common/charger/bq24780s.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ int16_t battery_charger_enable(void) {
145145
return res;
146146

147147
// Set input current in mA
148-
res = smbus_write(CHARGER_ADDRESS, REG_INPUT_CURRENT, INPUT_CURRENT(battery_charger_input_current));
148+
res = smbus_write(
149+
CHARGER_ADDRESS,
150+
REG_INPUT_CURRENT,
151+
INPUT_CURRENT(battery_charger_input_current)
152+
);
149153
if (res < 0)
150154
return res;
151155

src/board/system76/common/charger/oz26786.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ int16_t battery_charger_enable(void) {
145145
return res;
146146

147147
// Set input current in mA
148-
res = smbus_write(CHARGER_ADDRESS, REG_ADAPTER_CURRENT, INPUT_CURRENT(battery_charger_input_current));
148+
res = smbus_write(
149+
CHARGER_ADDRESS,
150+
REG_ADAPTER_CURRENT,
151+
INPUT_CURRENT(battery_charger_input_current)
152+
);
149153
if (res < 0)
150154
return res;
151155

src/board/system76/common/power.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,7 @@ void power_cpu_reset(void) {
355355
//TODO: if this returns false, retry?
356356
power_peci_limit(
357357
// AC is connected
358-
(!gpio_get(&ACIN_N))
359-
&&
358+
(!gpio_get(&ACIN_N)) &&
360359
// There is available current
361360
(battery_charger_input_current >= CHARGER_INPUT_CURRENT)
362361
);

src/board/system76/common/usbpd/tps65987.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ static int16_t usbpd_current_limit(void) {
2323
int16_t res = i2c_get(&I2C_USBPD, USBPD_ADDRESS, REG_ACTIVE_CONTRACT_PDO, value, sizeof(value));
2424
if (res == 7) {
2525
if (value[0] == 6) {
26-
uint32_t pdo =
27-
((uint32_t)value[1]) |
28-
(((uint32_t)value[2]) << 8) |
29-
(((uint32_t)value[3]) << 16) |
30-
(((uint32_t)value[4]) << 24);
26+
uint32_t pdo = ((uint32_t)value[1]) | (((uint32_t)value[2]) << 8) |
27+
(((uint32_t)value[3]) << 16) | (((uint32_t)value[4]) << 24);
3128
DEBUG("USBPD PDO %08lX ", pdo);
3229
uint8_t kind = (uint8_t)((pdo >> 30) & 0b11);
3330
if (kind == 0b00) {
@@ -73,7 +70,7 @@ static int16_t usbpd_current_limit(void) {
7370

7471
static void usbpd_dump(void) {
7572
/* Dump all registers for debugging */
76-
for(uint8_t reg = 0x00; reg < 0x40; reg+=1) {
73+
for (uint8_t reg = 0x00; reg < 0x40; reg += 1) {
7774
uint8_t value[65] = { 0 };
7875
int16_t res = i2c_get(&I2C_USBPD, USBPD_ADDRESS, reg, value, sizeof(value));
7976
if (res < 0) {

0 commit comments

Comments
 (0)