Update .clang-format and apply

Update .clang-format for LLVM 14.0, available on Ubuntu 22.04.

There is still plenty that clang-format sucks at or does wrong, so
either add some more blocks to disable it, or just put up with it.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-01-06 13:47:21 -07:00
committed by Jeremy Soller
parent c3267fc4ad
commit e032c5f0f2
99 changed files with 1766 additions and 1517 deletions

View File

@ -39,7 +39,7 @@ struct Gpio __code VA_EC_EN = GPIO(J, 4);
struct Gpio __code WLAN_EN = GPIO(G, 1);
struct Gpio __code WLAN_PWR_EN = GPIO(A, 3);
struct Gpio __code XLP_OUT = GPIO(B, 4);
// clange-format on
// clang-format on
void gpio_init() {
// Enable LPC reset on GPD2
@ -251,13 +251,13 @@ void gpio_init() {
#if GPIO_DEBUG
void gpio_debug_bank(
char * bank,
char *bank,
uint8_t data,
uint8_t mirror,
uint8_t pot,
volatile uint8_t * control
volatile uint8_t *control
) {
for(char i = 0; i < 8; i++) {
for (char i = 0; i < 8; i++) {
DEBUG(
"%s%d: data %d mirror %d pot %d control %02X\n",
bank,
@ -271,7 +271,7 @@ void gpio_debug_bank(
}
void gpio_debug(void) {
#define bank(BANK) gpio_debug_bank(#BANK, GPDR ## BANK, GPDMR ## BANK, GPOT ## BANK, &GPCR ## BANK ## 0)
#define bank(BANK) gpio_debug_bank(#BANK, GPDR##BANK, GPDMR##BANK, GPOT##BANK, &GPCR##BANK##0)
bank(A);
bank(B);
bank(C);
@ -282,9 +282,9 @@ void gpio_debug(void) {
bank(H);
bank(I);
bank(J);
#define GPOTM 0
#define GPOTM 0
bank(M);
#undef GPOTM
#undef bank
#undef GPOTM
#undef bank
}
#endif