Lines Matching refs:speed
55 static void gpd_pocket_fan_set_speed(struct gpd_pocket_fan_data *fan, int speed) in gpd_pocket_fan_set_speed() argument
57 if (speed == fan->last_speed) in gpd_pocket_fan_set_speed()
60 gpiod_direction_output(fan->gpio0, !!(speed & 1)); in gpd_pocket_fan_set_speed()
61 gpiod_direction_output(fan->gpio1, !!(speed & 2)); in gpd_pocket_fan_set_speed()
63 fan->last_speed = speed; in gpd_pocket_fan_set_speed()
78 int t0, t1, temp, speed, min_speed, i; in gpd_pocket_fan_worker() local
83 speed = MAX_SPEED; in gpd_pocket_fan_worker()
89 speed = fan->last_speed; in gpd_pocket_fan_worker()
97 if (speed < i) in gpd_pocket_fan_worker()
98 speed = i; in gpd_pocket_fan_worker()
105 if (speed > i) in gpd_pocket_fan_worker()
106 speed = i; in gpd_pocket_fan_worker()
108 if (fan->last_speed <= 0 && speed) in gpd_pocket_fan_worker()
109 speed = MAX_SPEED; /* kick start motor */ in gpd_pocket_fan_worker()
112 gpd_pocket_fan_set_speed(fan, speed); in gpd_pocket_fan_worker()
116 msecs_to_jiffies(4000 / (speed + 1))); in gpd_pocket_fan_worker()