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:
committed by
Jeremy Soller
parent
c3267fc4ad
commit
e032c5f0f2
@ -3,6 +3,7 @@
|
||||
#include <board/gpio.h>
|
||||
#include <common/debug.h>
|
||||
|
||||
// clang-format off
|
||||
struct Gpio __code ACIN_N = GPIO(B, 0);
|
||||
struct Gpio __code AC_PRESENT = GPIO(E, 1);
|
||||
struct Gpio __code ALL_SYS_PWRGD = GPIO(C, 0);
|
||||
@ -32,6 +33,7 @@ struct Gpio __code VA_EC_EN = GPIO(J, 4); // renamed to EC_SLP_SUS#
|
||||
struct Gpio __code WLAN_EN = GPIO(G, 1);
|
||||
struct Gpio __code WLAN_PWR_EN = GPIO(H, 4);
|
||||
struct Gpio __code XLP_OUT = GPIO(B, 4);
|
||||
// clang-format on
|
||||
|
||||
void gpio_init() {
|
||||
// Enable LPC reset on GPD2
|
||||
@ -244,13 +246,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:\n\tdata %d\n\tmirror %d\n\tpot %d\n\tcontrol %02X\n",
|
||||
bank,
|
||||
@ -264,7 +266,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);
|
||||
@ -275,6 +277,6 @@ void gpio_debug(void) {
|
||||
bank(H);
|
||||
bank(I);
|
||||
bank(J);
|
||||
#undef bank
|
||||
#undef bank
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user