aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/backlight.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r--include/linux/backlight.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 5ffc6dd..237e090 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -55,10 +55,12 @@ struct backlight_ops {
/* Check if given framebuffer device is the one bound to this backlight;
return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */
int (*check_fb)(struct backlight_device *, struct fb_info *);
+ int (*set_dimming)(struct backlight_device *);
};
/* This structure defines all the properties of a backlight */
struct backlight_properties {
+ bool dimming;
/* Current User requested brightness (0 - max_brightness) */
int brightness;
/* Maximal value for brightness (read-only) */
@@ -111,12 +113,20 @@ static inline void backlight_update_status(struct backlight_device *bd)
mutex_unlock(&bd->update_lock);
}
+static inline void backlight_set_dimming(struct backlight_device *bd)
+{
+ if (bd->ops && bd->ops->set_dimming)
+ bd->ops->set_dimming(bd);
+}
+
extern struct backlight_device *backlight_device_register(const char *name,
struct device *dev, void *devdata, const struct backlight_ops *ops,
const struct backlight_properties *props);
extern void backlight_device_unregister(struct backlight_device *bd);
extern void backlight_force_update(struct backlight_device *bd,
enum backlight_update_reason reason);
+extern int backlight_dimming_mode_register_client(struct notifier_block *nb);
+extern int backlight_dimming_mode_unregister_client(struct notifier_block *nb);
#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)