Skip to contentSkip to conversation

backlight: adp8860/adp8870: Fix resume

PATCH In review Lars-Peter Clausen 2 participants 2 messages Feb 19, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: adp8860/adp8870: Fix resume

Clearing the NSTBY bit in the control register also automatically clears the BLEN bit. So we need to make sure to set it again during resume, otherwise the backlight will stay off.

---
 drivers/video/backlight/adp8860_bl.c | 2 +-
 drivers/video/backlight/adp8870_bl.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/adp8860_bl.c +1 -1
index 6bb72c0..a77c9ca 100644
@@ -783,7 +783,7 @@ static int adp8860_i2c_suspend(struct i2c_client *client, pm_message_t message)
 
 static int adp8860_i2c_resume(struct i2c_client *client)
 {
-	adp8860_set_bits(client, ADP8860_MDCR, NSTBY);
+	adp8860_set_bits(client, ADP8860_MDCR, NSTBY | BLEN);
 
 	return 0;
 }
drivers/video/backlight/adp8870_bl.c +1 -1
index 63c882b..712c25a 100644
@@ -957,7 +957,7 @@ static int adp8870_i2c_suspend(struct i2c_client *client, pm_message_t message)
 
 static int adp8870_i2c_resume(struct i2c_client *client)
 {
-	adp8870_set_bits(client, ADP8870_MDCR, NSTBY);
+	adp8870_set_bits(client, ADP8870_MDCR, NSTBY | BLEN);
 
 	return 0;
 }
Signature · 1 line
1.8.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Lars-Peter Clausen

Clearing the NSTBY bit in the control register also automatically clears the BLEN bit. So we need to make sure to set it again during resume, otherwise the backlight will stay off.

Quoted 31 lines
---
  drivers/video/backlight/adp8860_bl.c | 2 +-
  drivers/video/backlight/adp8870_bl.c | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/adp8860_bl.c +1 -1
index 6bb72c0..a77c9ca 100644
@@ -783,7 +783,7 @@ static int adp8860_i2c_suspend(struct i2c_client *client, pm_message_t message)
 
  static int adp8860_i2c_resume(struct i2c_client *client)
  {
-	adp8860_set_bits(client, ADP8860_MDCR, NSTBY);
+	adp8860_set_bits(client, ADP8860_MDCR, NSTBY | BLEN);
 
  	return 0;
  }
drivers/video/backlight/adp8870_bl.c +1 -1
index 63c882b..712c25a 100644
@@ -957,7 +957,7 @@ static int adp8870_i2c_suspend(struct i2c_client *client, pm_message_t message)
 
  static int adp8870_i2c_resume(struct i2c_client *client)
  {
-	adp8870_set_bits(client, ADP8870_MDCR, NSTBY);
+	adp8870_set_bits(client, ADP8870_MDCR, NSTBY | BLEN);
 
  	return 0;
  }
Signature · 8 lines
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif