Lines Matching defs:state
39 struct pwm_state state;
51 pwm_get_state(vibrator->pwm, &state);
52 pwm_set_relative_duty_cycle(&state, vibrator->level, 0xffff);
53 state.enabled = true;
55 err = pwm_apply_state(vibrator->pwm, &state);
57 dev_err(pdev, "failed to apply pwm state: %d", err);
62 pwm_get_state(vibrator->pwm_dir, &state);
63 state.duty_cycle = vibrator->direction_duty_cycle;
64 state.enabled = true;
66 err = pwm_apply_state(vibrator->pwm_dir, &state);
68 dev_err(pdev, "failed to apply dir-pwm state: %d", err);
125 struct pwm_state state;
156 /* Sync up PWM state and ensure it is off. */
157 pwm_init_state(vibrator->pwm, &state);
158 state.enabled = false;
159 err = pwm_apply_state(vibrator->pwm, &state);
161 dev_err(&pdev->dev, "failed to apply initial PWM state: %d",
170 /* Sync up PWM state and ensure it is off. */
171 pwm_init_state(vibrator->pwm_dir, &state);
172 state.enabled = false;
173 err = pwm_apply_state(vibrator->pwm_dir, &state);
175 dev_err(&pdev->dev, "failed to apply initial PWM state: %d",