Lines Matching refs:state
39 struct pwm_state state;
41 pwm_get_state(pwm, &state);
43 return sprintf(buf, "%llu\n", state.period);
50 struct pwm_state state;
60 pwm_get_state(pwm, &state);
61 state.period = val;
62 ret = pwm_apply_state(pwm, &state);
71 struct pwm_state state;
73 pwm_get_state(pwm, &state);
75 return sprintf(buf, "%llu\n", state.duty_cycle);
82 struct pwm_state state;
92 pwm_get_state(pwm, &state);
93 state.duty_cycle = val;
94 ret = pwm_apply_state(pwm, &state);
104 struct pwm_state state;
106 pwm_get_state(pwm, &state);
108 return sprintf(buf, "%llu\n", state.oneshot_count);
115 struct pwm_state state;
125 pwm_get_state(pwm, &state);
126 state.oneshot_count = val;
127 ret = pwm_apply_state(pwm, &state);
137 struct pwm_state state;
139 pwm_get_state(pwm, &state);
141 return sprintf(buf, "%d\n", state.enabled);
148 struct pwm_state state;
158 pwm_get_state(pwm, &state);
162 state.enabled = false;
165 state.enabled = true;
172 ret = pwm_apply_state(pwm, &state);
183 struct pwm_state state;
185 pwm_get_state(pwm, &state);
187 switch (state.polarity) {
205 struct pwm_state state;
217 pwm_get_state(pwm, &state);
218 state.polarity = polarity;
219 ret = pwm_apply_state(pwm, &state);
403 static struct pwm_export *pwm_class_get_state(struct device *parent, struct pwm_device *pwm, struct pwm_state *state)
421 pwm_get_state(pwm, state);
426 static int pwm_class_apply_state(struct pwm_export *export, struct pwm_device *pwm, struct pwm_state *state)
428 int ret = pwm_apply_state(pwm, state);
444 struct pwm_state state;
447 export = pwm_class_get_state(parent, pwm, &state);
452 state.enabled = export->suspend.enabled;
453 ret = pwm_class_apply_state(export, pwm, &state);
470 struct pwm_state state;
473 export = pwm_class_get_state(parent, pwm, &state);
478 export->suspend = state;
479 state.enabled = false;
480 ret = pwm_class_apply_state(export, pwm, &state);