029cd092 | 28-Apr-2023 |
Thomas Zimmermann <tzimmermann@suse.de> |
auxdisplay/ht16k33: Use struct fb_info.screen_buffer
Use info->screen_buffer when reading and writing framebuffers in system memory. It's the correct pointer for this address space.
The struct fb_i
auxdisplay/ht16k33: Use struct fb_info.screen_buffer
Use info->screen_buffer when reading and writing framebuffers in system memory. It's the correct pointer for this address space.
The struct fb_info has a union to store the framebuffer memory. This can either be info->screen_base if the framebuffer is stored in I/O memory, or info->screen_buffer if the framebuffer is stored in system memory.
As the driver operates on the latter address space, it is wrong to use .screen_base and .screen_buffer must be used instead. This also gets rid of casting needed due to not using the correct data type.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230428122452.4856-3-tzimmermann@suse.de
show more ...
|
13de2349 | 08-Mar-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
auxdisplay: lcd2s: Use array size explicitly in lcd2s_gotoxy()
Currently the reading of the onstack array is confusing since two out of three members are of different types. Let it be more clear by
auxdisplay: lcd2s: Use array size explicitly in lcd2s_gotoxy()
Currently the reading of the onstack array is confusing since two out of three members are of different types. Let it be more clear by explicitly set the array size, so everybody will understand that parameters are cast to the type of the array.
While at it, add a missed space.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
8fefb313 | 08-Mar-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
auxdisplay: lcd2s: Switch to i2c ->probe_new()
The deprecated i2c ->probe() functionality doesn't work with OF compatible strings, as it only checks for the i2c device id. While it's not a problem r
auxdisplay: lcd2s: Switch to i2c ->probe_new()
The deprecated i2c ->probe() functionality doesn't work with OF compatible strings, as it only checks for the i2c device id. While it's not a problem right now, it would still bring a better code. Switch to the new way of probing.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
f15c3dea | 08-Mar-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
auxdisplay: lcd2s: use module_i2c_driver to simplify the code
Use the module_i2c_driver() macro to make the code smaller and a bit simpler.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.i
auxdisplay: lcd2s: use module_i2c_driver to simplify the code
Use the module_i2c_driver() macro to make the code smaller and a bit simpler.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
44bb3f03 | 08-Mar-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
auxdisplay: lcd2s: make use of device property API
Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver.
Signed-off-by: Andy Shevche
auxdisplay: lcd2s: make use of device property API
Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
9ed331f8 | 23-Feb-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
auxdisplay: lcd2s: Use proper API to free the instance of charlcd object
While it might work, the current approach is fragile in a few ways: - whenever members in the structure are shuffled, the poi
auxdisplay: lcd2s: Use proper API to free the instance of charlcd object
While it might work, the current approach is fragile in a few ways: - whenever members in the structure are shuffled, the pointer will be wrong - the resource freeing may include more than covered by kfree()
Fix this by using charlcd_free() call instead of kfree().
Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display") Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
898c0a15 | 23-Feb-2022 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
auxdisplay: lcd2s: Fix memory leak in ->remove()
Once allocated the struct lcd2s_data is never freed. Fix the memory leak by switching to devm_kzalloc().
Fixes: 8c9108d014c5 ("auxdisplay: add a dri
auxdisplay: lcd2s: Fix memory leak in ->remove()
Once allocated the struct lcd2s_data is never freed. Fix the memory leak by switching to devm_kzalloc().
Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display") Cc: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
4daa9ff8 | 09-Nov-2021 |
Luiz Sampaio <sampaio.ime@gmail.com> |
auxdisplay: charlcd: checking for pointer reference before dereferencing
Check if the pointer lcd->ops->init_display exists before dereferencing it. If a driver called charlcd_init() without definin
auxdisplay: charlcd: checking for pointer reference before dereferencing
Check if the pointer lcd->ops->init_display exists before dereferencing it. If a driver called charlcd_init() without defining the ops, this would return segmentation fault, as happened to me when implementing a charlcd driver. Checking the pointer before dereferencing protects from segmentation fault.
Signed-off-by: Luiz Sampaio <sampaio.ime@gmail.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
4e5d74fc | 29-Jul-2021 |
Huiquan Deng <denghuiquan@cdjrlc.com> |
auxdisplay: cfag12864bfb: code indent should use tabs where possible
Resolves the checkpatch error.
Signed-off-by: Huiquan Deng <denghuiquan@cdjrlc.com> [reworded and avoid moving the line] Signed-
auxdisplay: cfag12864bfb: code indent should use tabs where possible
Resolves the checkpatch error.
Signed-off-by: Huiquan Deng <denghuiquan@cdjrlc.com> [reworded and avoid moving the line] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
1515b849 | 28-Sep-2021 |
Mianhan Liu <liumh1@shanghaitech.edu.cn> |
auxdisplay: ht16k33: remove superfluous header files
ht16k33.c doesn't use any macro or function declared in linux/slab.h. Thus, these files can be removed from ht16k33.c safely without affecting th
auxdisplay: ht16k33: remove superfluous header files
ht16k33.c doesn't use any macro or function declared in linux/slab.h. Thus, these files can be removed from ht16k33.c safely without affecting the compilation.
Signed-off-by: Mianhan Liu <liumh1@shanghaitech.edu.cn> Acked-by: Robin van der Gracht <robin@protonic.nl> [reworded] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
2b7ea42e | 28-Sep-2021 |
Mianhan Liu <liumh1@shanghaitech.edu.cn> |
auxdisplay: ks0108: remove superfluous header files
ks0108.c doesn't use any macro or function declared in linux/fs.h, linux/io.h and linux/uaccess.h. Thus, these files can be removed from ks0108.c
auxdisplay: ks0108: remove superfluous header files
ks0108.c doesn't use any macro or function declared in linux/fs.h, linux/io.h and linux/uaccess.h. Thus, these files can be removed from ks0108.c safely without affecting the compilation.
Signed-off-by: Mianhan Liu <liumh1@shanghaitech.edu.cn> [reworded] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
83bb3d51 | 28-Sep-2021 |
Mianhan Liu <liumh1@shanghaitech.edu.cn> |
auxdisplay: cfag12864bfb: remove superfluous header files
cfag12864bfb.c doesn't use any macro or function declared in linux/delay.h, linux/string.h and linux/uaccess.h. Thus, these files can be rem
auxdisplay: cfag12864bfb: remove superfluous header files
cfag12864bfb.c doesn't use any macro or function declared in linux/delay.h, linux/string.h and linux/uaccess.h. Thus, these files can be removed from cfag12864bfb.c safely without affecting the compilation.
Signed-off-by: Mianhan Liu <liumh1@shanghaitech.edu.cn> [reworded] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
5d343f7c | 19-Oct-2021 |
Geert Uytterhoeven <geert@linux-m68k.org> |
auxdisplay: ht16k33: Make use of device properties
The device property API allows drivers to gather device resources from different sources, such as ACPI, and lift the dependency on Device Tree. Con
auxdisplay: ht16k33: Make use of device properties
The device property API allows drivers to gather device resources from different sources, such as ACPI, and lift the dependency on Device Tree. Convert the driver to unleash the power of the device property API.
Suggested-by: Marek Behún <kabel@kernel.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
c223d9c6 | 19-Oct-2021 |
Geert Uytterhoeven <geert@linux-m68k.org> |
auxdisplay: ht16k33: Add LED support
Instantiate a single LED based on the "led" subnode in DT. This allows the user to control display brightness and blinking (backed by hardware support) through t
auxdisplay: ht16k33: Add LED support
Instantiate a single LED based on the "led" subnode in DT. This allows the user to control display brightness and blinking (backed by hardware support) through the LED class API and triggers, and exposes the display color. The LED will be named "auxdisplay:<color>:<function>".
When running in dot-matrix mode and if no "led" subnode is found, the driver falls back to the traditional backlight mode, to preserve backwards compatibility.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|
a0428724 | 19-Oct-2021 |
Geert Uytterhoeven <geert@linux-m68k.org> |
auxdisplay: ht16k33: Add support for segment displays
The Holtek HT16K33 LED controller is not only used for driving dot-matrix displays, but also for driving segment displays.
Add support for 4-di
auxdisplay: ht16k33: Add support for segment displays
The Holtek HT16K33 LED controller is not only used for driving dot-matrix displays, but also for driving segment displays.
Add support for 4-digit 7-segment and quad 14-segment alphanumeric displays, like the Adafruit 7-segment and 14-segment display backpack and FeatherWing expansion boards. Use the character line display core support to display a message, which will be scrolled if it doesn't fit.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Robin van der Gracht <robin@protonic.nl> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
show more ...
|