diff options
Diffstat (limited to 'board/brask/led.c')
-rw-r--r-- | board/brask/led.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/board/brask/led.c b/board/brask/led.c index 68dffb67a7..0a57994ca0 100644 --- a/board/brask/led.c +++ b/board/brask/led.c @@ -1,4 +1,4 @@ -/* Copyright 2021 The Chromium OS Authors. All rights reserved. +/* Copyright 2021 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * @@ -19,16 +19,16 @@ #include "timer.h" #include "util.h" -#define CPRINTS(format, args...) cprints(CC_GPIO, format, ## args) +#define CPRINTS(format, args...) cprints(CC_GPIO, format, ##args) /* * Due to the CSME-Lite processing, upon startup the CPU transitions through * S0->S3->S5->S3->S0, causing the LED to turn on/off/on, so * delay turning off the LED during suspend/shutdown. */ -#define LED_CPU_DELAY_MS (2000 * MSEC) +#define LED_CPU_DELAY_MS (2000 * MSEC) -const enum ec_led_id supported_led_ids[] = {EC_LED_ID_POWER_LED}; +const enum ec_led_id supported_led_ids[] = { EC_LED_ID_POWER_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); enum led_color { @@ -84,9 +84,9 @@ static int set_color(enum ec_led_id id, enum led_color color, int duty) } } -#define LED_PULSE_US (2 * SECOND) +#define LED_PULSE_US (2 * SECOND) /* 40 msec for nice and smooth transition. */ -#define LED_PULSE_TICK_US (40 * MSEC) +#define LED_PULSE_TICK_US (40 * MSEC) /* * When pulsing is enabled, brightness is incremented by <duty_inc> every @@ -206,7 +206,7 @@ void show_critical_error(void) set_color(EC_LED_ID_POWER_LED, LED_RED, 100); } -static int command_led(int argc, char **argv) +static int command_led(int argc, const char **argv) { enum ec_led_id id = EC_LED_ID_POWER_LED; @@ -231,8 +231,7 @@ static int command_led(int argc, char **argv) } return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(led, command_led, - "[debug|red|green|off|alert|crit]", +DECLARE_CONSOLE_COMMAND(led, command_led, "[debug|red|green|off|alert|crit]", "Turn on/off LED."); void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range) @@ -250,10 +249,10 @@ int led_set_brightness(enum ec_led_id id, const uint8_t *brightness) else return set_color(id, LED_OFF, 0); } -void board_set_charge_limit(int port, int supplier, int charge_ma, - int max_ma, int charge_mv) +void board_set_charge_limit(int port, int supplier, int charge_ma, int max_ma, + int charge_mv) { - /* Blink alert if insufficient power per system_can_boot_ap(). */ + /* Blink alert if insufficient power per system_can_boot_ap(). */ int insufficient_power = (charge_ma * charge_mv) < (CONFIG_CHARGER_MIN_POWER_MW_FOR_POWER_ON * 1000); |