summaryrefslogtreecommitdiff
path: root/driver/led
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2022-06-27 14:51:43 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-30 17:53:58 +0000
commit0d7f02fea54ef2fbcb101db1973a327b344930f6 (patch)
treed0b1ab086c8216d65d31466e7a8a6d5e780392ad /driver/led
parent58aa72d38ee8fdaea080bde6b3ef0e6921f6f685 (diff)
downloadchrome-ec-0d7f02fea54ef2fbcb101db1973a327b344930f6.tar.gz
driver/led/oz554.c: Format with clang-format
BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ieac274a3cc8854174f2736d98f76289672628038 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730002 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'driver/led')
-rw-r--r--driver/led/oz554.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/driver/led/oz554.c b/driver/led/oz554.c
index 4b661a592c..9f898b9daf 100644
--- a/driver/led/oz554.c
+++ b/driver/led/oz554.c
@@ -13,10 +13,10 @@
#include "task.h"
#include "timer.h"
-#define CPRINTS(format, args...) cprints(CC_I2C, format, ## args)
-#define CPRINTF(format, args...) cprintf(CC_I2C, format, ## args)
+#define CPRINTS(format, args...) cprints(CC_I2C, format, ##args)
+#define CPRINTF(format, args...) cprintf(CC_I2C, format, ##args)
-#define I2C_ADDR_OZ554_FLAGS 0x31
+#define I2C_ADDR_OZ554_FLAGS 0x31
struct oz554_value {
uint8_t offset;
@@ -40,38 +40,38 @@ static struct oz554_value oz554_conf[] = {
* Frequency selection: 300(KHz)
* Short circuit protection: 8(V)
*/
- {.offset = 1, .data = 0x43},
+ { .offset = 1, .data = 0x43 },
/*
* Reigster 0x02: LED current amplitude control
* ISET Resistor: 10.2(Kohm)
* Maximum LED current: 1636/10.2 = 160.4(mA)
* Setting LED current: 65(mA)
*/
- {.offset = 2, .data = 0x65},
+ { .offset = 2, .data = 0x65 },
/*
* Reigster 0x03: LED backlight Status
* Status function: Read only
*/
- {.offset = 3, .data = 0x00},
+ { .offset = 3, .data = 0x00 },
/*
* Reigster 0x04: LED current control with SMBus
* SMBus PWM function: None Use
*/
- {.offset = 4, .data = 0x00},
+ { .offset = 4, .data = 0x00 },
/*
* Reigster 0x05: OVP, OCP control
* Over Current Protection: 0.5(V)
* Panel LED Voltage(Max): 47.8(V)
* OVP setting: 54(V)
*/
- {.offset = 5, .data = 0x97},
+ { .offset = 5, .data = 0x97 },
/*
* Reigster 0x00: Dimming mode and string ON/OFF control
* String Selection: 4(Number)
* Interface Selection: 1
* Brightness mode: 3
*/
- {.offset = 0, .data = 0xF2},
+ { .offset = 0, .data = 0xF2 },
};
static const int oz554_conf_size = ARRAY_SIZE(oz554_conf);
@@ -80,11 +80,10 @@ static void set_oz554_reg(void)
int i;
for (i = 0; i < oz554_conf_size; ++i) {
- int rv = i2c_write8(I2C_PORT_BACKLIGHT,
- I2C_ADDR_OZ554_FLAGS,
+ int rv = i2c_write8(I2C_PORT_BACKLIGHT, I2C_ADDR_OZ554_FLAGS,
oz554_conf[i].offset, oz554_conf[i].data);
if (rv) {
- CPRINTS("Write OZ554 register %d failed rv=%d" , i, rv);
+ CPRINTS("Write OZ554 register %d failed rv=%d", i, rv);
return;
}
}
@@ -114,7 +113,7 @@ void oz554_interrupt(enum gpio_signal signal)
* |- t2 -| : 1 second is enough
*/
hook_call_deferred(&backlight_enable_deferred_data,
- OZ554_POWER_BACKLIGHT_DELAY);
+ OZ554_POWER_BACKLIGHT_DELAY);
}
int oz554_set_config(int offset, int data)