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 period_show(struct device *child, in period_show() argument
47 const struct pwm_device *pwm = child_to_pwm_device(child); in period_show()
52 static ssize_t period_store(struct device *child, in period_store() argument
56 struct pwm_device *pwm = child_to_pwm_device(child); in period_store()
69 static ssize_t duty_cycle_show(struct device *child, in duty_cycle_show() argument
73 const struct pwm_device *pwm = child_to_pwm_device(child); in duty_cycle_show()
78 static ssize_t duty_cycle_store(struct device *child, in duty_cycle_store() argument
82 struct pwm_device *pwm = child_to_pwm_device(child); in duty_cycle_store()
95 static ssize_t enable_show(struct device *child, in enable_show() argument
99 const struct pwm_device *pwm = child_to_pwm_device(child); in enable_show()
104 static ssize_t enable_store(struct device *child, in enable_store() argument
108 struct pwm_device *pwm = child_to_pwm_device(child); in enable_store()
130 static ssize_t polarity_show(struct device *child, in polarity_show() argument
134 const struct pwm_device *pwm = child_to_pwm_device(child); in polarity_show()
150 static ssize_t polarity_store(struct device *child, in polarity_store() argument
154 struct pwm_device *pwm = child_to_pwm_device(child); in polarity_store()
184 static void pwm_export_release(struct device *child) in pwm_export_release() argument
186 struct pwm_export *export = child_to_pwm_export(child); in pwm_export_release()
207 export->child.release = pwm_export_release; in pwm_export_child()
208 export->child.parent = parent; in pwm_export_child()
209 export->child.devt = MKDEV(0, 0); in pwm_export_child()
210 export->child.groups = pwm_groups; in pwm_export_child()
211 dev_set_name(&export->child, "pwm%u", pwm->hwpwm); in pwm_export_child()
213 ret = device_register(&export->child); in pwm_export_child()
223 static int pwm_unexport_match(struct device *child, void *data) in pwm_unexport_match() argument
225 return child_to_pwm_device(child) == data; in pwm_unexport_match()
230 struct device *child; in pwm_unexport_child() local
235 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_unexport_child()
236 if (!child) in pwm_unexport_child()
240 put_device(child); in pwm_unexport_child()
241 device_unregister(child); in pwm_unexport_child()