Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308938
b: refs/heads/master
c: d54ad83
h: refs/heads/master
v: v3
  • Loading branch information
Inki Dae authored and Linus Torvalds committed May 29, 2012
1 parent b321c35 commit 9baf4bb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf05929f41d6c3c79ec1961d90d808a634f09dd9
refs/heads/master: d54ad83f3d56228a42e1021b97fc52bfbad7d560
10 changes: 10 additions & 0 deletions trunk/drivers/video/backlight/lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ static int fb_notifier_callback(struct notifier_block *self,
case FB_EVENT_BLANK:
case FB_EVENT_MODE_CHANGE:
case FB_EVENT_MODE_CHANGE_ALL:
case FB_EARLY_EVENT_BLANK:
case FB_R_EARLY_EVENT_BLANK:
break;
default:
return 0;
Expand All @@ -46,6 +48,14 @@ static int fb_notifier_callback(struct notifier_block *self,
if (event == FB_EVENT_BLANK) {
if (ld->ops->set_power)
ld->ops->set_power(ld, *(int *)evdata->data);
} else if (event == FB_EARLY_EVENT_BLANK) {
if (ld->ops->early_set_power)
ld->ops->early_set_power(ld,
*(int *)evdata->data);
} else if (event == FB_R_EARLY_EVENT_BLANK) {
if (ld->ops->r_early_set_power)
ld->ops->r_early_set_power(ld,
*(int *)evdata->data);
} else {
if (ld->ops->set_mode)
ld->ops->set_mode(ld, evdata->data);
Expand Down
10 changes: 10 additions & 0 deletions trunk/include/linux/lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ struct lcd_ops {
/* Get the LCD panel power status (0: full on, 1..3: controller
power on, flat panel power off, 4: full off), see FB_BLANK_XXX */
int (*get_power)(struct lcd_device *);
/*
* Enable or disable power to the LCD(0: on; 4: off, see FB_BLANK_XXX)
* and this callback would be called proir to fb driver's callback.
*
* P.S. note that if early_set_power is not NULL then early fb notifier
* would be registered.
*/
int (*early_set_power)(struct lcd_device *, int power);
/* revert the effects of the early blank event. */
int (*r_early_set_power)(struct lcd_device *, int power);
/* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */
int (*set_power)(struct lcd_device *, int power);
/* Get the current contrast setting (0-max_contrast) */
Expand Down

0 comments on commit 9baf4bb

Please sign in to comment.