Lines Matching refs:pstate
86 struct pwm_state pstate; in pwm_regulator_set_voltage_sel() local
89 pwm_init_state(drvdata->pwm, &pstate); in pwm_regulator_set_voltage_sel()
90 pwm_set_relative_duty_cycle(&pstate, in pwm_regulator_set_voltage_sel()
93 ret = pwm_apply_might_sleep(drvdata->pwm, &pstate); in pwm_regulator_set_voltage_sel()
154 struct pwm_state pstate; in pwm_regulator_get_voltage() local
158 pwm_get_state(drvdata->pwm, &pstate); in pwm_regulator_get_voltage()
160 if (!pstate.enabled) { in pwm_regulator_get_voltage()
161 if (pstate.polarity == PWM_POLARITY_INVERSED) in pwm_regulator_get_voltage()
162 pstate.duty_cycle = pstate.period; in pwm_regulator_get_voltage()
164 pstate.duty_cycle = 0; in pwm_regulator_get_voltage()
167 voltage = pwm_get_relative_duty_cycle(&pstate, duty_unit); in pwm_regulator_get_voltage()
201 struct pwm_state pstate; in pwm_regulator_set_voltage() local
206 pwm_init_state(drvdata->pwm, &pstate); in pwm_regulator_set_voltage()
227 pwm_set_relative_duty_cycle(&pstate, dutycycle, duty_unit); in pwm_regulator_set_voltage()
229 ret = pwm_apply_might_sleep(drvdata->pwm, &pstate); in pwm_regulator_set_voltage()
328 struct pwm_state pstate; in pwm_regulator_init_boot_on() local
333 pwm_get_state(drvdata->pwm, &pstate); in pwm_regulator_init_boot_on()
334 if (pstate.enabled) in pwm_regulator_init_boot_on()
342 if (pstate.polarity == PWM_POLARITY_INVERSED) in pwm_regulator_init_boot_on()
343 pstate.duty_cycle = pstate.period; in pwm_regulator_init_boot_on()
345 pstate.duty_cycle = 0; in pwm_regulator_init_boot_on()
347 return pwm_apply_might_sleep(drvdata->pwm, &pstate); in pwm_regulator_init_boot_on()