diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2024-09-06 09:52:40 +0200 | 
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2024-09-30 16:49:42 +0100 | 
| commit | 43e1120deb3768c86aa3875c7073658e44a30ea5 (patch) | |
| tree | 373c25da27885f678e3a76a1b65a2d52fd039a38 /include/linux/lcd.h | |
| parent | 05deb1ce96cda46a1ddc82f82a4645ef14cbe680 (diff) | |
backlight: lcd: Replace check_fb with controls_device
Rename check_fb in struct lcd_ops to controls_device. The callback
is now independent from fbdev's struct fb_info and tests if an lcd
device controls a hardware display device. The new naming and semantics
follow similar functionality for backlight devices.
v2:
- fix typos in commit description (Daniel)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240906075439.98476-27-tzimmermann@suse.de
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'include/linux/lcd.h')
| -rw-r--r-- | include/linux/lcd.h | 16 | 
1 files changed, 12 insertions, 4 deletions
| diff --git a/include/linux/lcd.h b/include/linux/lcd.h index dfcc54d327f5..8399b5ed48f2 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -35,7 +35,6 @@   */  struct lcd_device; -struct fb_info;  struct lcd_properties {  	/* The maximum value for contrast (read-only) */ @@ -54,9 +53,18 @@ struct lcd_ops {          int (*set_contrast)(struct lcd_device *, int contrast);  	/* Set LCD panel mode (resolutions ...) */  	int (*set_mode)(struct lcd_device *, struct fb_videomode *); -	/* Check if given framebuffer device is the one LCD is bound to; -	   return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */ -	int (*check_fb)(struct lcd_device *, struct fb_info *); + +	/* +	 * Check if the LCD controls the given display device. This +	 * operation is optional and if not implemented it is assumed that +	 * the display is always the one controlled by the LCD. +	 * +	 * RETURNS: +	 * +	 * If display_dev is NULL or display_dev matches the device controlled by +	 * the LCD, return true. Otherwise return false. +	 */ +	bool (*controls_device)(struct lcd_device *lcd, struct device *display_device);  };  struct lcd_device { | 
