staging: panel: fix lcd type
PATCH 1/1 staging: panel: fix lcd type
the lcd type as defined in the Kconfig is not matching in the code. as a result the rs, rw and en pins were getting interchanged. Kconfig defines the value of PANEL_LCD to be 1 if we select custom configuration but in the code LCD_TYPE_CUSTOM is defined as 5.
my hardware is LCD_TYPE_CUSTOM, but the pins were assigned to it as pins of LCD_TYPE_OLD, and it was not working.
Now values are corrected with referenece to the values defined in Kconfig and it is working.
checked on JHD204A lcd with LCD_TYPE_CUSTOM configuration.
---
I traced the code till 2.6.32.2 and it was same problem in lcd_init(), it can work only if we have configured for custom lcd type with connections similar to the connections of LCD_TYPE_OLD.
drivers/staging/panel/panel.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/panel/panel.c +5 -5
@@ -314,11 +314,11 @@ static unsigned char lcd_bits[LCD_PORTS][LCD_BITS][BIT_STATES];* LCD types */ #define LCD_TYPE_NONE 0 -#define LCD_TYPE_OLD 1 -#define LCD_TYPE_KS0074 2 -#define LCD_TYPE_HANTRONIX 3 -#define LCD_TYPE_NEXCOM 4 -#define LCD_TYPE_CUSTOM 5 +#define LCD_TYPE_CUSTOM 1 +#define LCD_TYPE_OLD 2 +#define LCD_TYPE_KS0074 3 +#define LCD_TYPE_HANTRONIX 4 +#define LCD_TYPE_NEXCOM 5/* * keypad types
Signature · 1 line
1.8.1.2
Hi Sudip!
Quoted 5 lines · Sudip Mukherjee
the lcd type as defined in the
Kconfigis not matching in the code. as a result the rs, rw and en pins were getting interchanged.Kconfigdefines the value ofPANEL_LCDto be 1 if we select custom configuration but in the codeLCD_TYPE_CUSTOMis defined as 5.
Quoted 7 lines
my hardware is
LCD_TYPE_CUSTOM, but the pins were assigned to it as pins ofLCD_TYPE_OLD, and it was not working.
Now values are corrected with referenece to the values defined inKconfigand it is working.
checked on JHD204A lcd withLCD_TYPE_CUSTOMconfiguration.Signed-off-by Sudip Mukherjee <[email protected]>
OK but you also need to hange the MODULE_PARM_DESC(lcd_type) to match these new settings. Given that this is a bug, you can even think about adding a Cc: stable tag.
Thanks,
Willy
Quoted 14 lines · Willy Tarreau
Hi Sudip!
Quoted 11 lines · Sudip Mukherjee
the lcd type as defined in the
Kconfigis not matching in the code. as a result the rs, rw and en pins were getting interchanged.Kconfigdefines the value ofPANEL_LCDto be 1 if we select custom configuration but in the codeLCD_TYPE_CUSTOMis defined as 5.my hardware is
LCD_TYPE_CUSTOM, but the pins were assigned to it as pins ofLCD_TYPE_OLD, and it was not working.
Now values are corrected with referenece to the values defined inKconfigand it is working.
checked on JHD204A lcd withLCD_TYPE_CUSTOMconfiguration.
Quoted 5 lines
Quoted 1 line
Signed-off-by Sudip Mukherjee <[email protected]>OK but you also need to hange the
MODULE_PARM_DESC(lcd_type)to match these new settings. Given that this is a bug, you can even think about adding a Cc: stable tag.
i missed seeing that MODULE_PARM_DESC. i wanted to have your confirmation first before ccing stable.
will cc stable in v2.
but before that i think i need to read the Documentation about how to cc stable for those many stable versions till 2.6.32
regards
sudip
Quoted 4 lines
Thanks,
Willy
Quoted 20 lines · Sudip Mukherjee
Quoted 14 lines · Willy Tarreau
Hi Sudip!
Quoted 11 lines · Sudip Mukherjee
the lcd type as defined in the
Kconfigis not matching in the code. as a result the rs, rw and en pins were getting interchanged.Kconfigdefines the value ofPANEL_LCDto be 1 if we select custom configuration but in the codeLCD_TYPE_CUSTOMis defined as 5.my hardware is
LCD_TYPE_CUSTOM, but the pins were assigned to it as pins ofLCD_TYPE_OLD, and it was not working.
Now values are corrected with referenece to the values defined inKconfigand it is working.
checked on JHD204A lcd withLCD_TYPE_CUSTOMconfiguration.Quoted 5 lines
Quoted 1 line
Signed-off-by Sudip Mukherjee <[email protected]>OK but you also need to hange the
MODULE_PARM_DESC(lcd_type)to match these new settings. Given that this is a bug, you can even think about adding a Cc: stable tag.
Quoted 6 lines
i missed seeing that
MODULE_PARM_DESC. i wanted to have your confirmation first before ccing stable.will cc stable in v2.
but before that i think i need to read the Documentation about how to cc stable for those many stable versions till 2.6.32
Just put this before your signed-off-by at the bottom fo the commit message :
Willy