board/nipperkin/thermal.c: Format with clang-format
BRANCH=none
TEST=none
@@ -103,8 +103,7 @@ static const struct fan_step fan_step_table[] = {
#define NUM_FAN_LEVELS ARRAY_SIZE(fan_step_table)
-BUILD_ASSERT(ARRAY_SIZE(fan_step_table) ==
- ARRAY_SIZE(fan_step_table));
+BUILD_ASSERT(ARRAY_SIZE(fan_step_table) == ARRAY_SIZE(fan_step_table));
int fan_table_to_rpm(int fan, int *temp)
{
@@ -135,8 +134,7 @@ int fan_table_to_rpm(int fan, int *temp)
break;
}
} else if (temp[TEMP_SENSOR_CHARGER] > prev_tmp[TEMP_SENSOR_CHARGER] ||
- temp[TEMP_SENSOR_MEMORY]
- > prev_tmp[TEMP_SENSOR_MEMORY] ||
+ temp[TEMP_SENSOR_MEMORY] > prev_tmp[TEMP_SENSOR_MEMORY] ||
temp[TEMP_SENSOR_SOC] > prev_tmp[TEMP_SENSOR_SOC]) {
for (i = current_level; i < NUM_FAN_LEVELS; i++) {
if ((temp[TEMP_SENSOR_CHARGER] >
@@ -167,15 +165,12 @@ int fan_table_to_rpm(int fan, int *temp)
void board_override_fan_control(int fan, int *tmp)
{
- if (chipset_in_state(CHIPSET_STATE_ON |
- CHIPSET_STATE_ANY_SUSPEND)) {
+ if (chipset_in_state(CHIPSET_STATE_ON | CHIPSET_STATE_ANY_SUSPEND)) {
fan_set_rpm_mode(FAN_CH(fan), 1);
- fan_set_rpm_target(FAN_CH(fan),
- fan_table_to_rpm(fan, tmp));
+ fan_set_rpm_target(FAN_CH(fan), fan_table_to_rpm(fan, tmp));
}
}
-
struct chg_curr_step {
int on;
int off;
@@ -188,7 +183,6 @@ static const struct chg_curr_step chg_curr_table[] = {
{ .on = 70, .off = 69, .curr_ma = 1500 },
};
-
#define NUM_CHG_CURRENT_LEVELS ARRAY_SIZE(chg_curr_table)
int charger_profile_override(struct charge_state_data *curr)
@@ -200,7 +194,6 @@ int charger_profile_override(struct charge_state_data *curr)
static int current_level;
static int prev_tmp;
-
if (!(curr->batt.flags & BATT_FLAG_RESPONSIVE))
return 0;
@@ -214,12 +207,13 @@ int charger_profile_override(struct charge_state_data *curr)
if (chipset_in_state(CHIPSET_STATE_ON)) {
if (chg_temp_c < prev_tmp) {
- if ((chg_temp_c <= chg_curr_table[current_level].off)
- && (current_level > 0))
+ if ((chg_temp_c <= chg_curr_table[current_level].off) &&
+ (current_level > 0))
current_level -= 1;
} else if (chg_temp_c > prev_tmp) {
- if ((chg_temp_c >= chg_curr_table[current_level + 1].on)
- && (current_level < NUM_CHG_CURRENT_LEVELS - 1))
+ if ((chg_temp_c >=
+ chg_curr_table[current_level + 1].on) &&
+ (current_level < NUM_CHG_CURRENT_LEVELS - 1))
current_level += 1;
}
