Lines Matching defs:state
76 struct pwm_state state = { };
82 pwm_init_state(ctx->pwm, &state);
84 state.duty_cycle = DIV_ROUND_UP(pwm * (period - 1), MAX_PWM);
85 state.enabled = pwm ? true : false;
87 ret = pwm_apply_state(ctx->pwm, &state);
174 unsigned long *state)
181 *state = ctx->pwm_fan_max_state;
187 unsigned long *state)
194 *state = ctx->pwm_fan_state;
200 pwm_fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)
205 if (!ctx || (state > ctx->pwm_fan_max_state))
208 if (state == ctx->pwm_fan_state)
211 ret = __set_pwm(ctx, ctx->pwm_fan_cooling_levels[state]);
217 ctx->pwm_fan_state = state;
258 dev_err(dev, "PWM fan state[%d]:%d > %d\n", i,
288 struct pwm_state state = { };
327 pwm_init_state(ctx->pwm, &state);
333 if (state.period > ULONG_MAX / MAX_PWM + 1) {
339 state.duty_cycle = ctx->pwm->args.period - 1;
340 state.enabled = true;
342 ret = pwm_apply_state(ctx->pwm, &state);