common/gpio_commands.c: Format with clang-format
BRANCH=none
TEST=none
@@ -88,17 +88,12 @@ struct gpio_flag_description {
};
__maybe_unused static const struct gpio_flag_description gpio_descriptions[] = {
- {GPIO_INPUT, "I"},
- {GPIO_OUTPUT, "O"},
- {GPIO_LOW, "L"},
- {GPIO_HIGH, "H"},
- {GPIO_OPEN_DRAIN, "ODR"},
- {GPIO_PULL_UP, "PU"},
- {GPIO_PULL_DOWN, "PD"},
- {GPIO_SEL_1P8V, "1P8"},
+ { GPIO_INPUT, "I" }, { GPIO_OUTPUT, "O" },
+ { GPIO_LOW, "L" }, { GPIO_HIGH, "H" },
+ { GPIO_OPEN_DRAIN, "ODR" }, { GPIO_PULL_UP, "PU" },
+ { GPIO_PULL_DOWN, "PD" }, { GPIO_SEL_1P8V, "1P8" },
#ifndef CONFIG_ZEPHYR
- {GPIO_ANALOG, "A"},
- {GPIO_ALTERNATE, "ALT"},
+ { GPIO_ANALOG, "A" }, { GPIO_ALTERNATE, "ALT" },
{ GPIO_LOCKED, "LCK" }
#endif
};
@@ -113,7 +108,8 @@ static void print_gpio_info(int gpio)
v = gpio_get_level(gpio);
changed = last_val_changed(gpio, v);
- /* Split the printf call into multiple calls to reduce the stack usage. */
+ /* Split the printf call into multiple calls to reduce the stack usage.
+ */
ccprintf(" %d%c ", v, (changed ? '*' : ' '));
if (IS_ENABLED(CONFIG_CMD_GPIO_EXTENDED)) {
@@ -155,8 +151,7 @@ static int command_gpio_get(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_SAFE_CONSOLE_COMMAND(gpioget, command_gpio_get,
- "[name]",
+DECLARE_SAFE_CONSOLE_COMMAND(gpioget, command_gpio_get, "[name]",
"Read GPIO value(s)");
static int command_gpio_set(int argc, char **argv)
@@ -222,9 +217,7 @@ DECLARE_CONSOLE_COMMAND_FLAGS(gpioset, command_gpio_set,
#else
"name <0 | 1>",
#endif
- "Set a GPIO",
- CMD_FLAG_RESTRICTED
-);
+ "Set a GPIO", CMD_FLAG_RESTRICTED);
/*****************************************************************************/
/* Host commands */
@@ -277,7 +270,6 @@ static enum ec_status gpio_command_get(struct host_cmd_handler_args *args)
}
return EC_RES_SUCCESS;
-
}
DECLARE_HOST_COMMAND(EC_CMD_GPIO_GET, gpio_command_get,
EC_VER_MASK(0) | EC_VER_MASK(1));
