Lines Matching defs:state
41 struct pwm_state state;
55 pwm_get_state(vibrator->pwm, &state);
56 pwm_set_relative_duty_cycle(&state, vibrator->level, 0xffff);
57 state.enabled = true;
59 err = pwm_apply_might_sleep(vibrator->pwm, &state);
61 dev_err(pdev, "failed to apply pwm state: %d\n", err);
66 pwm_get_state(vibrator->pwm_dir, &state);
67 state.duty_cycle = vibrator->direction_duty_cycle;
68 state.enabled = true;
70 err = pwm_apply_might_sleep(vibrator->pwm_dir, &state);
72 dev_err(pdev, "failed to apply dir-pwm state: %d\n", err);
131 struct pwm_state state;
160 /* Sync up PWM state and ensure it is off. */
161 pwm_init_state(vibrator->pwm, &state);
162 state.enabled = false;
163 err = pwm_apply_might_sleep(vibrator->pwm, &state);
165 dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
174 /* Sync up PWM state and ensure it is off. */
175 pwm_init_state(vibrator->pwm_dir, &state);
176 state.enabled = false;
177 err = pwm_apply_might_sleep(vibrator->pwm_dir, &state);
179 dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",