diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-17 17:48:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-17 17:48:40 -0700 |
commit | e0d97b04eceb637a476a2d0233bc7721611a9cb2 (patch) | |
tree | 8ba1e373e0cae434e9a95c32bc89a65fb35348aa /include/linux | |
parent | 1200af3ac16489d9f0b86000362a044ed7521cf6 (diff) | |
parent | 1df5aa3754cac2045998ca505edb84d994786c67 (diff) |
Merge tag 'backlight-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones:
"New Drivers:
- Texas Instruments LM3509 Backlight Driver
Fix-ups:
- Device Tree binding adaptions/conversions/creation
- Drop i2c_device_id::driver_data where the value is unused
- Make use of the new *_scoped() guard APIs
- Decouple from fbdev by providing Backlight with its own
BACKLIGHT_POWER_* constrains
Bug Fixes:
- Correctly assess return values (NULL vs IS_ERR())
- Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings"
* tag 'backlight-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (23 commits)
backlight: sky81452-backlight: Use backlight power constants
backlight: rave-sp-backlight: Use backlight power constants
backlight: pwm-backlight: Use backlight power constants
backlight: pcf50633-backlight: Use backlight power constants
backlight: pandora-backlight: Use backlight power constants
backlight: mp3309c: Use backlight power constants
backlight: lm3533-backlight: Use backlight power constants
backlight: led-backlight: Use backlight power constants
backlight: ktd253-backlight: Use backlight power constants
backlight: kb3886-bl: Use backlight power constants
backlight: journada_bl: Use backlight power constants
backlight: ipaq-micro-backlight: Use backlight power constants
backlight: gpio-backlight: Use backlight power constants
backlight: corgi-lcd: Use backlight power constants
backlight: ams369fb06: Use backlight power constants
backlight: aat2870-backlight: Use blacklight power constants
backlight: Add BACKLIGHT_POWER_ constants for power states
backlight: lm3509_bl: Fix early returns in for_each_child_of_node()
backlight: Drop explicit initialization of struct i2c_device_id::driver_data to 0
backlight: Add missing MODULE_DESCRIPTION() macros
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/backlight.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 19a1c0e22629..ea9c1bc8148e 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -209,15 +209,19 @@ struct backlight_properties { * attribute: /sys/class/backlight/<backlight>/bl_power * When the power property is updated update_status() is called. * - * The possible values are: (0: full on, 1 to 3: power saving - * modes; 4: full off), see FB_BLANK_XXX. + * The possible values are: (0: full on, 4: full off), see + * BACKLIGHT_POWER constants. * - * When the backlight device is enabled @power is set - * to FB_BLANK_UNBLANK. When the backlight device is disabled - * @power is set to FB_BLANK_POWERDOWN. + * When the backlight device is enabled, @power is set to + * BACKLIGHT_POWER_ON. When the backlight device is disabled, + * @power is set to BACKLIGHT_POWER_OFF. */ int power; +#define BACKLIGHT_POWER_ON (0) +#define BACKLIGHT_POWER_OFF (4) +#define BACKLIGHT_POWER_REDUCED (1) // deprecated; don't use in new code + /** * @type: The type of backlight supported. * @@ -346,7 +350,7 @@ static inline int backlight_enable(struct backlight_device *bd) if (!bd) return 0; - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; bd->props.state &= ~BL_CORE_FBBLANK; return backlight_update_status(bd); @@ -361,7 +365,7 @@ static inline int backlight_disable(struct backlight_device *bd) if (!bd) return 0; - bd->props.power = FB_BLANK_POWERDOWN; + bd->props.power = BACKLIGHT_POWER_OFF; bd->props.state |= BL_CORE_FBBLANK; return backlight_update_status(bd); @@ -380,7 +384,7 @@ static inline int backlight_disable(struct backlight_device *bd) */ static inline bool backlight_is_blank(const struct backlight_device *bd) { - return bd->props.power != FB_BLANK_UNBLANK || + return bd->props.power != BACKLIGHT_POWER_ON || bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK); } |