14 #include <linux/module.h>
15 #include <linux/kernel.h>
24 #define KB3886_PARENT 0x64
25 #define KB3886_IO 0x60
26 #define KB3886_ADC_DAC_PWM 0xC4
27 #define KB3886_PWM0_WRITE 0x81
28 #define KB3886_PWM0_READ 0x41
32 static void kb3886_bl_set_intensity(
int intensity)
35 intensity = intensity&0xff;
52 .max_intensity = 0xff,
53 .default_intensity = 0xa0,
55 .set_bl_intensity = kb3886_bl_set_intensity,
61 .platform_data = &kb3886_bl_machinfo,
74 static int kb3886bl_intensity;
78 static unsigned long kb3886bl_flags;
79 #define KB3886BL_SUSPENDED 0x01
83 .ident =
"Sahara Touch-iT",
94 int intensity = bd->
props.brightness;
105 kb3886bl_intensity = intensity;
115 backlight_update_status(bd);
123 kb3886bl_flags &= ~KB3886BL_SUSPENDED;
124 backlight_update_status(bd);
128 #define kb3886bl_suspend NULL
129 #define kb3886bl_resume NULL
134 return kb3886bl_intensity;
138 .get_brightness = kb3886bl_get_intensity,
139 .update_status = kb3886bl_send_intensity,
147 bl_machinfo = machinfo;
158 if (IS_ERR(kb3886_backlight_device))
159 return PTR_ERR(kb3886_backlight_device);
161 platform_set_drvdata(pdev, kb3886_backlight_device);
165 backlight_update_status(kb3886_backlight_device);
180 .probe = kb3886bl_probe,
181 .remove = kb3886bl_remove,
189 static int __init kb3886_init(
void)
198 static void __exit kb3886_exit(
void)