baseboard/honeybuns/baseboard.c: Format with clang-format
BRANCH=none
TEST=none
#define BUTTON_EVT_CHANGE BIT(0)
#define BUTTON_EVT_INFO BIT(1)
-enum power {
- POWER_OFF,
- POWER_ON
-};
+enum power { POWER_OFF, POWER_ON };
enum button {
BUTTON_RELEASE,
@@ -89,20 +86,16 @@ __maybe_unused static void board_power_sequence(int enable)
/******************************************************************************/
/* I2C port map configuration */
const struct i2c_port_t i2c_ports[] = {
- {
- .name = "i2c1",
+ { .name = "i2c1",
.port = I2C_PORT_I2C1,
.kbps = 400,
.scl = GPIO_EC_I2C1_SCL,
- .sda = GPIO_EC_I2C1_SDA
- },
- {
- .name = "i2c3",
+ .sda = GPIO_EC_I2C1_SDA },
+ { .name = "i2c3",
.port = I2C_PORT_I2C3,
.kbps = 400,
.scl = GPIO_EC_I2C3_SCL,
- .sda = GPIO_EC_I2C3_SDA
- },
+ .sda = GPIO_EC_I2C3_SDA },
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
@@ -381,8 +374,8 @@ void power_button_task(void *u)
* Default wait state: Only need to check if the button
* is pressed and start the short press timer.
*/
- if (evt & BUTTON_EVT_CHANGE && button_level ==
- BUTTON_PRESSED_LEVEL) {
+ if (evt & BUTTON_EVT_CHANGE &&
+ button_level == BUTTON_PRESSED_LEVEL) {
state = BUTTON_PRESS;
timer_us = (POWER_BUTTON_SHORT_USEC -
POWER_BUTTON_DEBOUNCE_USEC);
@@ -476,7 +469,6 @@ void baseboard_power_button_evt(int level)
static int command_pwr_btn(int argc, char **argv)
{
-
if (argc == 1) {
task_set_event(TASK_ID_POWER_BUTTON, BUTTON_EVT_INFO);
return EC_SUCCESS;
@@ -494,8 +486,7 @@ static int command_pwr_btn(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(pwr_btn, command_pwr_btn,
- "<on|off|mf>",
+DECLARE_CONSOLE_COMMAND(pwr_btn, command_pwr_btn, "<on|off|mf>",
"Simulate Power Button Press");
#endif
