Lines Matching refs:led_dat
36 struct led_pwm_data *led_dat =
38 unsigned int max = led_dat->cdev.max_brightness;
39 unsigned int period = led_dat->period;
42 pwm_config(led_dat->pwm, 0, period);
43 pwm_disable(led_dat->pwm);
45 pwm_config(led_dat->pwm, brightness * period / max, period);
46 pwm_enable(led_dat->pwm);
54 struct led_pwm_data *leds_data, *led_dat;
67 led_dat = &leds_data[i];
69 led_dat->pwm = pwm_request(cur_led->pwm_id,
71 if (IS_ERR(led_dat->pwm)) {
77 led_dat->cdev.name = cur_led->name;
78 led_dat->cdev.default_trigger = cur_led->default_trigger;
79 led_dat->active_low = cur_led->active_low;
80 led_dat->period = cur_led->pwm_period_ns;
81 led_dat->cdev.brightness_set = led_pwm_set;
82 led_dat->cdev.brightness = LED_OFF;
83 led_dat->cdev.max_brightness = cur_led->max_brightness;
84 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
86 ret = led_classdev_register(&pdev->dev, &led_dat->cdev);
88 pwm_free(led_dat->pwm);