15 #include <linux/slab.h>
17 #ifdef CONFIG_PMAC_BACKLIGHT
21 #define MAX_RADEON_LEVEL 0xFF
53 u32 lvds_gen_cntl, tmpPixclksCntl;
67 level = bd->
props.brightness;
77 lvds_gen_cntl |= LVDS_BLON |
LVDS_EN;
81 (radeon_bl_get_level_brightness(pdata, level) <<
91 (radeon_bl_get_level_brightness(pdata, level) <<
106 lvds_gen_cntl |= (radeon_bl_get_level_brightness(pdata, 0) <<
111 lvds_gen_cntl &= ~(LVDS_ON |
LVDS_EN);
128 return bd->
props.brightness;
132 .get_brightness = radeon_bl_get_brightness,
133 .update_status = radeon_bl_update_status,
146 #ifdef CONFIG_PMAC_BACKLIGHT
154 printk(
"radeonfb: Memory allocation failed\n");
158 snprintf(name,
sizeof(name),
"radeonbl%d", rinfo->
info->node);
164 &radeon_bl_data, &props);
167 printk(
"radeonfb: Backlight registration failed\n");
182 #ifdef CONFIG_PMAC_BACKLIGHT
189 rinfo->
info->bl_dev = bd;
194 bd->
props.brightness = bd->
props.max_brightness;
196 backlight_update_status(bd);
198 printk(
"radeonfb: Backlight initialized (%s)\n", name);
214 pdata = bl_get_data(bd);
219 printk(
"radeonfb: Backlight unloaded\n");