19 #include <linux/kernel.h>
26 #include <linux/slab.h>
27 #include <linux/module.h>
56 pulses = 32 - (led_dat->
new_level * 32) / 255;
75 static void lt3593_led_set(
struct led_classdev *led_cdev,
91 if (!gpio_is_valid(
template->gpio)) {
92 printk(
KERN_INFO "%s: skipping unavailable LT3593 LED at gpio %d (%s)\n",
101 led_dat->
cdev.name =
template->name;
102 led_dat->
cdev.default_trigger =
template->default_trigger;
103 led_dat->
gpio =
template->gpio;
105 led_dat->
cdev.brightness_set = lt3593_led_set;
110 if (!
template->retain_state_suspended)
135 if (!gpio_is_valid(led->
gpio))
158 for (i = 0; i < pdata->
num_leds; i++) {
159 ret = create_lt3593_led(&pdata->
leds[i], &leds_data[i],
165 platform_set_drvdata(pdev, leds_data);
170 for (i = i - 1; i >= 0; i--)
171 delete_lt3593_led(&leds_data[i]);
182 leds_data = platform_get_drvdata(pdev);
184 for (i = 0; i < pdata->
num_leds; i++)
185 delete_lt3593_led(&leds_data[i]);
191 .probe = lt3593_led_probe,
194 .name =
"leds-lt3593",