zephyr/subsys/ap_pwrseq/signal_vw.c: Format with clang-format
BRANCH=none
TEST=none
@@ -31,9 +31,8 @@ struct vw_config {
bool invert; /* Invert the signal value */
};
-const static struct vw_config vw_config[] = {
-DT_FOREACH_STATUS_OKAY(MY_COMPAT, INIT_ESPI_SIGNAL)
-};
+const static struct vw_config vw_config[] = { DT_FOREACH_STATUS_OKAY(
+ MY_COMPAT, INIT_ESPI_SIGNAL) };
/*
* Current signal value.
@@ -49,16 +48,14 @@ static atomic_t signal_valid;
BUILD_ASSERT(ARRAY_SIZE(vw_config) <= (sizeof(atomic_t) * 8));
-static void espi_handler(const struct device *dev,
- struct espi_callback *cb,
+static void espi_handler(const struct device *dev, struct espi_callback *cb,
struct espi_event event)
{
- LOG_DBG("ESPI event type 0x%x %d:%d", event.evt_type,
- event.evt_details, event.evt_data);
+ LOG_DBG("ESPI event type 0x%x %d:%d", event.evt_type, event.evt_details,
+ event.evt_data);
switch (event.evt_type) {
default:
- __ASSERT(0, "ESPI unknown event type: %d",
- event.evt_type);
+ __ASSERT(0, "ESPI unknown event type: %d", event.evt_type);
break;
case ESPI_BUS_EVENT_CHANNEL_READY:
@@ -72,9 +69,9 @@ static void espi_handler(const struct device *dev,
case ESPI_BUS_EVENT_VWIRE_RECEIVED:
for (int i = 0; i < ARRAY_SIZE(vw_config); i++) {
if (event.evt_details == vw_config[i].espi_signal) {
- bool value = vw_config[i].invert
- ? !event.evt_data
- : !!event.evt_data;
+ bool value = vw_config[i].invert ?
+ !event.evt_data :
+ !!event.evt_data;
atomic_set_bit_to(&signal_data, i, value);
atomic_set_bit(&signal_valid, i);
@@ -118,11 +115,10 @@ void power_signal_vw_init(void)
vw_config[i].espi_signal,
&vw_value) == 0) {
atomic_set_bit_to(&signal_data, i,
- vw_config[i].invert
- ? !vw_value
- : !!vw_value);
+ vw_config[i].invert ?
+ !vw_value :
+ !!vw_value);
atomic_set_bit(&signal_valid, i);
-
}
}
}
