diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 14:51:04 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-01 13:44:49 +0000 |
commit | a5736db8229bb57cf44931d116d766704b4d6730 (patch) | |
tree | 3a852ff2a64e463cb86e2bad418c8eb940f1b33d /driver | |
parent | 1ac81ec76d3b7c28f162a92016a4c7f8d22a0eb4 (diff) | |
download | chrome-ec-a5736db8229bb57cf44931d116d766704b4d6730.tar.gz |
driver/led/ds2413.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I3b476801dc61ed301de0f3daf07b7dcab3c9debd
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729994
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/led/ds2413.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/driver/led/ds2413.c b/driver/led/ds2413.c index b856d85671..93d90f7656 100644 --- a/driver/led/ds2413.c +++ b/driver/led/ds2413.c @@ -19,12 +19,12 @@ enum led_color { LED_RED, LED_YELLOW, LED_GREEN, - LED_COLOR_COUNT /* Number of colors, not a color itself */ + LED_COLOR_COUNT /* Number of colors, not a color itself */ }; -static const uint8_t led_masks[LED_COLOR_COUNT] = {0xff, 0xfe, 0xfc, 0xfd}; -static const char * const color_names[LED_COLOR_COUNT] = { - "off", "red", "yellow", "green"}; +static const uint8_t led_masks[LED_COLOR_COUNT] = { 0xff, 0xfe, 0xfc, 0xfd }; +static const char *const color_names[LED_COLOR_COUNT] = { "off", "red", + "yellow", "green" }; /** * Set the onewire LED GPIO controller outputs @@ -48,9 +48,9 @@ static int led_set_mask(int mask) /* Write and turn on the LEDs */ onewire_write(0x5a); onewire_write(mask); - onewire_write(~mask); /* Repeat inverted */ + onewire_write(~mask); /* Repeat inverted */ - rv = onewire_read(); /* Confirmation byte */ + rv = onewire_read(); /* Confirmation byte */ if (rv != 0xaa) return EC_ERROR_UNKNOWN; @@ -161,6 +161,5 @@ static int command_powerled(int argc, char **argv) return EC_ERROR_PARAM1; } DECLARE_CONSOLE_COMMAND(powerled, command_powerled, - "<off | red | yellow | green>", - "Set power LED color"); + "<off | red | yellow | green>", "Set power LED color"); #endif |