File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ CONFIG_PLATFORM_EC_GPU_POWER_CONTROL=y
12
12
13
13
# Fan
14
14
CONFIG_PLATFORM_EC_NUM_FANS=2
15
+ CONFIG_PLATFORM_EC_FAN_BYPASS_SLOW_RESPONSE=y
15
16
16
17
#TypeC support
17
18
CONFIG_PLATFORM_EC_USBC=n
Original file line number Diff line number Diff line change @@ -739,7 +739,7 @@ extern char mock_jump_data[CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE];
739
739
#endif
740
740
741
741
#undef CONFIG_FAN_BYPASS_SLOW_RESPONSE
742
- #ifdef PLATFORM_EC_FAN_BYPASS_SLOW_RESPONSE
742
+ #ifdef CONFIG_PLATFORM_EC_FAN_BYPASS_SLOW_RESPONSE
743
743
#define CONFIG_FAN_BYPASS_SLOW_RESPONSE
744
744
#endif
745
745
Original file line number Diff line number Diff line change @@ -202,8 +202,19 @@ enum fan_status fan_smart_control(int ch)
202
202
/* Record previous rpm */
203
203
data -> rpm_pre = rpm_actual ;
204
204
205
- /* Adjust PWM duty */
206
- rpm_diff = rpm_target - rpm_actual ;
205
+ /*
206
+ * A specific type of fan needs a longer time to output the TACH
207
+ * signal to EC after EC outputs the PWM signal to the fan.
208
+ * During this period, the driver will read two consecutive RPM = 0.
209
+ * In this case, don't step the PWM duty too aggressively.
210
+ */
211
+ if (data -> rpm_pre == 0 && rpm_actual == 0 &&
212
+ IS_ENABLED (CONFIG_PLATFORM_EC_FAN_BYPASS_SLOW_RESPONSE )) {
213
+ rpm_diff = (rpm_target * deviation / 100 ) + 1 ;
214
+ } else {
215
+ rpm_diff = rpm_target - rpm_actual ;
216
+ }
217
+
207
218
duty = fan_get_duty (ch );
208
219
if (duty == 0 && rpm_target == 0 ) {
209
220
return FAN_STATUS_STOPPED ;
You can’t perform that action at this time.
0 commit comments