common/button.c: Format with clang-format
BRANCH=none
TEST=none
@@ -76,10 +76,10 @@ static int raw_button_pressed(const struct button_config *button)
if (!(button->flags & BUTTON_FLAG_DISABLED)) {
if (IS_ENABLED(CONFIG_ADC_BUTTONS) &&
button_is_adc_detected(button->gpio)) {
- physical_value =
- adc_to_physical_value(button->gpio);
+ physical_value = adc_to_physical_value(button->gpio);
} else {
- physical_value = (!!gpio_get_level(button->gpio) ==
+ physical_value =
+ (!!gpio_get_level(button->gpio) ==
!!(button->flags & BUTTON_FLAG_ACTIVE_HIGH));
}
#ifdef CONFIG_SIMULATED_BUTTON
@@ -260,7 +260,6 @@ int button_disable_gpio(enum button button_type)
}
#endif
-
/*
* Handle debounced button changing state.
*/
@@ -308,9 +307,8 @@ static void button_change_deferred(void)
hook_call_deferred(
&debug_mode_handle_data, 0);
#endif
- CPRINTS("Button '%s' was %s",
- buttons[i].name, new_pressed ?
- "pressed" : "released");
+ CPRINTS("Button '%s' was %s", buttons[i].name,
+ new_pressed ? "pressed" : "released");
if (IS_ENABLED(CONFIG_MKBP_INPUT_DEVICES)) {
mkbp_button_update(buttons[i].type,
new_pressed);
@@ -327,7 +325,8 @@ static void button_change_deferred(void)
* Make sure the next deferred call happens on or before
* each button needs it.
*/
- soonest_debounce_time = (soonest_debounce_time == 0) ?
+ soonest_debounce_time =
+ (soonest_debounce_time == 0) ?
state[i].debounce_time :
MIN(soonest_debounce_time,
state[i].debounce_time);
@@ -465,8 +464,7 @@ static int console_command_button(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(button, console_command_button,
- "vup|vdown|rec msec",
+DECLARE_CONSOLE_COMMAND(button, console_command_button, "vup|vdown|rec msec",
"Simulate button press");
#endif /* CONFIG_CMD_BUTTON */
@@ -494,7 +492,6 @@ DECLARE_HOST_COMMAND(EC_CMD_BUTTON, host_command_button, EC_VER_MASK(0));
#endif /* CONFIG_HOSTCMD_BUTTON */
-
#ifdef CONFIG_EMULATED_SYSRQ
#ifdef CONFIG_DEDICATED_RECOVERY_BUTTON
@@ -721,7 +718,8 @@ static void debug_mode_handle(void)
* Schedule a deferred call in case timeout hasn't
* occurred yet.
*/
- hook_call_deferred(&debug_mode_handle_data,
+ hook_call_deferred(
+ &debug_mode_handle_data,
(debug_state_deadline.val - now.val));
}
