diff options
author | Matthew Garrett <mjg@redhat.com> | 2011-03-22 19:30:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 20:43:59 -0400 |
commit | bb7ca747f8d6243b3943c5b133048652020f4a50 (patch) | |
tree | b40e879a7b26e3763aea2af2d4dd9079483de11e /drivers/video/backlight | |
parent | ccd7510fd8dea5b4b2af87fb2aef2ebd6b23b76b (diff) |
backlight: add backlight type
There may be multiple ways of controlling the backlight on a given
machine. Allow drivers to expose the type of interface they are
providing, making it possible for userspace to make appropriate policy
decisions.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight')
24 files changed, 46 insertions, 1 deletions
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index b224396b86d5..e59623a15f3f 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c | |||
@@ -227,6 +227,7 @@ static int pm860x_backlight_probe(struct platform_device *pdev) | |||
227 | } | 227 | } |
228 | 228 | ||
229 | memset(&props, 0, sizeof(struct backlight_properties)); | 229 | memset(&props, 0, sizeof(struct backlight_properties)); |
230 | props.type = BACKLIGHT_RAW; | ||
230 | props.max_brightness = MAX_BRIGHTNESS; | 231 | props.max_brightness = MAX_BRIGHTNESS; |
231 | bl = backlight_device_register(name, &pdev->dev, data, | 232 | bl = backlight_device_register(name, &pdev->dev, data, |
232 | &pm860x_backlight_ops, &props); | 233 | &pm860x_backlight_ops, &props); |
diff --git a/drivers/video/backlight/adp5520_bl.c b/drivers/video/backlight/adp5520_bl.c index 9f436e014f85..af3119707dbf 100644 --- a/drivers/video/backlight/adp5520_bl.c +++ b/drivers/video/backlight/adp5520_bl.c | |||
@@ -303,6 +303,7 @@ static int __devinit adp5520_bl_probe(struct platform_device *pdev) | |||
303 | mutex_init(&data->lock); | 303 | mutex_init(&data->lock); |
304 | 304 | ||
305 | memset(&props, 0, sizeof(struct backlight_properties)); | 305 | memset(&props, 0, sizeof(struct backlight_properties)); |
306 | props.type = BACKLIGHT_RAW; | ||
306 | props.max_brightness = ADP5020_MAX_BRIGHTNESS; | 307 | props.max_brightness = ADP5020_MAX_BRIGHTNESS; |
307 | bl = backlight_device_register(pdev->name, data->master, data, | 308 | bl = backlight_device_register(pdev->name, data->master, data, |
308 | &adp5520_bl_ops, &props); | 309 | &adp5520_bl_ops, &props); |
diff --git a/drivers/video/backlight/adp8860_bl.c b/drivers/video/backlight/adp8860_bl.c index 734c650a47c4..d2a96a421ffd 100644 --- a/drivers/video/backlight/adp8860_bl.c +++ b/drivers/video/backlight/adp8860_bl.c | |||
@@ -709,6 +709,7 @@ static int __devinit adp8860_probe(struct i2c_client *client, | |||
709 | i2c_set_clientdata(client, data); | 709 | i2c_set_clientdata(client, data); |
710 | 710 | ||
711 | memset(&props, 0, sizeof(props)); | 711 | memset(&props, 0, sizeof(props)); |
712 | props.type = BACKLIGHT_RAW; | ||
712 | props.max_brightness = ADP8860_MAX_BRIGHTNESS; | 713 | props.max_brightness = ADP8860_MAX_BRIGHTNESS; |
713 | 714 | ||
714 | mutex_init(&data->lock); | 715 | mutex_init(&data->lock); |
diff --git a/drivers/video/backlight/adx_bl.c b/drivers/video/backlight/adx_bl.c index fe9af129c5dd..c861c41af442 100644 --- a/drivers/video/backlight/adx_bl.c +++ b/drivers/video/backlight/adx_bl.c | |||
@@ -104,6 +104,7 @@ static int __devinit adx_backlight_probe(struct platform_device *pdev) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | memset(&props, 0, sizeof(struct backlight_properties)); | 106 | memset(&props, 0, sizeof(struct backlight_properties)); |
107 | props.type = BACKLIGHT_RAW; | ||
107 | props.max_brightness = 0xff; | 108 | props.max_brightness = 0xff; |
108 | bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, | 109 | bldev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, |
109 | bl, &adx_backlight_ops, &props); | 110 | bl, &adx_backlight_ops, &props); |
diff --git a/drivers/video/backlight/atmel-pwm-bl.c b/drivers/video/backlight/atmel-pwm-bl.c index e6a66dab088c..0443a4f71858 100644 --- a/drivers/video/backlight/atmel-pwm-bl.c +++ b/drivers/video/backlight/atmel-pwm-bl.c | |||
@@ -168,6 +168,7 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev) | |||
168 | } | 168 | } |
169 | 169 | ||
170 | memset(&props, 0, sizeof(struct backlight_properties)); | 170 | memset(&props, 0, sizeof(struct backlight_properties)); |
171 | props.type = BACKLIGHT_RAW; | ||
171 | props.max_brightness = pdata->pwm_duty_max - pdata->pwm_duty_min; | 172 | props.max_brightness = pdata->pwm_duty_max - pdata->pwm_duty_min; |
172 | bldev = backlight_device_register("atmel-pwm-bl", &pdev->dev, pwmbl, | 173 | bldev = backlight_device_register("atmel-pwm-bl", &pdev->dev, pwmbl, |
173 | &atmel_pwm_bl_ops, &props); | 174 | &atmel_pwm_bl_ops, &props); |
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 08703299ef61..80d292fb92d8 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c | |||
@@ -19,6 +19,12 @@ | |||
19 | #include <asm/backlight.h> | 19 | #include <asm/backlight.h> |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | static const char const *backlight_types[] = { | ||
23 | [BACKLIGHT_RAW] = "raw", | ||
24 | [BACKLIGHT_PLATFORM] = "platform", | ||
25 | [BACKLIGHT_FIRMWARE] = "firmware", | ||
26 | }; | ||
27 | |||
22 | #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ | 28 | #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ |
23 | defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)) | 29 | defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)) |
24 | /* This callback gets called when something important happens inside a | 30 | /* This callback gets called when something important happens inside a |
@@ -169,6 +175,14 @@ static ssize_t backlight_store_brightness(struct device *dev, | |||
169 | return rc; | 175 | return rc; |
170 | } | 176 | } |
171 | 177 | ||
178 | static ssize_t backlight_show_type(struct device *dev, | ||
179 | struct device_attribute *attr, char *buf) | ||
180 | { | ||
181 | struct backlight_device *bd = to_backlight_device(dev); | ||
182 | |||
183 | return sprintf(buf, "%s\n", backlight_types[bd->props.type]); | ||
184 | } | ||
185 | |||
172 | static ssize_t backlight_show_max_brightness(struct device *dev, | 186 | static ssize_t backlight_show_max_brightness(struct device *dev, |
173 | struct device_attribute *attr, char *buf) | 187 | struct device_attribute *attr, char *buf) |
174 | { | 188 | { |
@@ -234,6 +248,7 @@ static struct device_attribute bl_device_attributes[] = { | |||
234 | __ATTR(actual_brightness, 0444, backlight_show_actual_brightness, | 248 | __ATTR(actual_brightness, 0444, backlight_show_actual_brightness, |
235 | NULL), | 249 | NULL), |
236 | __ATTR(max_brightness, 0444, backlight_show_max_brightness, NULL), | 250 | __ATTR(max_brightness, 0444, backlight_show_max_brightness, NULL), |
251 | __ATTR(type, 0444, backlight_show_type, NULL), | ||
237 | __ATTR_NULL, | 252 | __ATTR_NULL, |
238 | }; | 253 | }; |
239 | 254 | ||
@@ -292,9 +307,16 @@ struct backlight_device *backlight_device_register(const char *name, | |||
292 | dev_set_drvdata(&new_bd->dev, devdata); | 307 | dev_set_drvdata(&new_bd->dev, devdata); |
293 | 308 | ||
294 | /* Set default properties */ | 309 | /* Set default properties */ |
295 | if (props) | 310 | if (props) { |
296 | memcpy(&new_bd->props, props, | 311 | memcpy(&new_bd->props, props, |
297 | sizeof(struct backlight_properties)); | 312 | sizeof(struct backlight_properties)); |
313 | if (props->type <= 0 || props->type >= BACKLIGHT_TYPE_MAX) { | ||
314 | WARN(1, "%s: invalid backlight type", name); | ||
315 | new_bd->props.type = BACKLIGHT_RAW; | ||
316 | } | ||
317 | } else { | ||
318 | new_bd->props.type = BACKLIGHT_RAW; | ||
319 | } | ||
298 | 320 | ||
299 | rc = device_register(&new_bd->dev); | 321 | rc = device_register(&new_bd->dev); |
300 | if (rc) { | 322 | if (rc) { |
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 1e71c35083bb..af6098396fe6 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c | |||
@@ -562,6 +562,7 @@ static int __devinit corgi_lcd_probe(struct spi_device *spi) | |||
562 | lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA; | 562 | lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA; |
563 | 563 | ||
564 | memset(&props, 0, sizeof(struct backlight_properties)); | 564 | memset(&props, 0, sizeof(struct backlight_properties)); |
565 | props.type = BACKLIGHT_RAW; | ||
565 | props.max_brightness = pdata->max_intensity; | 566 | props.max_brightness = pdata->max_intensity; |
566 | lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev, lcd, | 567 | lcd->bl_dev = backlight_device_register("corgi_bl", &spi->dev, lcd, |
567 | &corgi_bl_ops, &props); | 568 | &corgi_bl_ops, &props); |
diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c index 397d15eb1ea8..6c8c54041fae 100644 --- a/drivers/video/backlight/cr_bllcd.c +++ b/drivers/video/backlight/cr_bllcd.c | |||
@@ -193,6 +193,7 @@ static int cr_backlight_probe(struct platform_device *pdev) | |||
193 | } | 193 | } |
194 | 194 | ||
195 | memset(&props, 0, sizeof(struct backlight_properties)); | 195 | memset(&props, 0, sizeof(struct backlight_properties)); |
196 | props.type = BACKLIGHT_RAW; | ||
196 | bdp = backlight_device_register("cr-backlight", &pdev->dev, NULL, | 197 | bdp = backlight_device_register("cr-backlight", &pdev->dev, NULL, |
197 | &cr_backlight_ops, &props); | 198 | &cr_backlight_ops, &props); |
198 | if (IS_ERR(bdp)) { | 199 | if (IS_ERR(bdp)) { |
diff --git a/drivers/video/backlight/da903x_bl.c b/drivers/video/backlight/da903x_bl.c index 87659ed79bd7..62043f12a5a4 100644 --- a/drivers/video/backlight/da903x_bl.c +++ b/drivers/video/backlight/da903x_bl.c | |||
@@ -136,6 +136,7 @@ static int da903x_backlight_probe(struct platform_device *pdev) | |||
136 | da903x_write(data->da903x_dev, DA9034_WLED_CONTROL2, | 136 | da903x_write(data->da903x_dev, DA9034_WLED_CONTROL2, |
137 | DA9034_WLED_ISET(pdata->output_current)); | 137 | DA9034_WLED_ISET(pdata->output_current)); |
138 | 138 | ||
139 | props.type = BACKLIGHT_RAW; | ||
139 | props.max_brightness = max_brightness; | 140 | props.max_brightness = max_brightness; |
140 | bl = backlight_device_register(pdev->name, data->da903x_dev, data, | 141 | bl = backlight_device_register(pdev->name, data->da903x_dev, data, |
141 | &da903x_backlight_ops, &props); | 142 | &da903x_backlight_ops, &props); |
diff --git a/drivers/video/backlight/ep93xx_bl.c b/drivers/video/backlight/ep93xx_bl.c index b0cc49184803..9f1e389d51d2 100644 --- a/drivers/video/backlight/ep93xx_bl.c +++ b/drivers/video/backlight/ep93xx_bl.c | |||
@@ -87,6 +87,7 @@ static int __init ep93xxbl_probe(struct platform_device *dev) | |||
87 | ep93xxbl->mmio = EP93XX_RASTER_BRIGHTNESS; | 87 | ep93xxbl->mmio = EP93XX_RASTER_BRIGHTNESS; |
88 | 88 | ||
89 | memset(&props, 0, sizeof(struct backlight_properties)); | 89 | memset(&props, 0, sizeof(struct backlight_properties)); |
90 | props.type = BACKLIGHT_RAW; | ||
90 | props.max_brightness = EP93XX_MAX_BRIGHT; | 91 | props.max_brightness = EP93XX_MAX_BRIGHT; |
91 | bl = backlight_device_register(dev->name, &dev->dev, ep93xxbl, | 92 | bl = backlight_device_register(dev->name, &dev->dev, ep93xxbl, |
92 | &ep93xxbl_ops, &props); | 93 | &ep93xxbl_ops, &props); |
diff --git a/drivers/video/backlight/generic_bl.c b/drivers/video/backlight/generic_bl.c index 312ca619735d..8c6befd65a33 100644 --- a/drivers/video/backlight/generic_bl.c +++ b/drivers/video/backlight/generic_bl.c | |||
@@ -91,6 +91,7 @@ static int genericbl_probe(struct platform_device *pdev) | |||
91 | name = machinfo->name; | 91 | name = machinfo->name; |
92 | 92 | ||
93 | memset(&props, 0, sizeof(struct backlight_properties)); | 93 | memset(&props, 0, sizeof(struct backlight_properties)); |
94 | props.type = BACKLIGHT_RAW; | ||
94 | props.max_brightness = machinfo->max_intensity; | 95 | props.max_brightness = machinfo->max_intensity; |
95 | bd = backlight_device_register(name, &pdev->dev, NULL, &genericbl_ops, | 96 | bd = backlight_device_register(name, &pdev->dev, NULL, &genericbl_ops, |
96 | &props); | 97 | &props); |
diff --git a/drivers/video/backlight/hp680_bl.c b/drivers/video/backlight/hp680_bl.c index 267d23f8d645..38aa00272141 100644 --- a/drivers/video/backlight/hp680_bl.c +++ b/drivers/video/backlight/hp680_bl.c | |||
@@ -109,6 +109,7 @@ static int __devinit hp680bl_probe(struct platform_device *pdev) | |||
109 | struct backlight_device *bd; | 109 | struct backlight_device *bd; |
110 | 110 | ||
111 | memset(&props, 0, sizeof(struct backlight_properties)); | 111 | memset(&props, 0, sizeof(struct backlight_properties)); |
112 | props.type = BACKLIGHT_RAW; | ||
112 | props.max_brightness = HP680_MAX_INTENSITY; | 113 | props.max_brightness = HP680_MAX_INTENSITY; |
113 | bd = backlight_device_register("hp680-bl", &pdev->dev, NULL, | 114 | bd = backlight_device_register("hp680-bl", &pdev->dev, NULL, |
114 | &hp680bl_ops, &props); | 115 | &hp680bl_ops, &props); |
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c index 2f177b3a4885..40e4fa8fcf92 100644 --- a/drivers/video/backlight/jornada720_bl.c +++ b/drivers/video/backlight/jornada720_bl.c | |||
@@ -106,6 +106,7 @@ static int jornada_bl_probe(struct platform_device *pdev) | |||
106 | struct backlight_device *bd; | 106 | struct backlight_device *bd; |
107 | 107 | ||
108 | memset(&props, 0, sizeof(struct backlight_properties)); | 108 | memset(&props, 0, sizeof(struct backlight_properties)); |
109 | props.type = BACKLIGHT_RAW; | ||
109 | props.max_brightness = BL_MAX_BRIGHT; | 110 | props.max_brightness = BL_MAX_BRIGHT; |
110 | bd = backlight_device_register(S1D_DEVICENAME, &pdev->dev, NULL, | 111 | bd = backlight_device_register(S1D_DEVICENAME, &pdev->dev, NULL, |
111 | &jornada_bl_ops, &props); | 112 | &jornada_bl_ops, &props); |
diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c index f439a8632287..72dd5556a35b 100644 --- a/drivers/video/backlight/kb3886_bl.c +++ b/drivers/video/backlight/kb3886_bl.c | |||
@@ -149,6 +149,7 @@ static int kb3886bl_probe(struct platform_device *pdev) | |||
149 | machinfo->limit_mask = -1; | 149 | machinfo->limit_mask = -1; |
150 | 150 | ||
151 | memset(&props, 0, sizeof(struct backlight_properties)); | 151 | memset(&props, 0, sizeof(struct backlight_properties)); |
152 | props.type = BACKLIGHT_RAW; | ||
152 | props.max_brightness = machinfo->max_intensity; | 153 | props.max_brightness = machinfo->max_intensity; |
153 | kb3886_backlight_device = backlight_device_register("kb3886-bl", | 154 | kb3886_backlight_device = backlight_device_register("kb3886-bl", |
154 | &pdev->dev, NULL, | 155 | &pdev->dev, NULL, |
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c index d2f59015d517..bbca3127071e 100644 --- a/drivers/video/backlight/locomolcd.c +++ b/drivers/video/backlight/locomolcd.c | |||
@@ -184,6 +184,7 @@ static int locomolcd_probe(struct locomo_dev *ldev) | |||
184 | local_irq_restore(flags); | 184 | local_irq_restore(flags); |
185 | 185 | ||
186 | memset(&props, 0, sizeof(struct backlight_properties)); | 186 | memset(&props, 0, sizeof(struct backlight_properties)); |
187 | props.type = BACKLIGHT_RAW; | ||
187 | props.max_brightness = 4; | 188 | props.max_brightness = 4; |
188 | locomolcd_bl_device = backlight_device_register("locomo-bl", | 189 | locomolcd_bl_device = backlight_device_register("locomo-bl", |
189 | &ldev->dev, NULL, | 190 | &ldev->dev, NULL, |
diff --git a/drivers/video/backlight/max8925_bl.c b/drivers/video/backlight/max8925_bl.c index 209acc105cbc..07e8e273ced0 100644 --- a/drivers/video/backlight/max8925_bl.c +++ b/drivers/video/backlight/max8925_bl.c | |||
@@ -136,6 +136,7 @@ static int __devinit max8925_backlight_probe(struct platform_device *pdev) | |||
136 | data->current_brightness = 0; | 136 | data->current_brightness = 0; |
137 | 137 | ||
138 | memset(&props, 0, sizeof(struct backlight_properties)); | 138 | memset(&props, 0, sizeof(struct backlight_properties)); |
139 | props.type = BACKLIGHT_RAW; | ||
139 | props.max_brightness = MAX_BRIGHTNESS; | 140 | props.max_brightness = MAX_BRIGHTNESS; |
140 | bl = backlight_device_register(name, &pdev->dev, data, | 141 | bl = backlight_device_register(name, &pdev->dev, data, |
141 | &max8925_backlight_ops, &props); | 142 | &max8925_backlight_ops, &props); |
diff --git a/drivers/video/backlight/mbp_nvidia_bl.c b/drivers/video/backlight/mbp_nvidia_bl.c index 1485f7345f49..74c33944aa86 100644 --- a/drivers/video/backlight/mbp_nvidia_bl.c +++ b/drivers/video/backlight/mbp_nvidia_bl.c | |||
@@ -367,6 +367,7 @@ static int __init mbp_init(void) | |||
367 | return -ENXIO; | 367 | return -ENXIO; |
368 | 368 | ||
369 | memset(&props, 0, sizeof(struct backlight_properties)); | 369 | memset(&props, 0, sizeof(struct backlight_properties)); |
370 | props.type = BACKLIGHT_PLATFORM; | ||
370 | props.max_brightness = 15; | 371 | props.max_brightness = 15; |
371 | mbp_backlight_device = backlight_device_register("mbp_backlight", NULL, | 372 | mbp_backlight_device = backlight_device_register("mbp_backlight", NULL, |
372 | NULL, | 373 | NULL, |
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c index d3bc56296c8d..08d26a72394c 100644 --- a/drivers/video/backlight/omap1_bl.c +++ b/drivers/video/backlight/omap1_bl.c | |||
@@ -146,6 +146,7 @@ static int omapbl_probe(struct platform_device *pdev) | |||
146 | return -ENOMEM; | 146 | return -ENOMEM; |
147 | 147 | ||
148 | memset(&props, 0, sizeof(struct backlight_properties)); | 148 | memset(&props, 0, sizeof(struct backlight_properties)); |
149 | props.type = BACKLIGHT_RAW; | ||
149 | props.max_brightness = OMAPBL_MAX_INTENSITY; | 150 | props.max_brightness = OMAPBL_MAX_INTENSITY; |
150 | dev = backlight_device_register("omap-bl", &pdev->dev, bl, &omapbl_ops, | 151 | dev = backlight_device_register("omap-bl", &pdev->dev, bl, &omapbl_ops, |
151 | &props); | 152 | &props); |
diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c index 3c424f7efdcc..ef5628d60563 100644 --- a/drivers/video/backlight/pcf50633-backlight.c +++ b/drivers/video/backlight/pcf50633-backlight.c | |||
@@ -112,6 +112,7 @@ static int __devinit pcf50633_bl_probe(struct platform_device *pdev) | |||
112 | if (!pcf_bl) | 112 | if (!pcf_bl) |
113 | return -ENOMEM; | 113 | return -ENOMEM; |
114 | 114 | ||
115 | bl_props.type = BACKLIGHT_RAW; | ||
115 | bl_props.max_brightness = 0x3f; | 116 | bl_props.max_brightness = 0x3f; |
116 | bl_props.power = FB_BLANK_UNBLANK; | 117 | bl_props.power = FB_BLANK_UNBLANK; |
117 | 118 | ||
diff --git a/drivers/video/backlight/progear_bl.c b/drivers/video/backlight/progear_bl.c index 809278c90738..6af183d6465e 100644 --- a/drivers/video/backlight/progear_bl.c +++ b/drivers/video/backlight/progear_bl.c | |||
@@ -84,6 +84,7 @@ static int progearbl_probe(struct platform_device *pdev) | |||
84 | pci_write_config_byte(sb_dev, SB_MPS1, temp | 0x20); | 84 | pci_write_config_byte(sb_dev, SB_MPS1, temp | 0x20); |
85 | 85 | ||
86 | memset(&props, 0, sizeof(struct backlight_properties)); | 86 | memset(&props, 0, sizeof(struct backlight_properties)); |
87 | props.type = BACKLIGHT_RAW; | ||
87 | props.max_brightness = HW_LEVEL_MAX - HW_LEVEL_MIN; | 88 | props.max_brightness = HW_LEVEL_MAX - HW_LEVEL_MIN; |
88 | progear_backlight_device = backlight_device_register("progear-bl", | 89 | progear_backlight_device = backlight_device_register("progear-bl", |
89 | &pdev->dev, NULL, | 90 | &pdev->dev, NULL, |
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 21866ec69656..2c2a2c703c14 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -108,6 +108,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) | |||
108 | dev_dbg(&pdev->dev, "got pwm for backlight\n"); | 108 | dev_dbg(&pdev->dev, "got pwm for backlight\n"); |
109 | 109 | ||
110 | memset(&props, 0, sizeof(struct backlight_properties)); | 110 | memset(&props, 0, sizeof(struct backlight_properties)); |
111 | props.type = BACKLIGHT_RAW; | ||
111 | props.max_brightness = data->max_brightness; | 112 | props.max_brightness = data->max_brightness; |
112 | bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, pb, | 113 | bl = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, pb, |
113 | &pwm_backlight_ops, &props); | 114 | &pwm_backlight_ops, &props); |
diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index 5927db0da999..322040f686c2 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c | |||
@@ -778,6 +778,7 @@ static int __devinit s6e63m0_probe(struct spi_device *spi) | |||
778 | 778 | ||
779 | bd->props.max_brightness = MAX_BRIGHTNESS; | 779 | bd->props.max_brightness = MAX_BRIGHTNESS; |
780 | bd->props.brightness = MAX_BRIGHTNESS; | 780 | bd->props.brightness = MAX_BRIGHTNESS; |
781 | bd->props.type = BACKLIGHT_RAW; | ||
781 | lcd->bd = bd; | 782 | lcd->bd = bd; |
782 | 783 | ||
783 | /* | 784 | /* |
diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c index 2a04b382ec48..425a7365470b 100644 --- a/drivers/video/backlight/tosa_bl.c +++ b/drivers/video/backlight/tosa_bl.c | |||
@@ -102,6 +102,7 @@ static int __devinit tosa_bl_probe(struct i2c_client *client, | |||
102 | data->i2c = client; | 102 | data->i2c = client; |
103 | 103 | ||
104 | memset(&props, 0, sizeof(struct backlight_properties)); | 104 | memset(&props, 0, sizeof(struct backlight_properties)); |
105 | props.type = BACKLIGHT_RAW; | ||
105 | props.max_brightness = 512 - 1; | 106 | props.max_brightness = 512 - 1; |
106 | data->bl = backlight_device_register("tosa-bl", &client->dev, data, | 107 | data->bl = backlight_device_register("tosa-bl", &client->dev, data, |
107 | &bl_ops, &props); | 108 | &bl_ops, &props); |
diff --git a/drivers/video/backlight/wm831x_bl.c b/drivers/video/backlight/wm831x_bl.c index 08fd87f3aecc..d4c6eb248ff9 100644 --- a/drivers/video/backlight/wm831x_bl.c +++ b/drivers/video/backlight/wm831x_bl.c | |||
@@ -193,6 +193,7 @@ static int wm831x_backlight_probe(struct platform_device *pdev) | |||
193 | data->current_brightness = 0; | 193 | data->current_brightness = 0; |
194 | data->isink_reg = isink_reg; | 194 | data->isink_reg = isink_reg; |
195 | 195 | ||
196 | props.type = BACKLIGHT_RAW; | ||
196 | props.max_brightness = max_isel; | 197 | props.max_brightness = max_isel; |
197 | bl = backlight_device_register("wm831x", &pdev->dev, data, | 198 | bl = backlight_device_register("wm831x", &pdev->dev, data, |
198 | &wm831x_backlight_ops, &props); | 199 | &wm831x_backlight_ops, &props); |