Lines Matching refs:speed_index
49 int speed_index; member
155 static void set_fan_speed(struct gpio_fan_data *fan_data, int speed_index) in set_fan_speed() argument
157 if (fan_data->speed_index == speed_index) in set_fan_speed()
160 __set_fan_ctrl(fan_data, fan_data->speed[speed_index].ctrl_val); in set_fan_speed()
161 fan_data->speed_index = speed_index; in set_fan_speed()
195 u8 pwm = fan_data->speed_index * 255 / (fan_data->num_speed - 1); in show_pwm()
205 int speed_index; in set_pwm() local
218 speed_index = DIV_ROUND_UP(pwm * (fan_data->num_speed - 1), 255); in set_pwm()
219 set_fan_speed(fan_data, speed_index); in set_pwm()
288 return sprintf(buf, "%d\n", fan_data->speed[fan_data->speed_index].rpm); in show_rpm()
386 fan_data->speed_index = get_fan_speed_index(fan_data); in fan_ctrl_init()
387 if (fan_data->speed_index < 0) in fan_ctrl_init()
388 return fan_data->speed_index; in fan_ctrl_init()
413 *state = fan_data->speed_index; in gpio_fan_get_cur_state()
636 fan_data->resume_speed = fan_data->speed_index; in gpio_fan_suspend()