Lines Matching refs:pwmchip_dev

1100 static inline struct pwm_chip *pwmchip_from_dev(struct device *pwmchip_dev)
1102 return container_of(pwmchip_dev, struct pwm_chip, dev);
1319 static int pwm_export_child(struct device *pwmchip_dev, struct pwm_device *pwm)
1338 export->pwm_dev.parent = pwmchip_dev;
1352 kobject_uevent_env(&pwmchip_dev->kobj, KOBJ_CHANGE, pwm_prop);
1363 static int pwm_unexport_child(struct device *pwmchip_dev, struct pwm_device *pwm)
1371 pwm_dev = device_find_child(pwmchip_dev, pwm, pwm_unexport_match);
1377 kobject_uevent_env(&pwmchip_dev->kobj, KOBJ_CHANGE, pwm_prop);
1388 static ssize_t export_store(struct device *pwmchip_dev,
1392 struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1408 ret = pwm_export_child(pwmchip_dev, pwm);
1416 static ssize_t unexport_store(struct device *pwmchip_dev,
1420 struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1431 ret = pwm_unexport_child(pwmchip_dev, &chip->pwms[hwpwm]);
1437 static ssize_t npwm_show(struct device *pwmchip_dev, struct device_attribute *attr,
1440 const struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1455 static struct pwm_export *pwm_class_get_state(struct device *pwmchip_dev,
1465 pwm_dev = device_find_child(pwmchip_dev, pwm, pwm_unexport_match);
1490 static int pwm_class_resume_npwm(struct device *pwmchip_dev, unsigned int npwm)
1492 struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1501 export = pwm_class_get_state(pwmchip_dev, pwm, &state);
1521 static int pwm_class_suspend(struct device *pwmchip_dev)
1523 struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1532 export = pwm_class_get_state(pwmchip_dev, pwm, &state);
1554 pwm_class_resume_npwm(pwmchip_dev, i);
1562 static int pwm_class_resume(struct device *pwmchip_dev)
1564 struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1566 return pwm_class_resume_npwm(pwmchip_dev, chip->npwm);
1603 static void pwmchip_release(struct device *pwmchip_dev)
1605 struct pwm_chip *chip = pwmchip_from_dev(pwmchip_dev);
1613 struct device *pwmchip_dev;
1628 pwmchip_dev = &chip->dev;
1629 device_initialize(pwmchip_dev);
1630 pwmchip_dev->class = &pwm_class;
1631 pwmchip_dev->parent = parent;
1632 pwmchip_dev->release = pwmchip_release;