driver/ppc/nx20p348x.c: Format with clang-format
BRANCH=none
TEST=none
@@ -37,17 +37,13 @@ static uint8_t flags[CONFIG_USB_PD_PORT_MAX_COUNT];
static int read_reg(uint8_t port, int reg, int *regval)
{
return i2c_read8(ppc_chips[port].i2c_port,
- ppc_chips[port].i2c_addr_flags,
- reg,
- regval);
+ ppc_chips[port].i2c_addr_flags, reg, regval);
}
static int write_reg(uint8_t port, int reg, int regval)
{
return i2c_write8(ppc_chips[port].i2c_port,
- ppc_chips[port].i2c_addr_flags,
- reg,
- regval);
+ ppc_chips[port].i2c_addr_flags, reg, regval);
}
static int nx20p348x_set_ovp_limit(int port)
@@ -103,7 +99,6 @@ static int nx20p348x_set_vbus_source_current_limit(int port,
break;
};
-
return write_reg(port, NX20P348X_5V_SRC_OCP_THRESHOLD_REG, regval);
}
@@ -166,7 +161,8 @@ __maybe_unused static int nx20p3481_vbus_sink_enable(int port, int enable)
return rv;
return (status & NX20P348X_SWITCH_STATUS_HVSNK) == control ?
- EC_SUCCESS : EC_ERROR_UNKNOWN;
+ EC_SUCCESS :
+ EC_ERROR_UNKNOWN;
}
__maybe_unused static int nx20p3481_vbus_source_enable(int port, int enable)
@@ -502,8 +498,8 @@ static int nx20p348x_dump(int port)
int rv;
ccprintf("Port %d NX20P348X registers\n", port);
- for (reg_addr = NX20P348X_DEVICE_ID_REG; reg_addr <=
- NX20P348X_DEVICE_CONTROL_REG; reg_addr++) {
+ for (reg_addr = NX20P348X_DEVICE_ID_REG;
+ reg_addr <= NX20P348X_DEVICE_CONTROL_REG; reg_addr++) {
rv = read_reg(port, reg_addr, &reg);
if (rv) {
ccprintf("nx20p: Failed to read register 0x%x\n",
