Skip to content

Commit

Permalink
default to fan syncing but support disabling fan syncing with SYNC_FA…
Browse files Browse the repository at this point in the history
…NS=0 build flag
  • Loading branch information
curiousercreative authored and jackpot51 committed May 1, 2021
1 parent f0c42f5 commit 606ba01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/board/system76/common/fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ bool fan_max = false;
#define max_speed PWM_DUTY(100)
#define min_speed PWM_DUTY(0)

#ifndef SYNC_FANS
#define SYNC_FANS 1
#endif

void fan_reset(void) {
// Do not manually set fans to maximum speed
fan_max = false;
Expand Down Expand Up @@ -52,7 +56,7 @@ uint8_t fan_duty(const struct Fan * fan, int16_t temp) __reentrant {
}

void fan_duty_set(uint8_t peci_fan_duty, uint8_t dgpu_fan_duty) __reentrant {
#ifdef SYNC_FANS
#if SYNC_FANS != 0
peci_fan_duty = peci_fan_duty > dgpu_fan_duty ? peci_fan_duty : dgpu_fan_duty;
dgpu_fan_duty = peci_fan_duty > dgpu_fan_duty ? peci_fan_duty : dgpu_fan_duty;
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/board/system76/galp5/board.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ CFLAGS+=\
-DPOWER_LIMIT_AC=65 \
-DPOWER_LIMIT_DC=28

# sync GPU fan speed to CPU fan speed (great for galp5 w/o dGPU)
CFLAGS+=-DSYNC_FANS=1

# Custom fan curve
CFLAGS+=-DBOARD_HEATUP=5
CFLAGS+=-DBOARD_COOLDOWN=20
Expand Down

0 comments on commit 606ba01

Please sign in to comment.