diff options
Diffstat (limited to 'board/poppy/base_detect_lux.c')
-rw-r--r-- | board/poppy/base_detect_lux.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/board/poppy/base_detect_lux.c b/board/poppy/base_detect_lux.c index c348eb681d..8b799a3dbd 100644 --- a/board/poppy/base_detect_lux.c +++ b/board/poppy/base_detect_lux.c @@ -1,4 +1,4 @@ -/* Copyright 2018 The Chromium OS Authors. All rights reserved. +/* Copyright 2018 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -20,8 +20,8 @@ #include "timer.h" #include "util.h" -#define CPRINTS(format, args...) cprints(CC_USB, format, ## args) -#define CPRINTF(format, args...) cprintf(CC_USB, format, ## args) +#define CPRINTS(format, args...) cprints(CC_USB, format, ##args) +#define CPRINTF(format, args...) cprintf(CC_USB, format, ##args) /* Base detection and debouncing */ #define BASE_DETECT_DEBOUNCE_US (20 * MSEC) @@ -44,7 +44,7 @@ #define BASE_DISCONNECTED_CONNECT_MAX_MV 600 #define BASE_DISCONNECTED_MIN_MV 2800 -#define BASE_DISCONNECTED_MAX_MV (ADC_MAX_VOLT+1) +#define BASE_DISCONNECTED_MAX_MV (ADC_MAX_VOLT + 1) /* * When base is connected, then gets disconnected: @@ -93,7 +93,7 @@ int board_is_base_connected(void) void board_enable_base_power(int enable) { gpio_set_level(GPIO_PPVAR_VAR_BASE, - enable && current_base_status == BASE_CONNECTED); + enable && current_base_status == BASE_CONNECTED); } /* @@ -181,8 +181,7 @@ static void base_detect_deferred(void) retry: print_base_detect_value("status unclear", v); /* Unclear base status, schedule again in a while. */ - hook_call_deferred(&base_detect_deferred_data, - BASE_DETECT_RETRY_US); + hook_call_deferred(&base_detect_deferred_data, BASE_DETECT_RETRY_US); } void base_detect_interrupt(enum gpio_signal signal) @@ -216,7 +215,7 @@ static void base_init(void) hook_call_deferred(&base_detect_deferred_data, BASE_DETECT_DEBOUNCE_US); gpio_enable_interrupt(GPIO_BASE_DET_A); } -DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT+1); +DECLARE_HOOK(HOOK_INIT, base_init, HOOK_PRIO_DEFAULT + 1); void base_force_state(enum ec_set_base_state_cmd state) { @@ -230,7 +229,7 @@ void base_force_state(enum ec_set_base_state_cmd state) CPRINTS("BD forced disconnected"); } else { hook_call_deferred(&base_detect_deferred_data, - BASE_DETECT_DEBOUNCE_US); + BASE_DETECT_DEBOUNCE_US); gpio_enable_interrupt(GPIO_BASE_DET_A); CPRINTS("BD forced reset"); } |