13 #include <linux/module.h>
14 #include <linux/kernel.h>
22 #define TWL_PWM0_ON 0x00
23 #define TWL_PWM0_OFF 0x01
25 #define TWL_INTBR_GPBR1 0x0c
26 #define TWL_INTBR_PMBR1 0x0d
28 #define TWL_PMBR1_PWM0_MUXMASK 0x0c
29 #define TWL_PMBR1_PWM0 0x04
30 #define PWM0_CLK_ENABLE BIT(0)
31 #define PWM0_ENABLE BIT(2)
36 #define MAX_USER_VALUE (MAX_VALUE - MIN_VALUE)
38 #define PANDORABL_WAS_OFF BL_CORE_DRIVER1
55 if (brightness == 0) {
107 return bl->
props.brightness;
112 .update_status = pandora_backlight_update_status,
113 .get_brightness = pandora_backlight_get_brightness,
128 dev_err(&pdev->
dev,
"failed to register backlight\n");
132 platform_set_drvdata(pdev, bl);
139 backlight_update_status(bl);
159 .name =
"pandora-backlight",
162 .probe = pandora_backlight_probe,
163 .remove = pandora_backlight_remove,