Lines Matching refs:dev
222 rc = pm_runtime_resume_and_get(rz_mtu3_pwm->chip.dev); in rz_mtu3_pwm_enable()
268 pm_runtime_put_sync(rz_mtu3_pwm->chip.dev); in rz_mtu3_pwm_disable()
277 rc = pm_runtime_resume_and_get(chip->dev); in rz_mtu3_pwm_get_state()
310 pm_runtime_put(chip->dev); in rz_mtu3_pwm_get_state()
365 rc = pm_runtime_resume_and_get(chip->dev); in rz_mtu3_pwm_config()
402 pm_runtime_put(chip->dev); in rz_mtu3_pwm_config()
444 static int rz_mtu3_pwm_pm_runtime_suspend(struct device *dev) in rz_mtu3_pwm_pm_runtime_suspend() argument
446 struct rz_mtu3_pwm_chip *rz_mtu3_pwm = dev_get_drvdata(dev); in rz_mtu3_pwm_pm_runtime_suspend()
453 static int rz_mtu3_pwm_pm_runtime_resume(struct device *dev) in rz_mtu3_pwm_pm_runtime_resume() argument
455 struct rz_mtu3_pwm_chip *rz_mtu3_pwm = dev_get_drvdata(dev); in rz_mtu3_pwm_pm_runtime_resume()
469 pm_runtime_disable(rz_mtu3_pwm->chip.dev); in rz_mtu3_pwm_pm_disable()
470 pm_runtime_set_suspended(rz_mtu3_pwm->chip.dev); in rz_mtu3_pwm_pm_disable()
475 struct rz_mtu3 *parent_ddata = dev_get_drvdata(pdev->dev.parent); in rz_mtu3_pwm_probe()
477 struct device *dev = &pdev->dev; in rz_mtu3_pwm_probe() local
481 rz_mtu3_pwm = devm_kzalloc(&pdev->dev, sizeof(*rz_mtu3_pwm), GFP_KERNEL); in rz_mtu3_pwm_probe()
492 rz_mtu3_pwm->channel_data[j].mtu->dev = dev; in rz_mtu3_pwm_probe()
501 return dev_err_probe(dev, ret, "Clock enable failed\n"); in rz_mtu3_pwm_probe()
516 pm_runtime_set_active(&pdev->dev); in rz_mtu3_pwm_probe()
517 pm_runtime_enable(&pdev->dev); in rz_mtu3_pwm_probe()
518 rz_mtu3_pwm->chip.dev = &pdev->dev; in rz_mtu3_pwm_probe()
519 ret = devm_add_action_or_reset(&pdev->dev, rz_mtu3_pwm_pm_disable, in rz_mtu3_pwm_probe()
526 ret = devm_pwmchip_add(&pdev->dev, &rz_mtu3_pwm->chip); in rz_mtu3_pwm_probe()
528 return dev_err_probe(&pdev->dev, ret, "failed to add PWM chip\n"); in rz_mtu3_pwm_probe()
530 pm_runtime_idle(&pdev->dev); in rz_mtu3_pwm_probe()