backlight: Fix blanking for LMS283GF05 LCD
Subsystems (2)
PATCH 1/2 backlight: Fix blanking for LMS283GF05 LCD
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in every case but POWERDOWN.
--- drivers/video/backlight/lms283gf05.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/lms283gf05.c +1 -1
@@ -129,7 +129,7 @@ static int lms283gf05_power_set(struct lcd_device *ld, int power)struct spi_device *spi = st->spi;struct lms283gf05_pdata *pdata = spi->dev.platform_data; -if (power) { +if (power <FB_BLANK_POWERDOWN ) {if (pdata)lms283gf05_reset (pdata->reset_gpio, pdata->reset_inverted);
Signature · 1 line
1.7.1
PATCH 2/2 backlight: Fix blanking for L4F00242T03 LCD
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in every case but POWERDOWN.
--- drivers/video/backlight/l4f00242t03.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/backlight/l4f00242t03.c +1 -1
@@ -78,7 +78,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)const u16 slpin =0x10 ;const u16 disoff =0x28 ; -if (power) { +if (power <FB_BLANK_POWERDOWN ) {if (priv->lcd_on)return 0 ;
Signature · 1 line
1.7.1
PATCH 2/2 backlight: Fix blanking for L4F00242T03 LCD
Quoted 4 lines · Marek Vasut
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in every case but POWERDOWN.
Signed-off-by Marek Vasut <[email protected]>
Ack
Quoted 9 lines
--- drivers/video/backlight/l4f00242t03.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/video/backlight/l4f00242t03.c +0
-0
drivers/video/backlight/l4f00242t03.c static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power) · line 84
Quoted 8 lines
drivers/video/backlight/l4f00242t03.c +1
-1@@ -78,7 +78,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)const u16 slpin =0x10 ;const u16 disoff =0x28 ; -if (power) { +if (power <FB_BLANK_POWERDOWN ) {if (priv->lcd_on)return 0 ;
lcd.h states:
struct lcd_ops {
/* Get the LCD panel power status (0: full on, 1..3: controller
power on, flat panel power off, 4: full off), see FB_BLANK_XXX */
int (*get_power)(struct lcd_device *);
/* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */
int (*set_power)(struct lcd_device *, int power);AFAIK the gray area between FB_BLANK_NORMAL and FB_BLANK_HSYNC_SUSPEND can be chosen as needs.
Why not:
+ #define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL)
...
- if (power) {
+ if (POWER_IS_ON(power)) {
if (priv->lcd_on)
return 0;
So with FB_BLANK_NORMAL the lcd is active and on -> low latencies in re-enabling the video out, but for !POWER_IS_ON(power) we will send the lcd to standby.
It have to be implemented for power == FB_BLANK_POWERDOWN to turn off the regulators of the lcd.
What do you think about?
Regards,
Signature · 4 lines
Alberto!
Be Persistent!
- Greg Kroah-Hartman (FOSDEM 2010)PATCH 2/2 backlight: Fix blanking for L4F00242T03 LCD
Dne P? 4. ?ervna 2010 09:29:43 Alberto Panizzo napsal(a):
Quoted 28 lines · Marek Vasut
Quoted 4 lines
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in every case but POWERDOWN.
Signed-off-by Marek Vasut <[email protected]>Ack
Quoted 20 lines
---
drivers/video/backlight/l4f00242t03.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/video/backlight/l4f00242t03.cindex 9093ef0..ac20b2e 100644drivers/video/backlight/l4f00242t03.c +1
-1@@ -78,7 +78,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)const u16 slpin =0x10 ;const u16 disoff =0x28 ; -if (power) { +if (power <FB_BLANK_POWERDOWN ) {if (
priv->lcd_on)
Quoted 8 lines
Quoted 1 line
return 0;
lcd.hstates:struct lcd_ops { /* Get the LCD panel power status (0: full on, 1..3: controller power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ int (*get_power)(struct lcd_device *); /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX)
*/
Quoted 16 lines
int (*set_power)(struct lcd_device *, int power);AFAIK the gray area between
FB_BLANK_NORMALandFB_BLANK_HSYNC_SUSPENDcan be chosen as needs.Why not:
+ #define
POWER_IS_ON(pwr)((pwr) <=FB_BLANK_NORMAL)...
drivers/video/backlight/l4f00242t03.c +1
-1-if (power) { +if (POWER_IS_ON (power)) {if (priv->lcd_on)return 0 ;
Quoted 8 lines
So with
FB_BLANK_NORMALthe lcd is active and on -> low latencies in re-enabling the video out, but for !POWER_IS_ON(power) we will send the lcd to standby.It have to be implemented for power ==
FB_BLANK_POWERDOWNto turn off the regulators of the lcd.What do you think about?
Thanks! I sent a new (better) version. If you want credit in it, tell me how should I add you one ;-)
Quoted 2 lines
Regards,
PATCH 2/2 backlight: Fix blanking for L4F00242T03 LCD
Quoted 58 lines · Marek Vasut
Dne P? 4. ?ervna 2010 09:29:43 Alberto Panizzo napsal(a):
Quoted 28 lines · Marek Vasut
Quoted 4 lines
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in every case but POWERDOWN.
Signed-off-by Marek Vasut <[email protected]>Ack
Quoted 20 lines
---
drivers/video/backlight/l4f00242t03.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/video/backlight/l4f00242t03.cindex 9093ef0..ac20b2e 100644drivers/video/backlight/l4f00242t03.c +1
-1@@ -78,7 +78,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)const u16 slpin =0x10 ;const u16 disoff =0x28 ; -if (power) { +if (power <FB_BLANK_POWERDOWN ) {if (
priv->lcd_on)Quoted 8 lines
Quoted 1 line
return 0;
lcd.hstates:struct lcd_ops { /* Get the LCD panel power status (0: full on, 1..3: controller power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ int (*get_power)(struct lcd_device *); /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX)*/
Quoted 20 lines
int (*set_power)(struct lcd_device *, int power);AFAIK the gray area between
FB_BLANK_NORMALandFB_BLANK_HSYNC_SUSPENDcan be chosen as needs.Why not:
+ #define
POWER_IS_ON(pwr)((pwr) <=FB_BLANK_NORMAL)...
drivers/video/backlight/l4f00242t03.c +1
-1-if (power) { +if (POWER_IS_ON (power)) {if (priv->lcd_on)return 0 ;So with
FB_BLANK_NORMALthe lcd is active and on -> low latencies in re-enabling the video out, but for !POWER_IS_ON(power) we will send the lcd to standby.
Quoted 7 lines
Quoted 4 lines
It have to be implemented for power ==
FB_BLANK_POWERDOWNto turn off the regulators of the lcd.What do you think about?
Thanks! I sent a new (better) version. If you want credit in it, tell me how should I add you one ;-)
Oh no, you have the credit on it. I admit that my L4F00242T03 is not my best driver, but soon I will work on it again ;)
Thank you for your fix!
Regards,
Signature · 4 lines
Alberto!
Be Persistent!
- Greg Kroah-Hartman (FOSDEM 2010)PATCH 2/2 backlight: Fix blanking for L4F00242T03 LCD
Dne So 5. ?ervna 2010 11:22:02 Alberto Panizzo napsal(a):
Quoted 70 lines · Marek Vasut
Quoted 69 lines
Dne P? 4. ?ervna 2010 09:29:43 Alberto Panizzo napsal(a):
Quoted 33 lines · Marek Vasut
Quoted 4 lines
The LCD was turned on if the variable power was > 0, but that was incorrect. The LCD has to be turned on in every case but POWERDOWN.
Signed-off-by Marek Vasut <[email protected]>Ack
Quoted 18 lines
---
drivers/video/backlight/l4f00242t03.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)(quoted diff) +0
-0
b/drivers/video/backlight/l4f00242t03.cindex 9093ef0..ac20b2e 100644drivers/video/backlight/l4f00242t03.c +1
-1@@ -78,7 +78,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power) const u16 slpin = 0x10;const u16 disoff =0x28 ; -if (power) { +if (power <FB_BLANK_POWERDOWN ) {drivers/video/backlight/l4f00242t03.c static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)
Quoted 3 lines
drivers/video/backlight/l4f00242t03.c +0
-0if (priv->lcd_on)return 0 ;
lcd.hstates:
structlcd_ops{Quoted 7 lines
/* Get the LCD panel power status (0: full on, 1..3: controller power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ int (*get_power)(struct lcd_device *); /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX)*/
Quoted 25 lines
int (*set_power)(struct lcd_device *, int power);AFAIK the gray area between
FB_BLANK_NORMALandFB_BLANK_HSYNC_SUSPENDcan be chosen as needs.Why not:
+ #define
POWER_IS_ON(pwr)((pwr) <=FB_BLANK_NORMAL)...
drivers/video/backlight/l4f00242t03.c +1
-1-if (power) { +if (POWER_IS_ON (power)) {if (priv->lcd_on)return 0 ;So with
FB_BLANK_NORMALthe lcd is active and on -> low latencies in re-enabling the video out, but for !POWER_IS_ON(power) we will send the lcd to standby.It have to be implemented for power ==
FB_BLANK_POWERDOWNto turn off the regulators of the lcd.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
What do you think about?
Thanks! I sent a new (better) version. If you want credit in it, tell me how should I add you one ;-)
Oh no, you have the credit on it. I admit that my L4F00242T03 is not my best driver, but soon I will work on it again ;)
You're very welcome, you did a great job!
Quoted 4 lines
Thank you for your fix!
Regards,