driver/led/is31fl3733b.c: Format with clang-format
BRANCH=none
TEST=none
#define CPRINTF(fmt, args...) cprintf(CC_RGBKBD, "RGBKBD: " fmt, ##args)
#define CPRINTS(fmt, args...) cprints(CC_RGBKBD, "RGBKBD: " fmt, ##args)
-
/* This depends on ADDR1 and ADDR2. (GND, GND) = 0x50. */
#define IS31FL3733B_ADDR_FLAGS 0x50
static int is31fl3733b_read(struct rgbkbd *ctx, uint8_t addr, uint8_t *value)
{
- return i2c_xfer(ctx->cfg->i2c, IS31FL3733B_ADDR_FLAGS,
- &addr, sizeof(addr), value, sizeof(*value));
+ return i2c_xfer(ctx->cfg->i2c, IS31FL3733B_ADDR_FLAGS, &addr,
+ sizeof(addr), value, sizeof(*value));
}
static int is31fl3733b_write(struct rgbkbd *ctx, uint8_t addr, uint8_t value)
@@ -80,8 +79,8 @@ static int is31fl3733b_write(struct rgbkbd *ctx, uint8_t addr, uint8_t value)
[1] = value,
};
- return i2c_xfer(ctx->cfg->i2c, IS31FL3733B_ADDR_FLAGS,
- buf, sizeof(buf), NULL, 0);
+ return i2c_xfer(ctx->cfg->i2c, IS31FL3733B_ADDR_FLAGS, buf, sizeof(buf),
+ NULL, 0);
}
static int is31fl3733b_set_page(struct rgbkbd *ctx, uint8_t page)
@@ -209,16 +208,13 @@ static int is31fl3733b_init(struct rgbkbd *ctx)
}
if (IS_ENABLED(CONFIG_RGB_KEYBOARD_DEBUG)) {
-
uint8_t val;
int ret;
- ret = is31fl3733b_get_config(ctx,
- IS31FL3733B_FUNC_SW_PU, &val);
+ ret = is31fl3733b_get_config(ctx, IS31FL3733B_FUNC_SW_PU, &val);
CPRINTS("SW_PU: val=0x%02x (rv=%d)", val, ret);
- ret = is31fl3733b_get_config(ctx,
- IS31FL3733B_FUNC_CS_PD, &val);
+ ret = is31fl3733b_get_config(ctx, IS31FL3733B_FUNC_CS_PD, &val);
CPRINTS("CS_PD: val=0x%02x (rv=%d)", val, ret);
}
