diff options
author | Aaron Lu <aaron.lu@intel.com> | 2013-10-11 21:27:43 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-16 01:16:04 +0200 |
commit | 5915a3db0c3983f1cd5e046bf70086c7d0c686d2 (patch) | |
tree | d3f56cdf916f71ac50789abf511ee16b6bc55fe6 /include/linux/backlight.h | |
parent | 068aab7766cf968a8ddb86a6d7c6bbed9d61e353 (diff) | |
download | lwn-5915a3db0c3983f1cd5e046bf70086c7d0c686d2.tar.gz lwn-5915a3db0c3983f1cd5e046bf70086c7d0c686d2.zip |
backlight: introduce backlight_device_registered
Introduce a new API for modules to query if a specific type of backlight
device has been registered. This is useful for some backlight device
provider module (e.g. ACPI video) to know if a native control
interface(e.g. the interface created by i915) is available and then do
things accordingly (e.g. avoid registering its own on Win8 systems).
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/backlight.h')
-rw-r--r-- | include/linux/backlight.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 53b77949c79d..5f9cd963213d 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -100,6 +100,9 @@ struct backlight_device { /* The framebuffer notifier block */ struct notifier_block fb_notif; + /* list entry of all registered backlight devices */ + struct list_head entry; + struct device dev; }; @@ -123,6 +126,7 @@ extern void devm_backlight_device_unregister(struct device *dev, struct backlight_device *bd); extern void backlight_force_update(struct backlight_device *bd, enum backlight_update_reason reason); +extern bool backlight_device_registered(enum backlight_type type); #define to_backlight_device(obj) container_of(obj, struct backlight_device, dev) |