Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

power: Update LEDs in separate functions #320

Closed
wants to merge 1 commit into from
Closed

Conversation

crawfxrd
Copy link
Member

Split some of the logic in power_event() to separate functions.

@crawfxrd crawfxrd changed the title power: Update LEDS in separate functions power: Update LEDs in separate functions Nov 22, 2022
@crawfxrd crawfxrd marked this pull request as ready for review November 22, 2022 20:40
@crawfxrd crawfxrd requested review from a team November 22, 2022 20:40
jackpot51
jackpot51 previously approved these changes Nov 22, 2022
@XV-02
Copy link

XV-02 commented Jan 19, 2023

Using a Galp6 as a test system, I noticed that holding the power-button until the machine powered off resulted in the power-indicator light flashing amber (both on AC and on battery). This is not the same behaviour as if a shutdown command is passed to the system. When shutdown by passing shutdown now, the power light turned off as expected.

I also noticed that short-stroking the power button after shutting down from the OS triggered the power LED to flash amber, though it did not trigger the boot sequence. Similar button presses on currently released firmware had no effect.

Plugging in the power also caused the power indicator LED to start flashing amber with this branch.

Also, when plugging in AC while the system was shutdown, the battery indicator lingered on green for 1-2 seconds before correctly shifting to amber to indicate charging.

@XV-02
Copy link

XV-02 commented Feb 20, 2023

Having revisited this since the latest round of commits, all the issues previously mentioned are still present.

@crawfxrd
Copy link
Member Author

--- build/system76/darp8/0/ec.mem	2023-07-24 12:57:35.640394578 -0600
+++ build/system76/darp8/1/ec.mem	2023-07-24 12:58:04.484213031 -0600
@@ -25,5 +25,5 @@
    Name             Start    End      Size     Max
    ---------------- -------- -------- -------- --------
    PAGED EXT. RAM                         0      256
-   EXTERNAL RAM     0x0001   0x050c    1292     2048
-   ROM/EPROM/FLASH  0x0000   0x8b21   35085    65536
+   EXTERNAL RAM     0x0001   0x050e    1294     2048
+   ROM/EPROM/FLASH  0x0000   0x8af0   35036    65536

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants