Lines Matching refs:parent

181 static int pwm_export_child(struct device *parent, struct pwm_device *pwm)  in pwm_export_child()  argument
198 export->child.parent = parent; in pwm_export_child()
218 static int pwm_unexport_child(struct device *parent, struct pwm_device *pwm) in pwm_unexport_child() argument
225 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_unexport_child()
237 static ssize_t pwm_export_store(struct device *parent, in pwm_export_store() argument
241 struct pwm_chip *chip = dev_get_drvdata(parent); in pwm_export_store()
257 ret = pwm_export_child(parent, pwm); in pwm_export_store()
265 static ssize_t pwm_unexport_store(struct device *parent, in pwm_unexport_store() argument
269 struct pwm_chip *chip = dev_get_drvdata(parent); in pwm_unexport_store()
280 ret = pwm_unexport_child(parent, &chip->pwms[hwpwm]); in pwm_unexport_store()
286 static ssize_t npwm_show(struct device *parent, struct device_attribute *attr, in npwm_show() argument
289 const struct pwm_chip *chip = dev_get_drvdata(parent); in npwm_show()
309 static int pwmchip_sysfs_match(struct device *parent, const void *data) in pwmchip_sysfs_match() argument
311 return dev_get_drvdata(parent) == data; in pwmchip_sysfs_match()
316 struct device *parent; in pwmchip_sysfs_export() local
322 parent = device_create(&pwm_class, chip->dev, MKDEV(0, 0), chip, in pwmchip_sysfs_export()
324 if (IS_ERR(parent)) { in pwmchip_sysfs_export()
332 struct device *parent; in pwmchip_sysfs_unexport() local
334 parent = class_find_device(&pwm_class, NULL, chip, in pwmchip_sysfs_unexport()
336 if (parent) { in pwmchip_sysfs_unexport()
338 put_device(parent); in pwmchip_sysfs_unexport()
339 device_unregister(parent); in pwmchip_sysfs_unexport()