aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-10-21auxdisplay: ht16k33: Connect backlight to fbdevGeert Uytterhoeven1-28/+28
Currently /sys/class/graphics/fb0/bl_curve is not accessible (-ENODEV), as the driver does not connect the backlight to the frame buffer device. Fix this moving backlight initialization up, and filling in fb_info.bl_dev. Fixes: 8992da44c6805d53 ("auxdisplay: ht16k33: Driver for LED controller") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21auxdisplay: linedisp: Add support for changing scroll rateGeert Uytterhoeven1-2/+35
If the message to display is longer than the number of characters that the display can show, the message will be scrolled. Currently the scroll rate is fixed, moving every 500 ms. Add support for changing the scroll rate through a "scroll_step_ms" device attribute in sysfs. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21auxdisplay: linedisp: Use kmemdup_nul() helperGeert Uytterhoeven1-4/+1
Use the existing kmemdup_nul() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21auxdisplay: Extract character line display core supportGeert Uytterhoeven5-174/+312
Extract the character line display core support from the simple ASCII LCD driver for the MIPS Boston, Malta & SEAD3 development boards into its own subdriver, so it can be reused for other displays. As this moves the "message" device attribute in sysfs in a "linedisp.N" subdirectory, a symlink is added to preserve backwards compatibility. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21auxdisplay: img-ascii-lcd: Convert device attribute to sysfs_emit()Geert Uytterhoeven1-1/+1
Convert the "message" device attribute from sprintf() to sysfs_emit(), as the latter is aware of the PAGE_SIZE buffer. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21auxdisplay: img-ascii-lcd: Add helper variable devGeert Uytterhoeven1-7/+6
img_ascii_lcd_probe() has many users of "pdev->dev". Add a shorthand to simplify the code. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21auxdisplay: img-ascii-lcd: Fix lock-up when displaying empty stringGeert Uytterhoeven1-0/+10
While writing an empty string to a device attribute is a no-op, and thus does not need explicit safeguards, the user can still write a single newline to an attribute file: echo > .../message If that happens, img_ascii_lcd_display() trims the newline, yielding an empty string, and causing an infinite loop in img_ascii_lcd_scroll(). Fix this by adding a check for empty strings. Clear the display in case one is encountered. Fixes: 0cad855fbd083ee5 ("auxdisplay: img-ascii-lcd: driver for simple ASCII LCD displays") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-10-21dt-bindings: auxdisplay: ht16k33: Document Adafruit segment displaysGeert Uytterhoeven1-3/+17
The Holtek HT16K33 LED controller is not only used for driving dot-matrix displays, but also for driving segment displays. Document compatible values for the Adafruit 7-segment[1] and 14-segment[2] FeatherWing expansion boards with red displays. According to the schematics, all other Adafruit 7-segment and 14-segment display backpack and FeatherWing expansion boards (including bare boards and boards fitted with displays) are compatible with these two boards. [1] https://www.adafruit.com/product/3108 [2] https://www.adafruit.com/product/3130 Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>