Lines Matching refs:dev
67 static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, in led_pwm_add() argument
80 led_data->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); in led_pwm_add()
82 return dev_err_probe(dev, PTR_ERR(led_data->pwm), in led_pwm_add()
95 dev_warn(dev, in led_pwm_add()
121 ret = devm_led_classdev_register_ext(dev, &led_data->cdev, &init_data); in led_pwm_add()
123 dev_err(dev, "failed to register PWM led for %s: %d\n", in led_pwm_add()
131 dev_err(dev, "failed to set led PWM value for %s: %d", in led_pwm_add()
141 static int led_pwm_create_fwnode(struct device *dev, struct led_pwm_priv *priv) in led_pwm_create_fwnode() argument
147 device_for_each_child_node(dev, fwnode) { in led_pwm_create_fwnode()
166 ret = led_pwm_add(dev, priv, &led, fwnode); in led_pwm_create_fwnode()
184 count = device_get_child_node_count(&pdev->dev); in led_pwm_probe()
189 priv = devm_kzalloc(&pdev->dev, struct_size(priv, leds, count), in led_pwm_probe()
194 ret = led_pwm_create_fwnode(&pdev->dev, priv); in led_pwm_probe()