[PATCH] auxdisplay: panel: Remove redundant charlcd_ops structures

2020-11-16 Thread poeschel
From: Lars Poeschel The three struct charlcd_ops contain the same data, so we only need one of this structures. The other two are removed. Signed-off-by: Lars Poeschel --- drivers/auxdisplay/panel.c | 42 -- 1 file changed, 4 insertions(+), 38 deletions

[PATCH] auxdisplay: panel: Fix missing print function pointer

2020-11-16 Thread poeschel
From: Lars Poeschel charlcd drivers need to provide some print function to charlcd. For hd44780 based panel driver this function was missing. We provide the generic hd44780_common_print function which should be suitable. Fixes: b26deabb1d915fe87d395081bbd3058b938dee89 ("auxdi

Re: [LKP] Re: [auxdisplay] b26deabb1d: BUG:kernel_NULL_pointer_dereference,address

2020-11-16 Thread Lars Poeschel
On Thu, Nov 12, 2020 at 01:29:31PM +, Sang, Oliver wrote: > > > > -Original Message- > > From: Lars Poeschel > > Sent: Monday, November 9, 2020 8:40 PM > > To: Sang, Oliver > > Cc: Miguel Ojeda ; lkp ; Willy Tarreau > > ; LKML ; Linux Memo

Re: [auxdisplay] b26deabb1d: BUG:kernel_NULL_pointer_dereference,address

2020-11-09 Thread Lars Poeschel
Hi! And thanks for your report. On Mon, Nov 09, 2020 at 02:29:34PM +0800, kernel test robot wrote: > To reproduce: > > # build kernel > cd linux > cp config-5.10.0-rc2-8-gb26deabb1d91 .config > make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 olddefconfig prepare >

Re: [PATCH] auxdisplay: fix use after free in lcd2s_i2c_remove()

2020-11-09 Thread Lars Poeschel
On Fri, Nov 06, 2020 at 10:24:15PM +0300, Dan Carpenter wrote: > The kfree() needs to be moved down a line to prevent a use after free. > > Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display") > Signed-off-by: Dan Carpenter > --- > drivers/auxdisplay/lcd2s.c | 2 +- > 1

[PATCH] auxdisplay: hd44780_common: Fix build error

2020-11-09 Thread poeschel
From: Lars Poeschel When building the hd44780_common driver without a driver that actually uses it like panel or hd44780 you got a build error, because hd44780_common uses charlcd, but did not select it. It's users did select it. This is fixed now. hd4478_common now selects charlcd in Kconfig

Re: [PATCH v6 00/25] Make charlcd device independent

2020-11-06 Thread Lars Poeschel
On Wed, Nov 04, 2020 at 02:30:04PM +0100, Miguel Ojeda wrote: > Thanks a lot for all the work, Lars. Queued in -next. I got an email [1] with a report about a build failure in hd44780_common. The fix is simple but I don't know the process from here on. Should I post a v7 of the whole patchset or

[PATCH v6 11/25] auxdisplay: Move clear_display to hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel This moves the clear_display function from charlcd to hd44780_common. This is one more step to make charlcd independent from device specific code. The two hd44780 drivers use the new function from hd44780_common and charlcd calls this function through its function pointer

[PATCH v6 04/25] auxdisplay: Move ifwidth to struct hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel Move struct charlcd member ifwidth to our new struct hd44780_common. ifwidth is hd44780 device specific and is used by two drivers at the moment, so we move it to a common place, where both can use this. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v6 07/25] auxdisplay: Move addr out of charlcd_priv

2020-11-03 Thread poeschel
From: Lars Poeschel Move out the struct addr from struct charlcd_priv into the less private struct charlcd. This member is used to pass position information. The individual drivers need to be able to read this information, so we move this out of charlcd_priv to charlcd structure. Reviewed

[PATCH v6 06/25] auxdisplay: Move write_cmd pointers to hd44780 drivers

2020-11-03 Thread poeschel
From: Lars Poeschel The write_cmd function is used to send commands to hd44780 displays. The individual hd44780 drivers then implement their appropriate way of doing this with their supported displays. So we move this pointer so hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars

[PATCH v6 13/25] auxdisplay: Make use of enum for backlight on / off

2020-11-03 Thread poeschel
From: Lars Poeschel To turn the backlight on or off use our new enum CHARLCD_ON / CHARLCD_OFF. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b

[PATCH v6 08/25] auxdisplay: hd44780_common_print

2020-11-03 Thread poeschel
From: Lars Poeschel We create a hd44780_common_print function. It is derived from the original charlcd_print. charlcd_print becomes a device independent print function, that then only calls via its ops function pointers, into the print function offered by drivers. Reported-by: kernel test robot

[PATCH v6 10/25] auxdisplay: add home to charlcd_ops

2020-11-03 Thread poeschel
From: Lars Poeschel This adds a home function to the charlcd_ops struct and offer an implementation for hd44780_common. This implementation is used by our two hd44780 drivers. This is to make charlcd device independent. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v6 00/25] Make charlcd device independent

2020-11-03 Thread poeschel
From: Lars Poeschel This tries to make charlcd device independent. At the moment hd44780 device specific code is contained deep in charlcd. This moves this out into a hd44780_common module, where the two hd44780 drivers we have at the moment (hd44780 and panel) can use this from. The goal

[PATCH v6 02/25] auxdisplay: Introduce hd44780_common.[ch]

2020-11-03 Thread poeschel
From: Lars Poeschel There is some hd44780 specific code in charlcd and this code is used by multiple drivers. To make charlcd independent from this device specific code this has to be moved to a place where the multiple drivers can share their common code. This common place is now introduced

[PATCH v6 23/25] auxdisplay: charlcd: Do not print chars at end of line

2020-11-03 Thread poeschel
From: Lars Poeschel Skip printing characters at the end of a display line. This fits to the behaviour we already had, that the cursor is nailed to the last position of a line. This might slightly change behaviour. On hd44780 displays with one or two lines the previous implementation did still

[PATCH v6 18/25] auxdisplay: Call charlcd_backlight in place

2020-11-03 Thread poeschel
From: Lars Poeschel This moves the call to charlcd_backlight from the end of the switch into the actual case statement that originates the change of the backlight. This is more consistent to what is now found in this switch. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v6 16/25] auxdisplay: cleanup unnecessary hd44780 code in charlcd

2020-11-03 Thread poeschel
From: Lars Poeschel This cleans up now unnecessary hd44780 specific code from charlcd. We obsoleted this with the last patch. So another chunk of hd44780 specific code can be dropped from charlcd. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - combined two

[PATCH v6 05/25] auxdisplay: Move write_data pointer to hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel This moves the write_data function pointer from struct charlcd_ops to struct hd44780_common. This is the function that actually writes the character to the display. This hd44780 hardware specific function is used by two drivers at the moment. Reviewed-by: Willy Tarreau

[PATCH v6 14/25] auxdisplay: Move init_display to hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel The init_display function is moved over to hd44780_common. charlcd uses it via its ops function pointer and drivers initialize the ops with the common hd44780_common_init_display function. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - Fix

[PATCH v6 20/25] auxdisplay: hd44780: Remove clear_fast

2020-11-03 Thread poeschel
From: Lars Poeschel We remove the hd44780_clear_fast (display) clear implementation. With the new timeout the normal clear_display is reasonably fast. So there is no need for a clear_fast anymore. Link: https://lore.kernel.org/lkml/20200922092121.gg16...@1wt.eu/ Signed-off-by: Lars Poeschel

[PATCH v6 12/25] auxdisplay: make charlcd_backlight visible to hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel hd44780_common wants to use the charlcd_backlight function, so make it visible. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 3 ++- drivers/auxdisplay/charlcd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v6 17/25] auxdisplay: Move char redefine code to hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel Take the code to redefine characters out of charlcd and move it to hd44780_common, as this is hd44780 specific. There is now a function hd44780_common_redefine_char that drivers use and charlcd calls it through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off

[PATCH v6 24/25] auxdisplay: lcd2s DT binding doc

2020-11-03 Thread poeschel
From: Lars Poeschel Add a binding doc for the modtronix lcd2s auxdisplay driver. It also adds modtronix to the list of known vendor-prefixes. Reviewed-by: Willy Tarreau Reviewed-by: Rob Herring Signed-off-by: Lars Poeschel --- Changes in v5: - Picked up Robs Reviewed-by Changes in v3

[PATCH v6 22/25] auxdisplay: Change gotoxy calling interface

2020-11-03 Thread poeschel
From: Lars Poeschel Change the calling interface for gotoxy from supplying the x and y coordinates in the charlcd struct to explicitly supplying x and y in the function arguments. This is more intuitive and allows for moving the cursor to positions independent from the position saved

[PATCH v6 19/25] auxdisplay: hd44780_common: Reduce clear_display timeout

2020-11-03 Thread poeschel
From: Lars Poeschel Digging in the hd44780 datasheet revealed that the timeout needed after clearing the whole display is only 1,64ms not 15ms. So we can reduce that timeout. Link: https://lore.kernel.org/lkml/20200922092121.gg16...@1wt.eu/ Link: https://www.crystalfontz.com/controllers/Hitachi

[PATCH v6 15/25] auxdisplay: implement various hd44780_common_ functions

2020-11-03 Thread poeschel
From: Lars Poeschel This implements various hd44780_common_ functions for hd44780 compatible display drivers to use. charlcd then calls these functions through its ops function pointer. The functions namely are: - hd44780_common_shift_cursor - hd44780_common_display_shift

[PATCH v6 03/25] auxdisplay: Move hwidth and bwidth to struct hd44780_common

2020-11-03 Thread poeschel
From: Lars Poeschel hwidth is for the hardware buffer size and bwidth is for the buffer width of one single line. This is specific to the hd44780 displays and so it is moved out from charlcd to struct hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v6 01/25] auxdisplay: Use an enum for charlcd backlight on/off ops

2020-11-03 Thread poeschel
From: Lars Poeschel We use an enum for calling the functions in charlcd, that turn the backlight on or off. This enum is generic and can be used for other charlcd turn on / turn off operations as well. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - Fix a commit

[PATCH v6 09/25] auxdisplay: provide hd44780_common_gotoxy

2020-11-03 Thread poeschel
From: Lars Poeschel Provide a hd44780_common_gotoxy function and a pointer in the ops for charlcd to use to move the cursor. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 38 + drivers/auxdisplay/charlcd.h

[PATCH v6 25/25] auxdisplay: add a driver for lcd2s character display

2020-11-03 Thread poeschel
From: Lars Poeschel This driver allows to use a lcd2s 20x4 character display from Modtronix engineering as an auxdisplay charlcd device. Signed-off-by: Lars Poeschel --- Changes in v5: - use hex_to_bin like in commit 3f03b6498 but for this file Changes in v4: - modtronix -> Modtronix - Kcon

[PATCH v6 21/25] auxdisplay: charlcd: replace last device specific stuff

2020-11-03 Thread poeschel
From: Lars Poeschel These are the last bits left in charlcd.c that are device specific and they are removed now. In detail this is: * bwidth, which is the width of the display buffer per line. This is replaced by width of the display. * hwidth, which is the size of the display buffer

Re: [PATCH v5 02/25] auxdisplay: Introduce hd44780_common.[ch]

2020-11-03 Thread Lars Poeschel
On Sat, Oct 31, 2020 at 10:26:30AM +0100, Miguel Ojeda wrote: > Hi Lars, > > On Thu, Oct 29, 2020 at 10:57 AM wrote: > > > > diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig > > index 81757eeded68..a56171d1a1ba 100644 > > --- a/drivers/auxdisplay/Kconfig > > +++

Re: [PATCH 00/25] Make charlcd device independent

2020-10-29 Thread Lars Poeschel
This series was sent wrong. Should be v5. Drop this one. Sorry and thanks, Lars On Thu, Oct 29, 2020 at 10:50:07AM +0100, poesc...@lemonage.de wrote: > From: Lars Poeschel > > This tries to make charlcd device independent. At the moment hd44780 > device specific code is co

[PATCH v5 24/25] auxdisplay: lcd2s DT binding doc

2020-10-29 Thread poeschel
From: Lars Poeschel Add a binding doc for the modtronix lcd2s auxdisplay driver. It also adds modtronix to the list of known vendor-prefixes. Reviewed-by: Willy Tarreau Reviewed-by: Rob Herring Signed-off-by: Lars Poeschel --- Changes in v5: - Picked up Robs Reviewed-by Changes in v3

[PATCH v5 25/25] auxdisplay: add a driver for lcd2s character display

2020-10-29 Thread poeschel
From: Lars Poeschel This driver allows to use a lcd2s 20x4 character display from Modtronix engineering as an auxdisplay charlcd device. Signed-off-by: Lars Poeschel --- Changes in v5: - use hex_to_bin like in commit 3f03b6498 but for this file Changes in v4: - modtronix -> Modtronix - Kcon

[PATCH 02/25] auxdisplay: Introduce hd44780_common.[ch]

2020-10-29 Thread poeschel
From: Lars Poeschel There is some hd44780 specific code in charlcd and this code is used by multiple drivers. To make charlcd independent from this device specific code this has to be moved to a place where the multiple drivers can share their common code. This common place is now introduced

[PATCH 00/25] Make charlcd device independent

2020-10-29 Thread poeschel
From: Lars Poeschel This tries to make charlcd device independent. At the moment hd44780 device specific code is contained deep in charlcd. This moves this out into a hd44780_common module, where the two hd44780 drivers we have at the moment (hd44780 and panel) can use this from. The goal

[PATCH 01/25] auxdisplay: Use an enum for charlcd backlight on/off ops

2020-10-29 Thread poeschel
From: Lars Poeschel We use an enum for calling the functions in charlcd, that turn the backlight on or off. This enum is generic and can be used for other charlcd turn on / turn off operations as well. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - Fix a commit

[PATCH v5 08/25] auxdisplay: hd44780_common_print

2020-10-29 Thread poeschel
From: Lars Poeschel We create a hd44780_common_print function. It is derived from the original charlcd_print. charlcd_print becomes a device independent print function, that then only calls via its ops function pointers, into the print function offered by drivers. Reported-by: kernel test robot

[PATCH v5 03/25] auxdisplay: Move hwidth and bwidth to struct hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel hwidth is for the hardware buffer size and bwidth is for the buffer width of one single line. This is specific to the hd44780 displays and so it is moved out from charlcd to struct hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v5 06/25] auxdisplay: Move write_cmd pointers to hd44780 drivers

2020-10-29 Thread poeschel
From: Lars Poeschel The write_cmd function is used to send commands to hd44780 displays. The individual hd44780 drivers then implement their appropriate way of doing this with their supported displays. So we move this pointer so hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars

[PATCH v5 09/25] auxdisplay: provide hd44780_common_gotoxy

2020-10-29 Thread poeschel
From: Lars Poeschel Provide a hd44780_common_gotoxy function and a pointer in the ops for charlcd to use to move the cursor. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 38 + drivers/auxdisplay/charlcd.h

[PATCH v5 15/25] auxdisplay: implement various hd44780_common_ functions

2020-10-29 Thread poeschel
From: Lars Poeschel This implements various hd44780_common_ functions for hd44780 compatible display drivers to use. charlcd then calls these functions through its ops function pointer. The functions namely are: - hd44780_common_shift_cursor - hd44780_common_display_shift

[PATCH v5 17/25] auxdisplay: Move char redefine code to hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel Take the code to redefine characters out of charlcd and move it to hd44780_common, as this is hd44780 specific. There is now a function hd44780_common_redefine_char that drivers use and charlcd calls it through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off

[PATCH v5 05/25] auxdisplay: Move write_data pointer to hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel This moves the write_data function pointer from struct charlcd_ops to struct hd44780_common. This is the function that actually writes the character to the display. This hd44780 hardware specific function is used by two drivers at the moment. Reviewed-by: Willy Tarreau

[PATCH v5 13/25] auxdisplay: Make use of enum for backlight on / off

2020-10-29 Thread poeschel
From: Lars Poeschel To turn the backlight on or off use our new enum CHARLCD_ON / CHARLCD_OFF. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b

[PATCH v5 14/25] auxdisplay: Move init_display to hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel The init_display function is moved over to hd44780_common. charlcd uses it via its ops function pointer and drivers initialize the ops with the common hd44780_common_init_display function. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - Fix

[PATCH v5 10/25] auxdisplay: add home to charlcd_ops

2020-10-29 Thread poeschel
From: Lars Poeschel This adds a home function to the charlcd_ops struct and offer an implementation for hd44780_common. This implementation is used by our two hd44780 drivers. This is to make charlcd device independent. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v5 16/25] auxdisplay: cleanup unnecessary hd44780 code in charlcd

2020-10-29 Thread poeschel
From: Lars Poeschel This cleans up now unnecessary hd44780 specific code from charlcd. We obsoleted this with the last patch. So another chunk of hd44780 specific code can be dropped from charlcd. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - combined two

[PATCH v5 19/25] auxdisplay: hd44780_common: Reduce clear_display timeout

2020-10-29 Thread poeschel
From: Lars Poeschel Digging in the hd44780 datasheet revealed that the timeout needed after clearing the whole display is only 1,64ms not 15ms. So we can reduce that timeout. Link: https://lore.kernel.org/lkml/20200922092121.gg16...@1wt.eu/ Link: https://www.crystalfontz.com/controllers/Hitachi

[PATCH v5 18/25] auxdisplay: Call charlcd_backlight in place

2020-10-29 Thread poeschel
From: Lars Poeschel This moves the call to charlcd_backlight from the end of the switch into the actual case statement that originates the change of the backlight. This is more consistent to what is now found in this switch. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v5 23/25] auxdisplay: charlcd: Do not print chars at end of line

2020-10-29 Thread poeschel
From: Lars Poeschel Skip printing characters at the end of a display line. This fits to the behaviour we already had, that the cursor is nailed to last position of a line. This might slightly change behaviour. On hd44780 displays with one or two lines the previous implementation did still write

[PATCH v5 04/25] auxdisplay: Move ifwidth to struct hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel Move struct charlcd member ifwidth to our new struct hd44780_common. ifwidth is hd44780 device specific and is used by two drivers at the moment, so we move it to a common place, where both can use this. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v5 22/25] auxdisplay: Change gotoxy calling interface

2020-10-29 Thread poeschel
From: Lars Poeschel Change the calling interface for gotoxy from supplying the x and y coordinates in the charlcd struct to explicitly supplying x and y in the function arguments. This is more intuitive and allows for moving the cursor to positions independent from the position saved

[PATCH v5 21/25] auxdisplay: charlcd: replace last device specific stuff

2020-10-29 Thread poeschel
From: Lars Poeschel These are the last bits left in charlcd.c that are device specific and they are removed now. In detail this is: * bwidth, which is the width of the display buffer per line. This is replaced by width of the display. * hwidth, which is the size of the display buffer

[PATCH v5 12/25] auxdisplay: make charlcd_backlight visible to hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel hd44780_common wants to use the charlcd_backlight function, so make it visible. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 3 ++- drivers/auxdisplay/charlcd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v5 20/25] auxdisplay: hd44780: Remove clear_fast

2020-10-29 Thread poeschel
From: Lars Poeschel We remove the hd44780_clear_fast (display) clear implementation. With the new timeout the normal clear_display is reasonably fast. So there is no need for a clear_fast anymore. Link: https://lore.kernel.org/lkml/20200922092121.gg16...@1wt.eu/ Signed-off-by: Lars Poeschel

[PATCH v5 11/25] auxdisplay: Move clear_display to hd44780_common

2020-10-29 Thread poeschel
From: Lars Poeschel This moves the clear_display function from charlcd to hd44780_common. This is one more step to make charlcd independent from device specific code. The two hd44780 drivers use the new function from hd44780_common and charlcd calls this function through its function pointer

[PATCH v5 07/25] auxdisplay: Move addr out of charlcd_priv

2020-10-29 Thread poeschel
From: Lars Poeschel Move out the struct addr from struct charlcd_priv into the less private struct charlcd. This member is used to pass position information. The individual drivers need to be able to read this information, so we move this out of charlcd_priv to charlcd structure. Reviewed

[PATCH v5 02/25] auxdisplay: Introduce hd44780_common.[ch]

2020-10-29 Thread poeschel
From: Lars Poeschel There is some hd44780 specific code in charlcd and this code is used by multiple drivers. To make charlcd independent from this device specific code this has to be moved to a place where the multiple drivers can share their common code. This common place is now introduced

[PATCH 00/25] Make charlcd device independent

2020-10-29 Thread poeschel
From: Lars Poeschel This tries to make charlcd device independent. At the moment hd44780 device specific code is contained deep in charlcd. This moves this out into a hd44780_common module, where the two hd44780 drivers we have at the moment (hd44780 and panel) can use this from. The goal

[PATCH v5 01/25] auxdisplay: Use an enum for charlcd backlight on/off ops

2020-10-29 Thread poeschel
From: Lars Poeschel We use an enum for calling the functions in charlcd, that turn the backlight on or off. This enum is generic and can be used for other charlcd turn on / turn off operations as well. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v5: - Fix a commit

Re: [PATCH v4 00/32] Make charlcd device independent

2020-10-22 Thread Lars Poeschel
On Fri, Oct 16, 2020 at 05:59:04AM +0200, Miguel Ojeda wrote: > On Fri, Oct 16, 2020 at 4:33 AM Miguel Ojeda > wrote: > > > > Picking these for linux-next (including Rob's Reviewed-by). I have > > spotted a few typos that I corrected -- I will note them by email. > > Hmm, I think we should do

Re: [PATCH v4 00/32] Make charlcd device independent

2020-10-06 Thread Lars Poeschel
On Mon, Oct 05, 2020 at 05:30:59PM +0200, Miguel Ojeda wrote: > Hi Lars, > > On Mon, Oct 5, 2020 at 2:27 PM wrote: > > > > This tries to make charlcd device independent. > > Thanks a lot for the work! > > I see you have written the differences between versions in each patch, > but given there

Re: [PATCH 1/2] pwm: sysfs: Set class on pwm devices

2020-10-05 Thread Lars Poeschel
On Fri, Oct 02, 2020 at 03:35:12PM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 02, 2020 at 03:08:44PM +0200, Lars Poeschel wrote: > > On Fri, Oct 02, 2020 at 02:46:16PM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Oct 02, 2020 at 02:30:47PM +0200, poesc...@lemonage.de w

[PATCH v4 15/32] auxdisplay: implement hd44780_common_shift_cursor

2020-10-05 Thread poeschel
From: Lars Poeschel Implement a hd44780_common_shift_cursor function for drivers to use and make charlcd use this function through ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 33 - drivers

[PATCH v4 13/32] auxdisplay: Make use of enum for backlight on / off

2020-10-05 Thread poeschel
From: Lars Poeschel To turn the backlight on or off use our new enum CHARLCD_ON / CHARLCD_OFF. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b

[PATCH v4 24/32] auxdisplay: Move char redefine code to hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel Take the code to redefine characters out of charlcd and move it to hd44780_common, as this is hd44780 specific. There is now a function hd44780_common_redefine_char that drivers use and charlcd calls it through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off

[PATCH v4 26/32] auxdisplay: hd44780_common: Reduce clear_display timeout

2020-10-05 Thread poeschel
From: Lars Poeschel Digging in the hd44780 datasheet revealed that the timeout needed after clearing the whole display is only 1,64ms not 15ms. So we can reduce that timeout. Link: https://lore.kernel.org/lkml/20200922092121.gg16...@1wt.eu/ Link: https://www.crystalfontz.com/controllers/Hitachi

[PATCH v4 30/32] auxdisplay: charlcd: Do not print chars at end of line

2020-10-05 Thread poeschel
From: Lars Poeschel Skip printing characters at the end of a display line. This fits to the behaviour we already had, that the cursor is nailed to last position of a line. This might slightly change behaviour. On hd44780 displays with one or two lines the previous implementation did still write

[PATCH v4 28/32] auxdisplay: charlcd: replace last device specific stuff

2020-10-05 Thread poeschel
From: Lars Poeschel These are the last bits left in charlcd.c that are device specific and they are removed now. In detail this is: * bwidth, which is the width of the display buffer per line. This is replaced by width of the display. * hwidth, which is the size of the display buffer

[PATCH v4 18/32] auxdisplay: Implement hd44780_common_cursor

2020-10-05 Thread poeschel
From: Lars Poeschel Implement a hd44780_common_cursor function to turn the cursor on and off. The hd44780 drivers can use this function and charlcd calls it through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 6

[PATCH v4 27/32] auxdisplay: hd44780: Remove clear_fast

2020-10-05 Thread poeschel
From: Lars Poeschel We remove the hd44780_clear_fast (display) clear implementation. With the new timeout the normal clear_display is reasonably fast. So there is no need for a clear_fast anymore. Link: https://lore.kernel.org/lkml/20200922092121.gg16...@1wt.eu/ Signed-off-by: Lars Poeschel

[PATCH v4 25/32] auxdisplay: Call charlcd_backlight in place

2020-10-05 Thread poeschel
From: Lars Poeschel This moves the call to charlcd_backlight from the end of the switch into the actual case statement that originates the change of the backlight. This is more consistent to what is now found in this switch. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v4 23/32] auxdisplay: Remove unnecessary hd44780 from charlcd

2020-10-05 Thread poeschel
From: Lars Poeschel The last two commits made another chunk of hd44780 code unnecessary which we remove here. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers

[PATCH v4 32/32] auxdisplay: add a driver for lcd2s character display

2020-10-05 Thread poeschel
From: Lars Poeschel This driver allows to use a lcd2s 20x4 character display from Modtronix engineering as an auxdisplay charlcd device. Signed-off-by: Lars Poeschel --- Changes in v4: - modtronix -> Modtronix - Kconfig: remove "default n" --- drivers/auxdisplay/Kconfig |

[PATCH v4 29/32] auxdisplay: Change gotoxy calling interface

2020-10-05 Thread poeschel
From: Lars Poeschel Change the calling interface for gotoxy from supplying the x and y coordinates in the charlcd struct to explicitly supplying x and y in the function arguments. This is more intuitive and allows for moving the cursor to positions independent from the position saved

[PATCH v4 16/32] auxdisplay: Implement hd44780_common_display_shift

2020-10-05 Thread poeschel
From: Lars Poeschel Implement a hd44780_common_display_shift function for hd44780 drivers to use. charlcd uses this through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 10 ++ drivers/auxdisplay/charlcd.h

[PATCH v4 31/32] auxdisplay: lcd2s DT binding doc

2020-10-05 Thread poeschel
From: Lars Poeschel Add a binding doc for the modtronix lcd2s auxdisplay driver. It also adds modtronix to the list of known vendor-prefixes. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- Changes in v3: - Fixed make dt_binding_doc errors Changes in v2: - Adopted yaml based file

[PATCH v4 17/32] auxdisplay: Implement a hd44780_common_display

2020-10-05 Thread poeschel
From: Lars Poeschel Implement a hd44780_common_display function to turn the whole display on or off. The hd44780 drivers can use this and charlcd uses this through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 6

[PATCH v4 21/32] auxdisplay: Implement hd44780_common_fontsize

2020-10-05 Thread poeschel
From: Lars Poeschel This implements hd44780_common_fontsize to switch between two fontsizes. The hd44780 drivers can just set this function to their ops structure and charlcd uses it through this ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v4 19/32] auxdisplay: Implement hd44780_common_blink

2020-10-05 Thread poeschel
From: Lars Poeschel Implement a hd44780_common_blink function to turn on or off the blinking of the cursor. The hd44780 drivers just use this function and charlcd calls it through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay

[PATCH v4 22/32] auxdisplay: Implement hd44780_common_lines

2020-10-05 Thread poeschel
From: Lars Poeschel This implements hd44780_common_lines to switch the display between one and two lines mode. The hd44780 drivers use this function by adding it to their ops structure and charlcd now calls through its ops function pointer. Reviewed-by: Willy Tarreau Signed-off-by: Lars

[PATCH v4 14/32] auxdisplay: Move init_display to hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel The init_display function is moved over to hd44780_common. charlcd uses it via it's ops function pointer and drivers initialize the ops with the common hd44780_common_init_display function. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay

[PATCH v4 20/32] auxdisplay: cleanup unnecessary hd44780 code in charlcd

2020-10-05 Thread poeschel
From: Lars Poeschel This cleans up now unnecessary hd44780 specific code from charlcd. We obsoleted this with the last three patches. So another chunk of hd44780 code can be dropped. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 17

[PATCH v4 07/32] auxdisplay: Move addr out of charlcd_priv

2020-10-05 Thread poeschel
From: Lars Poeschel Move out the struct addr from struct charlcd_priv into the less private struct charlcd. This member is used to pass position information. The individual drivers need to be able to read this information, so we move this out of charlcd_priv to charlcd structure. Reviewed

[PATCH v4 03/32] auxdisplay: Move hwidth and bwidth to struct hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel hwidth is for the hardware buffer size and bwidth is for the buffer width of one single line. This is specific to the hd44780 displays and so it is moved out from charlcd to struct hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v4 01/32] auxdisplay: Use an enum for charlcd backlight on/off ops

2020-10-05 Thread poeschel
From: Lars Poeschel We use an enum for calling the functions in charlcd, that turn the backlight on or off. This enum is generic and can be used for other charlcd turn of / turn off operations as well. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c

[PATCH v4 06/32] auxdisplay: Move write_cmd pointers to hd44780 drivers

2020-10-05 Thread poeschel
From: Lars Poeschel The write_cmd function is used to send commands to hd44780 displays. The individual hd44780 drivers then implement their appropriate way of doing this with their supported displays. So we move this pointer so hd44780_common. Reviewed-by: Willy Tarreau Signed-off-by: Lars

[PATCH v4 05/32] auxdisplay: Move write_data pointer to hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel This moves the write_data function pointer from struct charlcd_ops to struct hd44780_common. This is the function that actually writes the character to the display. This hd44780 hardware specific function is used by two drivers at the moment. Reviewed-by: Willy Tarreau

[PATCH v4 08/32] auxdisplay: hd44780_common_print

2020-10-05 Thread poeschel
From: Lars Poeschel We create a hd44780_common_print function. It is derived from the original charlcd_print. charlcd_print becomes a device independent print function, that then only calles via it's ops function pointers, into the print function offered by drivers. Reported-by: kernel test

[PATCH v4 02/32] auxdisplay: Introduce hd44780_common.[ch]

2020-10-05 Thread poeschel
From: Lars Poeschel There is some hd44780 specific code in charlcd and this code is used by multiple drivers. To make charlcd independent from this device specific code this has to be moved to a place where the multiple drivers can share their common code. This common place is now introduced

[PATCH v4 04/32] auxdisplay: Move ifwidth to struct hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel Move struct charlcd member ifwidth to our new struct hd44780_common. ifwidth is hd44780 device specific and is used by two drivers at the moment, so we move it to a common place, where both can use this. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v4 10/32] auxdisplay: add home to charlcd_ops

2020-10-05 Thread poeschel
From: Lars Poeschel This adds a home function to the charlcd_ops struct and offer an implementation for hd44780_common. This implementation is used by our two hd44780 drivers. This is to make charlcd device independent. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers

[PATCH v4 00/32] Make charlcd device independent

2020-10-05 Thread poeschel
From: Lars Poeschel This tries to make charlcd device independent. At the moment hd44780 device specific code is contained deep in charlcd. This moves this out into a hd44780_common module, where the two hd44780 drivers we have at the moment (hd44780 and panel) can use this from. The goal

[PATCH v4 12/32] auxdisplay: make charlcd_backlight visible to hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel hd44780_common wants to use the charlcd_backlight function, so make it visible. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c | 3 ++- drivers/auxdisplay/charlcd.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v4 09/32] auxdisplay: provide hd44780_common_gotoxy

2020-10-05 Thread poeschel
From: Lars Poeschel Provide a hd44780_common_gotoxy function and a pointer in the ops for charlcd to use to move the cursor. Reviewed-by: Willy Tarreau Signed-off-by: Lars Poeschel --- drivers/auxdisplay/charlcd.c| 38 + drivers/auxdisplay/charlcd.h

[PATCH v4 11/32] auxdisplay: Move clear_display to hd44780_common

2020-10-05 Thread poeschel
From: Lars Poeschel This moves the clear_display function from charlcd to hd44780_common. This is one more step to make charlcd independent from device specific code. The two hd44780 drivers use the new function from hd44780_common and charlcd calls this function through its function pointer

  1   2   3   4   5   6   >