chip/it83xx/fan.c: Format with clang-format
BRANCH=none
TEST=none
@@ -72,7 +72,8 @@ static void fan_set_interval(int ch)
tach_ch = tach_bind(ch);
diff = ABS(fan_info_data[tach_ch].rpm_target -
- fan_info_data[tach_ch].rpm_actual) / 100;
+ fan_info_data[tach_ch].rpm_actual) /
+ 100;
fan_ms = FAN_CTRL_INTERVAL_MAX_MS;
@@ -245,8 +246,7 @@ enum fan_status fan_get_status(int ch)
int fan_is_stalled(int ch)
{
/* Must be enabled with non-zero target to stall */
- if (!fan_get_enabled(ch) ||
- fan_get_rpm_target(ch) == 0 ||
+ if (!fan_get_enabled(ch) || fan_get_rpm_target(ch) == 0 ||
!fan_get_duty(ch))
return 0;
@@ -273,8 +273,7 @@ static void fan_ctrl(int ch)
tach_ch = tach_bind(ch);
fan_info_data[tach_ch].fan_ms_idx += FAN_CTRL_BASED_MS;
- if (fan_info_data[tach_ch].fan_ms_idx >
- fan_info_data[tach_ch].fan_ms) {
+ if (fan_info_data[tach_ch].fan_ms_idx > fan_info_data[tach_ch].fan_ms) {
fan_info_data[tach_ch].fan_ms_idx = 0x00;
adjust = 1;
}
@@ -436,14 +435,12 @@ static void fan_init(void)
enum tach_ch_sel tach_ch;
for (ch = 0; ch < fan_get_count(); ch++) {
-
rpm_re = fan_tach[pwm_channels[FAN_CH(ch)].channel].rpm_re;
fan_p = fan_tach[pwm_channels[FAN_CH(ch)].channel].fan_p;
s_duty = fan_tach[pwm_channels[FAN_CH(ch)].channel].s_duty;
tach_ch = tach_bind(FAN_CH(ch));
if (tach_ch < TACH_CH_COUNT) {
-
if (tach_ch == TACH_CH_TACH0B) {
/* GPJ2 will select TACH0B as its alt. */
IT83XX_GPIO_GRC5 |= 0x01;
