common/power_button.c: Format with clang-format
BRANCH=none
TEST=none
@@ -41,8 +41,11 @@ static const struct button_config power_button = {
int power_button_signal_asserted(void)
{
- return !!(gpio_get_level(power_button.gpio)
- == (power_button.flags & BUTTON_FLAG_ACTIVE_HIGH) ? 1 : 0);
+ return !!(
+ gpio_get_level(power_button.gpio) ==
+ (power_button.flags & BUTTON_FLAG_ACTIVE_HIGH) ?
+ 1 :
+ 0);
}
/**
@@ -93,8 +96,8 @@ int power_button_wait_for_release(int timeout_us)
* the power button is debounced but not changed, or the power
* button has not been debounced.
*/
- task_wait_event(MIN(power_button.debounce_us,
- deadline.val - now.val));
+ task_wait_event(
+ MIN(power_button.debounce_us, deadline.val - now.val));
}
CPRINTS("%s released in time", power_button.name);
@@ -164,8 +167,8 @@ static void power_button_change_deferred(void)
debounced_power_pressed = new_pressed;
power_button_is_stable = 1;
- CPRINTS("%s %s",
- power_button.name, new_pressed ? "pressed" : "released");
+ CPRINTS("%s %s", power_button.name,
+ new_pressed ? "pressed" : "released");
/* Call hooks */
hook_notify(HOOK_POWER_BUTTON_CHANGE);
@@ -221,6 +224,5 @@ static int command_powerbtn(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(powerbtn, command_powerbtn,
- "[msec]",
+DECLARE_CONSOLE_COMMAND(powerbtn, command_powerbtn, "[msec]",
"Simulate power button press");
