• Home
  • Raw
  • Download

Lines Matching refs:pwm

28 	struct pwm_device *pwm;  member
41 return export->pwm; in child_to_pwm_device()
48 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show() local
51 pwm_get_state(pwm, &state); in period_show()
61 struct pwm_device *pwm = export->pwm; in period_store() local
71 pwm_get_state(pwm, &state); in period_store()
73 ret = pwm_apply_state(pwm, &state); in period_store()
83 const struct pwm_device *pwm = child_to_pwm_device(child); in duty_cycle_show() local
86 pwm_get_state(pwm, &state); in duty_cycle_show()
96 struct pwm_device *pwm = export->pwm; in duty_cycle_store() local
106 pwm_get_state(pwm, &state); in duty_cycle_store()
108 ret = pwm_apply_state(pwm, &state); in duty_cycle_store()
118 const struct pwm_device *pwm = child_to_pwm_device(child); in enable_show() local
121 pwm_get_state(pwm, &state); in enable_show()
131 struct pwm_device *pwm = export->pwm; in enable_store() local
141 pwm_get_state(pwm, &state); in enable_store()
155 ret = pwm_apply_state(pwm, &state); in enable_store()
166 const struct pwm_device *pwm = child_to_pwm_device(child); in polarity_show() local
170 pwm_get_state(pwm, &state); in polarity_show()
190 struct pwm_device *pwm = export->pwm; in polarity_store() local
203 pwm_get_state(pwm, &state); in polarity_store()
205 ret = pwm_apply_state(pwm, &state); in polarity_store()
215 struct pwm_device *pwm = child_to_pwm_device(child); in capture_show() local
219 ret = pwm_capture(pwm, &result, jiffies_to_msecs(HZ)); in capture_show()
240 ATTRIBUTE_GROUPS(pwm);
249 static int pwm_export_child(struct device *parent, struct pwm_device *pwm) in pwm_export_child() argument
254 if (test_and_set_bit(PWMF_EXPORTED, &pwm->flags)) in pwm_export_child()
259 clear_bit(PWMF_EXPORTED, &pwm->flags); in pwm_export_child()
263 export->pwm = pwm; in pwm_export_child()
270 dev_set_name(&export->child, "pwm%u", pwm->hwpwm); in pwm_export_child()
274 clear_bit(PWMF_EXPORTED, &pwm->flags); in pwm_export_child()
287 static int pwm_unexport_child(struct device *parent, struct pwm_device *pwm) in pwm_unexport_child() argument
291 if (!test_and_clear_bit(PWMF_EXPORTED, &pwm->flags)) in pwm_unexport_child()
294 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_unexport_child()
301 pwm_put(pwm); in pwm_unexport_child()
311 struct pwm_device *pwm; in export_store() local
322 pwm = pwm_request_from_chip(chip, hwpwm, "sysfs"); in export_store()
323 if (IS_ERR(pwm)) in export_store()
324 return PTR_ERR(pwm); in export_store()
326 ret = pwm_export_child(parent, pwm); in export_store()
328 pwm_put(pwm); in export_store()
410 struct pwm_device *pwm = &chip->pwms[i]; in pwmchip_sysfs_unexport() local
412 if (test_bit(PWMF_EXPORTED, &pwm->flags)) in pwmchip_sysfs_unexport()
413 pwm_unexport_child(parent, pwm); in pwmchip_sysfs_unexport()