summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Zhang <ryan.zhang@quanta.corp-partner.google.com>2018-12-22 15:24:28 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-26 16:49:09 -0800
commit219b09e87f61ffb410fe1a1dbaed4983460fefb4 (patch)
tree44c42b446e99f1dc7e931bf5a597abf4388d44de
parent916b0771e4bdaafb710b5c964c2ceba4128a1c51 (diff)
downloadchrome-ec-219b09e87f61ffb410fe1a1dbaed4983460fefb4.tar.gz
OZ554: set power up sequence.
1. Spec says backlight should be turned on after 500ms after eDP signals are ready. 2. There's no way to get exact eDP ready time, therefore, give one second delay. power up __/---------------- eDP ______/------------ backlight _____________/----- |- t1 -| : >=500 ms |- t2 -| : 1 second is enough BUG=b:120237453 BRANCH=ToT TEST=Test results is in crosbug 120237453, comment #31 Signed-off-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Change-Id: I63e4536a9d8a7e5febf4ee76f05cbe7c014c7faa Reviewed-on: https://chromium-review.googlesource.com/1389975 Commit-Ready: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Tested-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--driver/led/oz554.c16
-rw-r--r--driver/led/oz554.h4
2 files changed, 19 insertions, 1 deletions
diff --git a/driver/led/oz554.c b/driver/led/oz554.c
index 4a1c46da0c..aa50028420 100644
--- a/driver/led/oz554.c
+++ b/driver/led/oz554.c
@@ -99,7 +99,21 @@ DECLARE_DEFERRED(backlight_enable_deferred);
void backlight_enable_interrupt(enum gpio_signal signal)
{
- hook_call_deferred(&backlight_enable_deferred_data, 30 * MSEC);
+ /*
+ * 1. Spec says backlight should be turned on after 500ms
+ * after eDP signals are ready.
+ *
+ * 2. There's no way to get exact eDP ready time, therefore,
+ * give one second delay.
+ *
+ * power up __/----------------
+ * eDP ______/------------
+ * backlight _____________/-----
+ * |- t1 -| : >=500 ms
+ * |- t2 -| : 1 second is enough
+ */
+ hook_call_deferred(&backlight_enable_deferred_data,
+ OZ554_POWER_BACKLIGHT_DELAY);
}
int oz554_set_config(int offset, int data)
diff --git a/driver/led/oz554.h b/driver/led/oz554.h
index bb45a17f30..009728ba73 100644
--- a/driver/led/oz554.h
+++ b/driver/led/oz554.h
@@ -21,6 +21,10 @@ void oz554_board_init(void) __attribute__((weak));
*/
int oz554_set_config(int offset, int data);
+#ifndef OZ554_POWER_BACKLIGHT_DELAY
+#define OZ554_POWER_BACKLIGHT_DELAY SECOND
+#endif
+
void backlight_enable_interrupt(enum gpio_signal signal);
#endif