18 #include <linux/module.h>
24 #define DA9052_MAX_BRIGHTNESS 0xFF
37 static unsigned char wled_bank[] = {
50 static int da9052_adjust_wled_brightness(
struct da9052_bl *wleds)
52 unsigned char boost_en;
71 ret = da9052_reg_write(wleds->
da9052, wled_bank[wleds->
led_reg], 0x0);
78 ret = da9052_reg_write(wleds->
da9052, wled_bank[wleds->
led_reg],
90 struct da9052_bl *wleds = bl_get_data(bl);
95 return da9052_adjust_wled_brightness(wleds);
100 struct da9052_bl *wleds = bl_get_data(bl);
106 .update_status = da9052_backlight_update_status,
107 .get_brightness = da9052_backlight_get_brightness,
129 &da9052_backlight_ops, &props);
131 dev_err(&pdev->
dev,
"Failed to register backlight\n");
136 bl->
props.brightness = 0;
137 platform_set_drvdata(pdev, bl);
139 return da9052_adjust_wled_brightness(wleds);
145 struct da9052_bl *wleds = bl_get_data(bl);
149 da9052_adjust_wled_brightness(wleds);
157 .name =
"da9052-wled1",
161 .name =
"da9052-wled2",
165 .name =
"da9052-wled3",
171 .probe = da9052_backlight_probe,
172 .remove = da9052_backlight_remove,
173 .id_table = da9052_wled_ids,
175 .
name =
"da9052-wled",