summaryrefslogtreecommitdiff
path: root/driver/led/oz554.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/led/oz554.c')
-rw-r--r--driver/led/oz554.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/driver/led/oz554.c b/driver/led/oz554.c
index 4b661a592c..b2cbff08ba 100644
--- a/driver/led/oz554.c
+++ b/driver/led/oz554.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
@@ -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)