summaryrefslogtreecommitdiff
path: root/board/homestar/led.c
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-121-1/+1
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* charge_state: Add PWR_STATE_FORCED_IDLE stateParth Malkan2022-08-181-10/+9
| | | | | | | | | | | | | | | | | | Add PWR_STATE_FORCED_IDLE state which indicates PWR_STATE_IDLE state is forced when charge control is not normal. Also update led.c files for boards to replace chflag use with new PWR_STATE_FORCED_IDLE. BUG=b:241167493 TEST=make buildall, zmake build --all, make runhosttests -j BRANCH=None Signed-off-by: Parth Malkan <parthmalkan@google.com> Cq-Depend: chromium:3807136 Change-Id: Ib00ed3df977482a4430b0c3d16a2a0e305bbd47f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3807134 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* board/homestar/led.c: Format with clang-formatJack Rosenthal2022-06-281-7/+7
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I94ad3760708757f4c123619fbbb926c3bf304509 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728470 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* Homestar:LED:Modify the behavior of the LED to always be off in dischargingtongjian2021-07-221-15/+2
| | | | | | | | | | | | | BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on DVT board BRANCH=Trogdor Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I3063ca561726c9a33a1ecd1b5f69d96d94576f52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3043762 Reviewed-by: Wenchao Han <hanwenchao@huaqin.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Homestar:LED:Use display SoC to control charge LEDtongjian2021-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Currently, Homestar uses the state of charge provided from the battery. This isn't the same as the SoC shown on the screen because Powerd compensates it based on the full factor and the low battery shutdown threshold. This change makes Homestar use the display SoC for the charge LED module so that the charge LED and the display SoC synchronously work. BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on EVT board BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I953aca48d18b32655d82fbd9a8c315534a8326bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2965815 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Homestar:LED:Add LED behaviortongjian2021-06-101-60/+53
| | | | | | | | | | | | | | | | | | | | | | | | | The led behavior define as following: Power Led behaiver: 1.S0, Green (soild on) 2.S3, Orange (1s on 3s off) 3.S5, off Battery Led behaiver: 1.Red on S0/S3/S5, battery capa < 5% 2.Orange on S0/S3/S5, 5% < battery capa < 97% 3.Green on S0/S3/S5, battery capa > 97% 4.Battery error: Red on 1sec off 1sec 5.Factory test: Red on 2sec, Green on 2sec BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on EVT board Make sure ectool led battery red/green/amber/off/auto work correctly. BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I0ace830d9b728cbd43ed53592d5091a579197b0b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2949629 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Revert "Homestar:LED:LED function realization"Aseda Aboagye2021-06-081-57/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8aacd88a332b9903334e0bb3bf586560fdc5883a. Reason for revert: Orange is the same as amber, so the ectool and ec_commands.h portions were not needed. Original change's description: > Homestar:LED:LED function realization > > BUG=b:187539586 > TEST=make -j BOARD=homestar > Verify build on EVT board > BRANCH=Trogdo > > Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> > Change-Id: I9c77b60e11135df5e289ef32adfe34fef3134760 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2915162 > Reviewed-by: Wai-Hong Tam <waihong@google.com> Bug: b:187539586 Change-Id: Ic096dec630bcdcde17a3611f8414d88808d09469 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2947488 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* Homestar:LED:Power LED and Battery LED status amendtongjian2021-06-011-4/+5
| | | | | | | | | | | | | | BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on EVT board BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I90fe26c6911d4b5dd04ae6aa131aeb4e8f7a3e7d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924484 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
* Homestar:LED:LED function realizationtongjian2021-05-261-65/+57
| | | | | | | | | | | | BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on EVT board BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I9c77b60e11135df5e289ef32adfe34fef3134760 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2915162 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* homestar : Add Initial SupportDolan2021-03-011-0/+184
create initial ec code for homestar, copied by reference board strongbad/coachz ec files to a new directory renamed for variant. BUG=b:181198678 TEST=make -j BOARD=homestar Verify build and powered on coachz board BRANCH=Trogdor Change-Id: I6129d19039fe629b27f149046d6047705e2481f5 Signed-off-by: Dolan <liuyong5@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2717431 Tested-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>