Lines Matching refs:child

27 	struct device child;  member
31 static struct pwm_export *child_to_pwm_export(struct device *child) in child_to_pwm_export() argument
33 return container_of(child, struct pwm_export, child); in child_to_pwm_export()
36 static struct pwm_device *child_to_pwm_device(struct device *child) in child_to_pwm_device() argument
38 struct pwm_export *export = child_to_pwm_export(child); in child_to_pwm_device()
43 static ssize_t pwm_period_show(struct device *child, in pwm_period_show() argument
47 const struct pwm_device *pwm = child_to_pwm_device(child); in pwm_period_show()
52 static ssize_t pwm_period_store(struct device *child, in pwm_period_store() argument
56 struct pwm_device *pwm = child_to_pwm_device(child); in pwm_period_store()
69 static ssize_t pwm_duty_cycle_show(struct device *child, in pwm_duty_cycle_show() argument
73 const struct pwm_device *pwm = child_to_pwm_device(child); in pwm_duty_cycle_show()
78 static ssize_t pwm_duty_cycle_store(struct device *child, in pwm_duty_cycle_store() argument
82 struct pwm_device *pwm = child_to_pwm_device(child); in pwm_duty_cycle_store()
95 static ssize_t pwm_enable_show(struct device *child, in pwm_enable_show() argument
99 const struct pwm_device *pwm = child_to_pwm_device(child); in pwm_enable_show()
105 static ssize_t pwm_enable_store(struct device *child, in pwm_enable_store() argument
109 struct pwm_device *pwm = child_to_pwm_device(child); in pwm_enable_store()
131 static ssize_t pwm_polarity_show(struct device *child, in pwm_polarity_show() argument
135 const struct pwm_device *pwm = child_to_pwm_device(child); in pwm_polarity_show()
140 static ssize_t pwm_polarity_store(struct device *child, in pwm_polarity_store() argument
144 struct pwm_device *pwm = child_to_pwm_device(child); in pwm_polarity_store()
174 static void pwm_export_release(struct device *child) in pwm_export_release() argument
176 struct pwm_export *export = child_to_pwm_export(child); in pwm_export_release()
197 export->child.release = pwm_export_release; in pwm_export_child()
198 export->child.parent = parent; in pwm_export_child()
199 export->child.devt = MKDEV(0, 0); in pwm_export_child()
200 export->child.groups = pwm_groups; in pwm_export_child()
201 dev_set_name(&export->child, "pwm%u", pwm->hwpwm); in pwm_export_child()
203 ret = device_register(&export->child); in pwm_export_child()
213 static int pwm_unexport_match(struct device *child, void *data) in pwm_unexport_match() argument
215 return child_to_pwm_device(child) == data; in pwm_unexport_match()
220 struct device *child; in pwm_unexport_child() local
225 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_unexport_child()
226 if (!child) in pwm_unexport_child()
230 put_device(child); in pwm_unexport_child()
231 device_unregister(child); in pwm_unexport_child()