Use u8 instead of i16 as a delay can never be negative and should never
block for a long period of time.
Use a decrementing loop as SDCC generates more efficient code.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Most of the code is the same between IT8587E and IT5570E.
Identical files were detected with:
diff -rs src/ec/it8587e/ src/ec/it5570e/ | egrep '^Files .+ and .+ are identical$'
Then manually moved from one variant and deleted from the other.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Per the specs, a 16-byte signature is stored at 0x40. All proprietary EC
ROMs store a space-padded 16-byte vendor string at 0x50, but it isn't
required.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
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>
The eSPI logic is the same for all TGL boards using it. None of it is
moved to IT5570E due to the call to power_cpu_reset().
Signed-off-by: Tim Crawford <tcrawford@system76.com>
* SMOOTH_FANS, SMOOTH_FANS_UP, SMOOTH_FANS_DOWN build flags to smooth fan speed changes.
Defaults 40, set SMOOTH_FANS=0 to disable and keep sharp fan speed changes
* fix for ACPI CPU temperature
* allow for a floor to be set for fan smoothing and specifically configure oryp6/7 to start smoothing at 25% to mitigate fan buzzing below 25%
* update default config values for fans
* update all devices to use defaults for heatup, cooldown, update galp5 fan curves
* Decrease default cooldown time from 20 to 10
Co-authored-by: Jacob Kauffmann <jacob@system76.com>
Fix ACPI timeout and delay on S3 resume when holding a key.
A timeout greater than 1ms results in the excessive delay (~10s) still
occurring on an oryp5 (IT8587).