diff options
author | Andres Salomon <dilinger@queued.net> | 2011-02-10 17:56:27 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-18 12:33:21 -0800 |
commit | c59eef17f1cc21a984cf077ad45a8355781881b6 (patch) | |
tree | 00a5e88be8b6e221b3bd74ba3275e8f870ccc72c /drivers/staging/olpc_dcon/olpc_dcon.h | |
parent | 309ef2a25e8d3d5962bb0824c58ea39c12c166ef (diff) |
staging: olpc_dcon: clean up backlight handling
- Move bl_val and bl_dev into dcon_priv struct....
- The only time we ever read the backlight val from the dcon is
at probe time. Rather than calling dcon_get_backlight for that, just
read from the register.
- Drop dcon_get_backlight; it's just returning dcon->bl_val.
- Rename dcon_set_backlight_hw to dcon_set_backlight, and drop the
old dcon_set_backlight function. Move contents of old dcon_set_backlight
function into dconbl_set.
- Shuffle backlight_ops callbacks around to be closer to struct, and
rename them.
- Make use of new backlight_properties arg to backlight_device_register,
drop old code that set this manually.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/olpc_dcon/olpc_dcon.h')
-rw-r--r-- | drivers/staging/olpc_dcon/olpc_dcon.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.h b/drivers/staging/olpc_dcon/olpc_dcon.h index 62bed461d58..0264c94375a 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.h +++ b/drivers/staging/olpc_dcon/olpc_dcon.h @@ -50,6 +50,7 @@ struct dcon_priv { struct i2c_client *client; struct fb_info *fbinfo; + struct backlight_device *bl_dev; struct work_struct switch_source; struct notifier_block reboot_nb; @@ -58,6 +59,9 @@ struct dcon_priv { /* Shadow register for the DCON_REG_MODE register */ u8 disp_mode; + /* The current backlight value - this saves us some smbus traffic */ + u8 bl_val; + /* Current source, initialized at probe time */ int curr_src; |