summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay/line-display.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-04auxdisplay: linedisp: add missing MODULE_DESCRIPTION() macroJeff Johnson1-0/+1
make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/auxdisplay/line-display.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-06-04auxdisplay: linedisp: Support configuring the boot messageChris Packham1-1/+9
Like we do for charlcd, allow the configuration of the initial message on line-display devices. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-26auxdisplay: linedisp: Allocate buffer for the stringAndy Shevchenko1-4/+7
Always allocate a buffer for the currently displayed characters. It makes the line display API simpler. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Add support for overriding character mappingAndy Shevchenko1-2/+109
There is already the driver using character mapping table for 7 or 14 segment display. It is possible to override it. Make the similar in the line display library to allow other drivers to utilise the same functionality. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Provide struct linedisp_ops for future extensionAndy Shevchenko1-5/+5
Currently the line display library doesn't scale in case we want to provide more operations. Prepare the library to take a newly created struct linedisp_ops that scales. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Move exported symbols to a namespaceAndy Shevchenko1-2/+2
Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Add missing header(s)Andy Shevchenko1-0/+3
Do not imply that some of the generic headers may be always included. Instead, include explicitly what we are direct user of. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Unshadow error codes in ->store()Andy Shevchenko1-2/+5
kstrtox() may return different error codes. Unshadow them in the ->store() callback to give better error report. While at it, add missing kstrtox.h inclusion. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Use unique number for idAndy Shevchenko1-3/+10
The absence of decrementation of linedisp_id is incorrect in two ways, i.e. it may cause: - an ID exhaustion - (and if the above is addressed) a duplicate id number may be allocated next time a device is added Replace above mentioned approach by using IDA framework. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2024-02-15auxdisplay: linedisp: Free allocated resources in ->release()Andy Shevchenko1-1/+8
While there is no issue currently with the resources allocation, the code may still be made more robust by deallocating message in the ->release() callback. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2021-10-22auxdisplay: 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-22auxdisplay: 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-22auxdisplay: Extract character line display core supportGeert Uytterhoeven1-0/+231
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>