zephyr/drivers/cros_system/cros_system_it8xxx2.c: Format with clang-format
BRANCH=none
TEST=none
@@ -36,8 +36,7 @@ static uint32_t system_get_chip_id(void)
struct gctrl_it8xxx2_regs *const gctrl_base = GCTRL_IT8XXX2_REG_BASE;
return (gctrl_base->GCTRL_ECHIPID1 << 16) |
- (gctrl_base->GCTRL_ECHIPID2 << 8) |
- gctrl_base->GCTRL_ECHIPID3;
+ (gctrl_base->GCTRL_ECHIPID2 << 8) | gctrl_base->GCTRL_ECHIPID3;
}
static uint8_t system_get_chip_version(void)
@@ -63,8 +62,8 @@ static const char *cros_system_it8xxx2_get_chip_name(const struct device *dev)
return buf;
}
-static const char *cros_system_it8xxx2_get_chip_revision(const struct device
- *dev)
+static const char *
+cros_system_it8xxx2_get_chip_revision(const struct device *dev)
{
ARG_UNUSED(dev);
@@ -81,7 +80,8 @@ static int cros_system_it8xxx2_get_reset_cause(const struct device *dev)
ARG_UNUSED(dev);
struct gctrl_it8xxx2_regs *const gctrl_base = GCTRL_IT8XXX2_REG_BASE;
uint8_t last_reset_source = gctrl_base->GCTRL_RSTS & IT8XXX2_GCTRL_LRS;
- uint8_t raw_reset_cause2 = gctrl_base->GCTRL_SPCTRL4 &
+ uint8_t raw_reset_cause2 =
+ gctrl_base->GCTRL_SPCTRL4 &
(IT8XXX2_GCTRL_LRSIWR | IT8XXX2_GCTRL_LRSIPWRSWTR |
IT8XXX2_GCTRL_LRSIPGWR);
@@ -185,8 +185,8 @@ static int cros_system_it8xxx2_hibernate(const struct device *dev,
* Convert milliseconds(or at least 1 ms) to 32 Hz
* free run timer count for hibernate.
*/
- uint32_t c = (seconds * 1000 + microseconds / 1000 + 1) *
- 32 / 1000;
+ uint32_t c =
+ (seconds * 1000 + microseconds / 1000 + 1) * 32 / 1000;
/* Enable a 32-bit timer and clock source is 32 Hz */
/* Disable external timer x */
@@ -219,7 +219,8 @@ static int cros_system_it8xxx2_hibernate(const struct device *dev,
*/
#define WAKEUP_SETUP(id, prop, idx) \
do { \
- gpio_pin_configure_dt(GPIO_DT_FROM_NODE(WAKEUP_NGPIO(id, prop, idx)), \
+ gpio_pin_configure_dt( \
+ GPIO_DT_FROM_NODE(WAKEUP_NGPIO(id, prop, idx)), \
GPIO_INPUT); \
gpio_enable_dt_interrupt( \
GPIO_INT_FROM_NODE(WAKEUP_INT(id, prop, idx))); \
@@ -228,8 +229,7 @@ do { \
/*
* For all the wake-pins, re-init the GPIO and re-enable the interrupt.
*/
- DT_FOREACH_PROP_ELEM(SYSTEM_DT_NODE_HIBERNATE_CONFIG,
- wakeup_irqs,
+ DT_FOREACH_PROP_ELEM(SYSTEM_DT_NODE_HIBERNATE_CONFIG, wakeup_irqs,
WAKEUP_SETUP);
#undef WAKEUP_INT
