11 #include <linux/kernel.h>
14 #include <linux/module.h>
17 #include <linux/slab.h>
87 if (power_up || power_down) {
97 int brightness = bl->
props.brightness;
108 return wm831x_backlight_set(bl, brightness);
119 .update_status = wm831x_backlight_update_status,
120 .get_brightness = wm831x_backlight_get_brightness,
131 int ret,
i, max_isel, isink_reg, dcdc_cfg;
134 if (pdev->
dev.parent->platform_data) {
135 wm831x_pdata = pdev->
dev.parent->platform_data;
142 dev_err(&pdev->
dev,
"No platform data supplied\n");
160 "Maximum current is %duA not %duA as requested\n",
163 switch (pdata->
isink) {
197 memset(&props, 0,
sizeof(props));
199 props.max_brightness = max_isel;
201 &wm831x_backlight_ops, &props);
203 dev_err(&pdev->
dev,
"failed to register backlight\n");
207 bl->
props.brightness = max_isel;
209 platform_set_drvdata(pdev, bl);
214 backlight_update_status(bl);
229 .name =
"wm831x-backlight",
232 .probe = wm831x_backlight_probe,
233 .remove = wm831x_backlight_remove,