Lines Matching refs:parent
191 static int pwm_export_child(struct device *parent, struct pwm_device *pwm) in pwm_export_child() argument
208 export->child.parent = parent; in pwm_export_child()
228 static int pwm_unexport_child(struct device *parent, struct pwm_device *pwm) in pwm_unexport_child() argument
235 child = device_find_child(parent, pwm, pwm_unexport_match); in pwm_unexport_child()
247 static ssize_t export_store(struct device *parent, in export_store() argument
251 struct pwm_chip *chip = dev_get_drvdata(parent); in export_store()
267 ret = pwm_export_child(parent, pwm); in export_store()
275 static ssize_t unexport_store(struct device *parent, in unexport_store() argument
279 struct pwm_chip *chip = dev_get_drvdata(parent); in unexport_store()
290 ret = pwm_unexport_child(parent, &chip->pwms[hwpwm]); in unexport_store()
296 static ssize_t npwm_show(struct device *parent, struct device_attribute *attr, in npwm_show() argument
299 const struct pwm_chip *chip = dev_get_drvdata(parent); in npwm_show()
319 static int pwmchip_sysfs_match(struct device *parent, const void *data) in pwmchip_sysfs_match() argument
321 return dev_get_drvdata(parent) == data; in pwmchip_sysfs_match()
326 struct device *parent; in pwmchip_sysfs_export() local
332 parent = device_create(&pwm_class, chip->dev, MKDEV(0, 0), chip, in pwmchip_sysfs_export()
334 if (IS_ERR(parent)) { in pwmchip_sysfs_export()
342 struct device *parent; in pwmchip_sysfs_unexport() local
344 parent = class_find_device(&pwm_class, NULL, chip, in pwmchip_sysfs_unexport()
346 if (parent) { in pwmchip_sysfs_unexport()
348 put_device(parent); in pwmchip_sysfs_unexport()
349 device_unregister(parent); in pwmchip_sysfs_unexport()