Lines Matching refs:parent
241 static int pwm_export_child(struct device *parent, struct pwm_device *pwm)
260 export->child.parent = parent;
274 kobject_uevent_env(&parent->kobj, KOBJ_CHANGE, pwm_prop);
285 static int pwm_unexport_child(struct device *parent, struct pwm_device *pwm)
293 child = device_find_child(parent, pwm, pwm_unexport_match);
299 kobject_uevent_env(&parent->kobj, KOBJ_CHANGE, pwm_prop);
310 static ssize_t export_store(struct device *parent,
314 struct pwm_chip *chip = dev_get_drvdata(parent);
330 ret = pwm_export_child(parent, pwm);
338 static ssize_t unexport_store(struct device *parent,
342 struct pwm_chip *chip = dev_get_drvdata(parent);
353 ret = pwm_unexport_child(parent, &chip->pwms[hwpwm]);
359 static ssize_t npwm_show(struct device *parent, struct device_attribute *attr,
362 const struct pwm_chip *chip = dev_get_drvdata(parent);
377 static struct pwm_export *pwm_class_get_state(struct device *parent,
387 child = device_find_child(parent, pwm, pwm_unexport_match);
412 static int pwm_class_resume_npwm(struct device *parent, unsigned int npwm)
414 struct pwm_chip *chip = dev_get_drvdata(parent);
423 export = pwm_class_get_state(parent, pwm, &state);
443 static int __maybe_unused pwm_class_suspend(struct device *parent)
445 struct pwm_chip *chip = dev_get_drvdata(parent);
454 export = pwm_class_get_state(parent, pwm, &state);
476 pwm_class_resume_npwm(parent, i);
484 static int __maybe_unused pwm_class_resume(struct device *parent)
486 struct pwm_chip *chip = dev_get_drvdata(parent);
488 return pwm_class_resume_npwm(parent, chip->npwm);
500 static int pwmchip_sysfs_match(struct device *parent, const void *data)
502 return dev_get_drvdata(parent) == data;
507 struct device *parent;
513 parent = device_create(&pwm_class, chip->dev, MKDEV(0, 0), chip,
515 if (IS_ERR(parent)) {
523 struct device *parent;
526 parent = class_find_device(&pwm_class, NULL, chip,
528 if (!parent)
535 pwm_unexport_child(parent, pwm);
538 put_device(parent);
539 device_unregister(parent);