driver/wpc/cps8100.c: Format with clang-format
BRANCH=none
TEST=none
@@ -85,18 +85,9 @@ struct cps8100_msg {
BUILD_ASSERT(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__);
static const char *const cps8100_func_names[] = {
- [0] = "DPL",
- [1] = "OPP",
- [2] = "OTP",
- [3] = "OVPK",
- [4] = "OCP",
- [5] = "UVP",
- [6] = "OVP",
- [7] = "FOD",
- [8] = "SAMSUNG",
- [9] = "APPLE",
- [10] = "EPP",
- [11] = "HUAWEI",
+ [0] = "DPL", [1] = "OPP", [2] = "OTP", [3] = "OVPK",
+ [4] = "OCP", [5] = "UVP", [6] = "OVP", [7] = "FOD",
+ [8] = "SAMSUNG", [9] = "APPLE", [10] = "EPP", [11] = "HUAWEI",
[12] = "CPS",
};
@@ -258,8 +249,8 @@ static int cps8100_read32(int port, uint32_t reg, uint32_t *val)
buf[0] = (reg >> 8) & 0xff;
buf[1] = (reg >> 0) & 0xff;
- return i2c_xfer(port, CPS8100_I2C_ADDR_L, buf, 2,
- (void *)val, sizeof(*val));
+ return i2c_xfer(port, CPS8100_I2C_ADDR_L, buf, 2, (void *)val,
+ sizeof(*val));
}
static int cps8100_reset(struct pchg *ctx)
@@ -315,7 +306,8 @@ static void cps8100_print_alert_info(uint32_t reg)
CPRINTFP("Profile: %s\n",
cps8100_profile_names[CPS8100_STATUS_PROFILE(reg)]);
CPRINTFP("%sCharging\n", CPS8100_STATUS_CHARGE(reg) ? "" : "Not ");
- CPRINTFP("Device %sPresent\n", CPS8100_STATUS_DEVICE(reg) ? "":"Not ");
+ CPRINTFP("Device %sPresent\n",
+ CPS8100_STATUS_DEVICE(reg) ? "" : "Not ");
CPRINTFP("Battery: %d%%\n", CPS8100_STATUS_BATTERY(reg));
}
@@ -436,6 +428,5 @@ static int cc_cps8100(int argc, char **argv)
return EC_SUCCESS;
}
-DECLARE_CONSOLE_COMMAND(cps8100, cc_cps8100,
- "<port> [reset]",
+DECLARE_CONSOLE_COMMAND(cps8100, cc_cps8100, "<port> [reset]",
"Print status of or reset CPS8100");
