summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight (follow)
Commit message (Collapse)AuthorAgeFilesLines
* module: Convert symbol namespace to string literalPeter Zijlstra2024-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the existing export namespace code along the same lines of commit 33def8498fdd ("treewide: Convert macro and uses of __section(foo) to __section("foo")") and for the same reason, it is not desired for the namespace argument to be a macro expansion itself. Scripted using git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file; do awk -i inplace ' /^#define EXPORT_SYMBOL_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /^#define MODULE_IMPORT_NS/ { gsub(/__stringify\(ns\)/, "ns"); print; next; } /MODULE_IMPORT_NS/ { $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g"); } /EXPORT_SYMBOL_NS/ { if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) { if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ && $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ && $0 !~ /^my/) { getline line; gsub(/[[:space:]]*\\$/, ""); gsub(/[[:space:]]/, "", line); $0 = $0 " " line; } $0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/, "\\1(\\2, \"\\3\")", "g"); } } { print }' $file; done Requested-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc Acked-by: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Get rid of 'remove_new' relic from platform driver structLinus Torvalds2024-12-0212-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | The continual trickle of small conversion patches is grating on me, and is really not helping. Just get rid of the 'remove_new' member function, which is just an alias for the plain 'remove', and had a comment to that effect: /* * .remove_new() is a relic from a prototype conversion of .remove(). * New drivers are supposed to implement .remove(). Once all drivers are * converted to not use .remove_new any more, it will be dropped. */ This was just a tree-wide 'sed' script that replaced '.remove_new' with '.remove', with some care taken to turn a subsequent tab into two tabs to make things line up. I did do some minimal manual whitespace adjustment for places that used spaces to line things up. Then I just removed the old (sic) .remove_new member function, and this is the end result. No more unnecessary conversion noise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* backlight: Remove notifierDr. David Alan Gilbert2024-10-091-42/+0
| | | | | | | | | | | | | | | | | | backlight_register_notifier and backlight_unregister_notifier have been unused since commit 6cb634d0dc85 ("ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers") With those not being called, it means that the backlight_notifier list is always empty. Remove the functions, the list itself and the enum used in the notifications. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch> Link: https://lore.kernel.org/r/20240919232758.639925-1-linux@treblig.org Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ktz8866: Fix module autoloadingLiao Chen2024-10-021-0/+1
| | | | | | | | | | | Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded based on the alias from of_device_id table. Signed-off-by: Liao Chen <liaochen4@huawei.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Reviewed-by: Jianhua Lu <lujianhua000@gmail.com> Link: https://lore.kernel.org/r/20240820121628.42321-1-liaochen4@huawei.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: 88pm860x_bl: Simplify with scoped for each OF child loopJinjie Ruan2024-10-021-3/+2
| | | | | | | | | | Use scoped for_each_child_of_node_scoped() when iterating over device nodes to make code a bit simpler. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240822062546.3490076-1-ruanjinjie@huawei.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lcd: Remove struct fb_videomode from set_mode callbackThomas Zimmermann2024-09-303-7/+7
| | | | | | | | | | | Implementations of struct lcd_ops.set_mode only require the resolution from struct fb_videomode. Pass the xres and yres fields, but remove the dependency on the fbdev data structure. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-28-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lcd: Replace check_fb with controls_deviceThomas Zimmermann2024-09-302-7/+6
| | | | | | | | | | | | | | | 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>
* backlight: tdo24m: Use lcd power constantsThomas Zimmermann2024-09-301-7/+7
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-20-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: platform_lcd: Use lcd power constantsThomas Zimmermann2024-09-301-2/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-19-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: platform_lcd: Remove match_fb from struct plat_lcd_dataThomas Zimmermann2024-09-301-4/+0
| | | | | | | | | The match_fb callback in struct plat_lcd_data is unused. Remove it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-18-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: platform_lcd: Remove include statement for <linux/backlight.h>Thomas Zimmermann2024-09-301-1/+0
| | | | | | | | | | This lcd driver does not depend on backlight interfaces. Remove the include statement. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-17-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: otm3225a: Use lcd power constantsThomas Zimmermann2024-09-301-1/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-16-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ltv350qv: Use lcd power constantsThomas Zimmermann2024-09-301-8/+7
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-15-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lms501kf03: Use lcd power constantsThomas Zimmermann2024-09-301-12/+11
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-14-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lms501kf03: Remove unnecessary include of <linux/backlight.h>Thomas Zimmermann2024-09-301-1/+0
| | | | | | | | | This lcd driver is independent from the backlight code. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-13-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lms283gf05: Use lcd power constantsThomas Zimmermann2024-09-301-1/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-12-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: l4f00242t03: Use lcd power constantsThomas Zimmermann2024-09-301-16/+16
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-11-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: jornada720_lcd: Use lcd power constantsThomas Zimmermann2024-09-301-5/+4
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-10-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: jornada720_lcd: Include <linux/io.h> for IOMEM() macroThomas Zimmermann2024-09-301-0/+1
| | | | | | | | | Avoids the proxy include via <linux/fb.h>. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-9-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ili9320: Use lcd power constantsThomas Zimmermann2024-09-301-8/+7
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-8-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ili922x: Use lcd power constantsThomas Zimmermann2024-09-301-4/+3
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-7-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: hx8357: Use lcd power constantsThomas Zimmermann2024-09-301-1/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-6-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: corgi_lcd: Use lcd power constantsThomas Zimmermann2024-09-301-6/+6
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-5-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lcd: Add LCD_POWER_ constants for power statesThomas Zimmermann2024-09-301-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplicate FB_BLANK_ constants as LCD_POWER_ constants in the lcd header file. Allows lcd drivers to avoid including the fbdev header file and removes a compile-time dependency between the two subsystems. The new LCD_POWER_ constants have the same values as their FB_BLANK_ counterparts. Hence semantics does not change and the lcd drivers can be converted one by one. Each instance of FB_BLANK_UNBLANK becomes LCD_POWER_ON, each of FB_BLANK_POWERDOWN becomes LCD_POWER_OFF, FB_BLANK_NORMAL becomes LCD_POWER_REDUCED and FB_BLANK_VSYNC_SUSPEND becomes LCD_POWER_REDUCED_VSYNC_SUSPEND. Lcd code or drivers do not use FB_BLANK_HSYNC_SUSPEND, so no new constants for this is being added. The tokens LCD_POWER_REDUCED and LCD_POWER_REDUCED_VSYNC_SUSPEND are deprecated and drivers should replace them with LCD_POWER_ON and LCD_POWER_OFF. See also commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for power states"), which added similar constants for backlight drivers. v2: - fix typo in commit description Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-4-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lcd: Test against struct fb_info.lcd_devThomas Zimmermann2024-09-301-0/+3
| | | | | | | | | | | | | | | | Add struct fb_info.lcd_dev for fbdev drivers to store a reference to their lcd device. Update the lcd's fb_notifier_callback() to test for this field. The lcd module can now detect if an lcd device belongs to an fbdev device. This works similar to the bl_dev for backlights and will allow for the removal of the check_fb callback from several fbdev driver's lcd devices. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240906075439.98476-3-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lcd: Rearrange code in fb_notifier_callback()Thomas Zimmermann2024-09-301-12/+13
| | | | | | | | | | | | | | | First acquire the ops_lock and do all tests while holding it. Rearranges the code in lcd's fb_notifier_callback() to resemble the callback in the backlight module. This will simplify later changes to these tests. v2: - avoid gotos by using guard(mutex) (Daniel) - 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-2-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: l4f00242t03: Add check for spi_setupChen Ni2024-08-011-1/+4
| | | | | | | | | | Add check for the return value of spi_setup() and return the error if it fails in order to catch the error. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240705092800.3221159-1-nichen@iscas.ac.cn Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: sky81452-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-1/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-18-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: rave-sp-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-1/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-17-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: pwm-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-2/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-16-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: pcf50633-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-3/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-15-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: pandora-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-2/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-14-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: mp3309c: Use backlight power constantsThomas Zimmermann2024-07-041-2/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-13-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lm3533-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-2/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-12-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: led-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-2/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-11-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ktd253-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-3/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-10-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: kb3886-bl: Use backlight power constantsThomas Zimmermann2024-07-041-2/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-9-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: journada_bl: Use backlight power constantsThomas Zimmermann2024-07-041-2/+1
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-8-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ipaq-micro-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-2/+1
| | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-7-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: gpio-backlight: Use backlight power constantsThomas Zimmermann2024-07-041-5/+4
| | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-6-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: corgi-lcd: Use backlight power constantsThomas Zimmermann2024-07-041-2/+2
| | | | | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Only change the driver's backlight device, but leave the LCD device as-is. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-5-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: ams369fb06: Use backlight power constantsThomas Zimmermann2024-07-041-12/+11
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-4-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: aat2870-backlight: Use blacklight power constantsThomas Zimmermann2024-07-041-2/+2
| | | | | | | | | | | Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240624152033.25016-3-tzimmermann@suse.de Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lm3509_bl: Fix early returns in for_each_child_of_node()Javier Carrasco2024-06-261-2/+1
| | | | | | | | | | | | | | | | | The for_each_child_of_node() macro automatically decrements the child refcount at the end of every iteration. On early exits, of_node_put() must be used to manually decrement the refcount and avoid memory leaks. The scoped version of the macro accounts for such early breaks, fixing the early exits without the need for explicit calls to of_node_put(). Reported-by: kernel test robot <lkp@intel.com> Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202406172314.2vVgelaS-lkp@intel.com/ Fixes: b72755f5b577 ("backlight: Add new lm3509 backlight driver") Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240624-lm3509_bl_scoped-v1-1-ceba9df38f23@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: Drop explicit initialization of struct i2c_device_id::driver_data ↵Uwe Kleine-König2024-06-208-9/+12
| | | | | | | | | | | | | | | | | to 0 These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. While add it, also remove commas after the sentinel entries. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20240619193558.2543645-2-u.kleine-koenig@baylibre.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: Add missing MODULE_DESCRIPTION() macrosJeff Johnson2024-06-132-0/+2
| | | | | | | | | | | | | With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/backlight/platform_lcd.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/video/backlight/rt4831-backlight.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240612-md-drivers-video-backlight-v1-1-f4ca1beb36cc@quicinc.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: lm3509_bl: Fix NULL vs IS_ERR() check in register() functionDan Carpenter2024-06-131-2/+3
| | | | | | | | | | | The devm_backlight_device_register() doesn't return NULL, it returns error pointers. Update the error checking to match. Fixes: b72755f5b577 ("backlight: Add new lm3509 backlight driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/187b5bc5-a010-46c2-8ead-980df9efae79@moroto.mountain Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: Add new lm3509 backlight driverPatrick Gansterer2024-05-313-0/+348
| | | | | | | | | | | | | This is a general driver for LM3509 backlight chip of TI. LM3509 is High Efficiency Boost for White LEDs and/or OLED Displays with Dual Current Sinks. This driver supports OLED/White LED select, brightness control and sub/main control. The datasheet can be found at http://www.ti.com/product/lm3509. Signed-off-by: Patrick Gansterer <paroga@paroga.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240526105136.721529-3-paroga@paroga.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: sky81452-backlight: Remove unnecessary call to of_node_get()Shresth Prasad2024-05-101-6/+2
| | | | | | | | | | | `dev->of_node` already has a reference to the device_node and calling of_node_get on it is unnecessary. All conresponding calls to of_node_put are also removed. Signed-off-by: Shresth Prasad <shresthprasad7@gmail.com> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240502172121.8695-2-shresthprasad7@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
* backlight: mp3309c: Fix LEDs flickering in PWM modeFlavio Suligoi2024-05-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | The mp3309 has two configuration registers, named according to their address (0x00 and 0x01). In the second register (0x01), the bit DIMS (Dimming Mode Select) must be always 0 (zero), in both analog (via I2C commands) and PWM dimming mode. In the initial driver version, the DIMS bit was set in PWM mode and reset in analog mode. But if the DIMS bit is set in pwm dimming mode and other devices are connected on the same I2C bus, every I2C commands on the bus generates a flickering on the LEDs powered by the mp3309c. This change concerns the chip initialization and does not impact any existing device-tree configuration. Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240417153105.1794134-2-f.suligoi@asem.it Signed-off-by: Lee Jones <lee@kernel.org>