driver/nfc/ctn730.c: Format with clang-format
BRANCH=none
TEST=none
@@ -158,8 +158,7 @@ static int _i2c_read(int i2c_port, uint8_t *in, int in_len)
static void _print_header(const struct ctn730_msg *msg)
{
- CPRINTS("%s_%s",
- _text_instruction(msg->instruction),
+ CPRINTS("%s_%s", _text_instruction(msg->instruction),
_text_message_type(msg->message_type));
}
@@ -206,9 +205,9 @@ static int ctn730_init(struct pchg *ctx)
cmd->message_type = CTN730_MESSAGE_TYPE_COMMAND;
cmd->instruction = WLC_HOST_CTRL_RESET;
cmd->length = WLC_HOST_CTRL_RESET_CMD_SIZE;
- cmd->payload[0] = ctx->mode == PCHG_MODE_NORMAL
- ? WLC_HOST_CTRL_RESET_CMD_MODE_NORMAL
- : WLC_HOST_CTRL_RESET_CMD_MODE_DOWNLOAD;
+ cmd->payload[0] = ctx->mode == PCHG_MODE_NORMAL ?
+ WLC_HOST_CTRL_RESET_CMD_MODE_NORMAL :
+ WLC_HOST_CTRL_RESET_CMD_MODE_DOWNLOAD;
/* TODO: Run 1 sec timeout timer. */
rv = _send_command(ctx, cmd);
@@ -510,8 +509,8 @@ static int ctn730_get_soc(struct pchg *ctx)
static int ctn730_update_open(struct pchg *ctx)
{
- uint8_t buf[sizeof(struct ctn730_msg)
- + WLC_HOST_CTRL_DL_OPEN_SESSION_CMD_SIZE];
+ uint8_t buf[sizeof(struct ctn730_msg) +
+ WLC_HOST_CTRL_DL_OPEN_SESSION_CMD_SIZE];
struct ctn730_msg *cmd = (void *)buf;
uint32_t version = ctx->update.version;
int rv;
@@ -531,16 +530,16 @@ static int ctn730_update_open(struct pchg *ctx)
static int ctn730_update_write(struct pchg *ctx)
{
- uint8_t buf[sizeof(struct ctn730_msg)
- + WLC_HOST_CTRL_DL_WRITE_FLASH_CMD_SIZE];
+ uint8_t buf[sizeof(struct ctn730_msg) +
+ WLC_HOST_CTRL_DL_WRITE_FLASH_CMD_SIZE];
struct ctn730_msg *cmd = (void *)buf;
uint32_t *a = (void *)cmd->payload;
uint8_t *d = (void *)&cmd->payload[CTN730_FLASH_ADDR_SIZE];
int rv;
/* Address is 3 bytes. FW size must be a multiple of 128 bytes. */
- if (ctx->update.addr & GENMASK(31, 24)
- || ctx->update.size != WLC_HOST_CTRL_DL_WRITE_FLASH_BLOCK_SIZE)
+ if (ctx->update.addr & GENMASK(31, 24) ||
+ ctx->update.size != WLC_HOST_CTRL_DL_WRITE_FLASH_BLOCK_SIZE)
return EC_ERROR_INVAL;
cmd->message_type = CTN730_MESSAGE_TYPE_COMMAND;
@@ -563,8 +562,8 @@ static int ctn730_update_write(struct pchg *ctx)
static int ctn730_update_close(struct pchg *ctx)
{
- uint8_t buf[sizeof(struct ctn730_msg)
- + WLC_HOST_CTRL_DL_COMMIT_SESSION_CMD_SIZE];
+ uint8_t buf[sizeof(struct ctn730_msg) +
+ WLC_HOST_CTRL_DL_COMMIT_SESSION_CMD_SIZE];
struct ctn730_msg *cmd = (void *)buf;
uint32_t *crc32 = (void *)cmd->payload;
int rv;
