diff options
-rw-r--r-- | board/link/userspace/README | 3 | ||||
-rw-r--r-- | board/link/userspace/etc/init/ec.conf | 13 | ||||
-rw-r--r-- | board/link/userspace/usr/share/ec/lightbar_params.txt | 31 | ||||
-rw-r--r-- | common/lightbar.c | 6 |
4 files changed, 50 insertions, 3 deletions
diff --git a/board/link/userspace/README b/board/link/userspace/README new file mode 100644 index 0000000000..204b9a4522 --- /dev/null +++ b/board/link/userspace/README @@ -0,0 +1,3 @@ +Sometimes we need to perform some run-time tweaks of the EC from the AP's +userspace. This directory holds those tweaks. They're picked up by the +ec-utils ebuild. diff --git a/board/link/userspace/etc/init/ec.conf b/board/link/userspace/etc/init/ec.conf new file mode 100644 index 0000000000..738cb8b2b8 --- /dev/null +++ b/board/link/userspace/etc/init/ec.conf @@ -0,0 +1,13 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +description "Overrides lightbar params to tweak appearance" +author "chromium-os-dev@chromium.org" + +start on startup + +script + PARAMS=/usr/share/ec/lightbar_params.txt + [ -f "$PARAMS" ] && ectool lightbar params "$PARAMS" >/dev/null 2>&1 +end script diff --git a/board/link/userspace/usr/share/ec/lightbar_params.txt b/board/link/userspace/usr/share/ec/lightbar_params.txt new file mode 100644 index 0000000000..5561ede29c --- /dev/null +++ b/board/link/userspace/usr/share/ec/lightbar_params.txt @@ -0,0 +1,31 @@ +2500 # .google_ramp_up +10000 # .google_ramp_down +2000 # .s3s0_ramp_up +45000 # .s0_tick_delay (battery) +30000 # .s0_tick_delay (AC) +5000 # .s0a_tick_delay (battery) +3000 # .s0a_tick_delay (AC) +2000 # .s0s3_ramp_down +5000000 # .s3_sleep_for +2500 # .s3_ramp_up +10000 # .s3_ramp_down +1 # .new_s0 +0x60 0x60 # .osc_min (battery, AC) +0xd0 0xd0 # .osc_max (battery, AC) +24 24 # .w_ofs (battery, AC) +0xcc 0xff # .bright_bl_off_fixed (battery, AC) +0xcc 0xff # .bright_bl_on_min (battery, AC) +0xcc 0xff # .bright_bl_on_max (battery, AC) +10 40 99 # .battery_threshold +5 4 4 4 # .s0_idx[] (battery) +4 4 4 4 # .s0_idx[] (AC) +5 255 255 255 # .s3_idx[] (battery) +255 255 255 255 # .s3_idx[] (AC) +0x33 0x69 0xe8 # color[0] +0xd5 0x0f 0x25 # color[1] +0xee 0xb2 0x11 # color[2] +0x00 0x99 0x25 # color[3] +0x00 0x00 0xff # color[4] +0xff 0x00 0x00 # color[5] +0xff 0xff 0x00 # color[6] +0x00 0xff 0x00 # color[7] diff --git a/common/lightbar.c b/common/lightbar.c index 4fe6179837..5359bc6e4f 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -193,9 +193,9 @@ static const struct lightbar_params default_params = { .osc_max = { 0xd0, 0xd0 }, /* battery, AC */ .w_ofs = {24, 24}, /* phase offset, 256 == 2*PI */ - .bright_bl_off_fixed = {0x80, 0xc0}, /* backlight off: battery, AC */ - .bright_bl_on_min = {0x80, 0xc0}, /* backlight on: battery, AC */ - .bright_bl_on_max = {0x80, 0xc0}, /* backlight on: battery, AC */ + .bright_bl_off_fixed = {0xcc, 0xff}, /* backlight off: battery, AC */ + .bright_bl_on_min = {0xcc, 0xff}, /* backlight on: battery, AC */ + .bright_bl_on_max = {0xcc, 0xff}, /* backlight on: battery, AC */ .battery_threshold = { 10, 40, 99 }, /* percent, lowest to highest */ .s0_idx = { |