Commit Graph

6 Commits

Author SHA1 Message Date
Tim Crawford
a198289695 Remove power_set_limit from board_event
This is already handled by power_event.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
Tim Crawford
2a8befc195 Enable WLAN at power_on() instead of board_init()
If the board is on AC power when powered off the EC will not reset, and
WLAN power will not be enabled on next boot. Move enabling WLAN from
`board_init()` to `power_on()`.

Fixes: be4659a0cb ("Set wireless power at init and power off")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-18 19:11:01 -07:00
Tim Crawford
be4659a0cb Set wireless power at init and power off
Add a new wireless object for controlling WLAN power state. Change the
power sequence to enable WLAN at board init and disable it at power off.

Newer galp5 units sold to customers have an issue where they do not
fully power off. This is apparently somehow caused by `WLAN_PWR_EN`.

The unit received for development do not have this issue.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2022-11-18 07:32:18 -07:00
Tim Crawford
c7fafe0103 board.c: Remove unused includes/globals
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-07-09 08:02:55 -06:00
Tim Crawford
a8229d9e62 Move power limit functions to common board code
Logic for changing power limit is the same for all boards with GPUs. It
is still called from board_event() instead of in power_event() to
maintain the current behavior of checking every main cycle.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2021-07-09 07:35:52 -06:00
Jeremy Soller
dc81c724ec addw1 2020-10-05 13:57:08 -07:00