Lines Matching full:child

18 	struct device child;  member
24 static struct pwm_export *child_to_pwm_export(struct device *child) in child_to_pwm_export() argument
26 return container_of(child, struct pwm_export, child); in child_to_pwm_export()
29 static struct pwm_device *child_to_pwm_device(struct device *child) in child_to_pwm_device() argument
31 struct pwm_export *export = child_to_pwm_export(child); in child_to_pwm_device()
36 static ssize_t period_show(struct device *child, in period_show() argument
40 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show()
48 static ssize_t period_store(struct device *child, in period_store() argument
52 struct pwm_export *export = child_to_pwm_export(child); in period_store()
71 static ssize_t duty_cycle_show(struct device *child, in duty_cycle_show() argument
75 const struct pwm_device *pwm = child_to_pwm_device(child); in duty_cycle_show()
83 static ssize_t duty_cycle_store(struct device *child, in duty_cycle_store() argument
87 struct pwm_export *export = child_to_pwm_export(child); in duty_cycle_store()
107 static ssize_t oneshot_count_show(struct device *child, in oneshot_count_show() argument
111 const struct pwm_device *pwm = child_to_pwm_device(child); in oneshot_count_show()
119 static ssize_t oneshot_count_store(struct device *child, in oneshot_count_store() argument
123 struct pwm_export *export = child_to_pwm_export(child); in oneshot_count_store()
143 static ssize_t enable_show(struct device *child, in enable_show() argument
147 const struct pwm_device *pwm = child_to_pwm_device(child); in enable_show()
155 static ssize_t enable_store(struct device *child, in enable_store() argument
159 struct pwm_export *export = child_to_pwm_export(child); in enable_store()
191 static ssize_t polarity_show(struct device *child, in polarity_show() argument
195 const struct pwm_device *pwm = child_to_pwm_device(child); in polarity_show()
214 static ssize_t polarity_store(struct device *child, in polarity_store() argument
218 struct pwm_export *export = child_to_pwm_export(child); in polarity_store()
240 static ssize_t capture_show(struct device *child, in capture_show() argument
244 struct pwm_device *pwm = child_to_pwm_device(child); in capture_show()
255 static ssize_t output_type_show(struct device *child, in output_type_show() argument
259 const struct pwm_device *pwm = child_to_pwm_device(child); in output_type_show()
302 static void pwm_export_release(struct device *child) in pwm_export_release() argument
304 struct pwm_export *export = child_to_pwm_export(child); in pwm_export_release()
327 export->child.release = pwm_export_release; in pwm_export_child()
328 export->child.parent = parent; in pwm_export_child()
329 export->child.devt = MKDEV(0, 0); in pwm_export_child()
330 export->child.groups = pwm_groups; in pwm_export_child()
331 dev_set_name(&export->child, "pwm%u", pwm->hwpwm); in pwm_export_child()
333 ret = device_register(&export->child); in pwm_export_child()
336 put_device(&export->child); in pwm_export_child()
348 static int pwm_unexport_match(struct device *child, void *data) in pwm_unexport_match() argument
350 return child_to_pwm_device(child) == data; in pwm_unexport_match()
355 struct device *child; in pwm_unexport_child() local
361 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_unexport_child()
362 if (!child) in pwm_unexport_child()
371 put_device(child); in pwm_unexport_child()
372 device_unregister(child); in pwm_unexport_child()
449 struct device *child; in pwm_class_get_state() local
455 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_class_get_state()
456 if (!child) in pwm_class_get_state()
459 export = child_to_pwm_export(child); in pwm_class_get_state()
460 put_device(child); /* for device_find_child() */ in pwm_class_get_state()