14 #include <linux/module.h>
17 #include <linux/device.h>
27 #include "../../../arch/arm/mach-sa1100/generic.h"
31 static unsigned long locomolcd_flags;
32 #define LOCOMOLCD_SUSPENDED 0x01
34 static void locomolcd_on(
int comadj)
65 static void locomolcd_off(
int comadj)
96 if (comadj == -1 && machine_is_collie())
98 if (comadj == -1 && machine_is_poodle())
102 locomolcd_on(comadj);
104 locomolcd_off(comadj);
111 static int current_intensity;
115 int intensity = bd->
props.brightness;
135 current_intensity = intensity;
141 return current_intensity;
145 .get_brightness = locomolcd_get_intensity,
146 .update_status = locomolcd_set_intensity,
153 locomolcd_set_intensity(locomolcd_bl_device);
159 locomolcd_flags &= ~LOCOMOLCD_SUSPENDED;
160 locomolcd_set_intensity(locomolcd_bl_device);
164 #define locomolcd_suspend NULL
165 #define locomolcd_resume NULL
168 static int locomolcd_probe(
struct locomo_dev *ldev)
174 locomolcd_dev = ldev;
181 if (machine_is_poodle())
191 &locomobl_data, &props);
193 if (IS_ERR (locomolcd_bl_device))
194 return PTR_ERR (locomolcd_bl_device);
197 locomolcd_bl_device->
props.brightness = 2;
198 locomolcd_set_intensity(locomolcd_bl_device);
207 locomolcd_bl_device->
props.brightness = 0;
208 locomolcd_bl_device->
props.power = 0;
209 locomolcd_set_intensity(locomolcd_bl_device);
213 locomolcd_dev =
NULL;
220 .name =
"locomo-backlight",
223 .probe = locomolcd_probe,
224 .remove = locomolcd_remove,
230 static int __init locomolcd_init(
void)
235 static void __exit locomolcd_exit(
void)