14 #include <linux/module.h>
15 #include <linux/slab.h>
23 #define MAX_BRIGHTNESS LP8788_ISINK_MAX_PWM
24 #define DEFAULT_LED_NAME "keyboard-backlight"
72 addr = lp8788_iout_addr[cfg->
num];
73 mask = lp8788_iout_mask[cfg->
num];
79 static void lp8788_led_enable(
struct lp8788_led *led,
111 enable = (val > 0) ? 1 : 0;
112 if (enable != led->
on)
113 lp8788_led_enable(led, num, enable);
118 static void lp8788_brightness_set(
struct led_classdev *led_cdev,
141 led->
led_dev.brightness_set = lp8788_brightness_set;
145 if (!led_pdata || !led_pdata->
name)
153 platform_set_drvdata(pdev, led);
155 ret = lp8788_led_init_device(led, led_pdata);
157 dev_err(lp->
dev,
"led init device err: %d\n", ret);
163 dev_err(lp->
dev,
"led register err: %d\n", ret);
172 struct lp8788_led *led = platform_get_drvdata(pdev);
181 .probe = lp8788_led_probe,