Replace use of wildcard with list of source files to include. The `-y`
suffix is added, but has no significance since conditional compilation
has not been added yet.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Split the EC define into base and variant. Merge the 3 ATmega chips as
atmega, and the 2 ITE chips as ite.
Tested that the generated files are identical.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
* common: Add macros for min, max, clamp
Simple macros, with no type checking.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
* charger: Limit charger values to max valid value
Use the maximum valid value instead of discarding bits.
Fixes: 6295f60172 ("Fix smart charger values")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
* charger/bq24780s: Fix charge current mask
bq24780s uses bit 12 for 4096 a current weight.
Fixes: 6295f60172 ("Fix smart charger values")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
* oryp: Reduce charge current to 2A
Signed-off-by: Tim Crawford <tcrawford@system76.com>
* charger/bq24780s: Set RSENSE ratio option
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Fix all smart charger values by having boards provide the RSENSE values
and perform the register calculations in the code.
The galp3-c, galp5, gaze16, and gaze17 do not seem to have the same
behavior as the rest of the boards, and further investigation is needed.
In the mean time, reduce their charge current values to preserve current
behavior.
Ref: OZ26786-DS v1.0
Ref: bq24780S Rev. C datasheet
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>