diff --git a/src/board/system76/common/dgpu.c b/src/board/system76/common/dgpu.c index 1fd7c8c9d..0269e3a32 100644 --- a/src/board/system76/common/dgpu.c +++ b/src/board/system76/common/dgpu.c @@ -31,8 +31,7 @@ int16_t dgpu_temp = 0; #define DGPU_TEMP(X) ((int16_t)(X)) -#define FAN_POINT(T, D) \ - { .temp = DGPU_TEMP(T), .duty = PWM_DUTY(D) } +#define FAN_POINT(T, D) { .temp = DGPU_TEMP(T), .duty = PWM_DUTY(D) } // Fan curve with temperature in degrees C, duty cycle in percent static struct FanPoint FAN_POINTS[] = { diff --git a/src/board/system76/common/include/board/peci.h b/src/board/system76/common/include/board/peci.h index 3931fe24e..61243c9da 100644 --- a/src/board/system76/common/include/board/peci.h +++ b/src/board/system76/common/include/board/peci.h @@ -15,12 +15,12 @@ #define PECI_PL_ENABLE BIT(15) #define PECI_PL_CLAMP BIT(16) #define PECI_PL_TIME_WINDOW(time, duty) \ - ((uint32_t)((time)&0x3f) << 17 | (uint32_t)((duty)&0xf) << 24) + ((uint32_t)((time) & 0x3f) << 17 | (uint32_t)((duty) & 0xf) << 24) -#define PECI_PSYS_PL2(watts) ((watts)*8 | PECI_PL_ENABLE | PECI_PL_CLAMP) +#define PECI_PSYS_PL2(watts) ((watts) * 8 | PECI_PL_ENABLE | PECI_PL_CLAMP) #define PECI_PL3(watts, time, duty) \ - ((watts)*8 | PECI_PL_ENABLE | PECI_PL_CLAMP | PECI_PL_TIME_WINDOW(time, duty)) -#define PECI_PL4(watts) ((watts)*8) + ((watts) * 8 | PECI_PL_ENABLE | PECI_PL_CLAMP | PECI_PL_TIME_WINDOW(time, duty)) +#define PECI_PL4(watts) ((watts) * 8) // Set the CPU power limit appropriately extern bool peci_on; diff --git a/src/board/system76/common/usbpd/tps65987.c b/src/board/system76/common/usbpd/tps65987.c index 63426b24f..8b769b254 100644 --- a/src/board/system76/common/usbpd/tps65987.c +++ b/src/board/system76/common/usbpd/tps65987.c @@ -53,7 +53,7 @@ enum { PDO_KIND_AUGUMENTED, }; -#define PDO_CURRENT_MA(pdo) (((pdo)&0x3FF) * 10) +#define PDO_CURRENT_MA(pdo) (((pdo) & 0x3FF) * 10) static int16_t usbpd_current_limit(uint8_t address) { uint8_t value[7] = { 0 }; diff --git a/src/ec/ite/adc.c b/src/ec/ite/adc.c index aefb51d7e..5b3a6eb47 100644 --- a/src/ec/ite/adc.c +++ b/src/ec/ite/adc.c @@ -8,14 +8,7 @@ // Based on chromium EC chip/it83xx/adc.c const struct Vch adc_channels[] = { - VCH(0), - VCH(1), - VCH(2), - VCH(3), - VCH(4), - VCH(5), - VCH(6), - VCH(7), + VCH(0), VCH(1), VCH(2), VCH(3), VCH(4), VCH(5), VCH(6), VCH(7), }; void adc_init(void) { @@ -72,8 +65,7 @@ int16_t adc_read_channel(uint8_t ch) { } }; - uint32_t measurement = (((*adc_channels[ch].data_hi) & 0x03) << 8) - | *adc_channels[ch].data_lo; + uint32_t measurement = (((*adc_channels[ch].data_hi) & 0x03) << 8) | *adc_channels[ch].data_lo; adc_disable_channel(ch);