summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/boten/board.c2
-rw-r--r--board/galtic/board.c4
-rw-r--r--board/madoo/board.c4
-rw-r--r--board/magolor/board.c4
-rw-r--r--board/metaknight/board.c4
-rw-r--r--board/sasuke/board.c4
-rw-r--r--board/waddledoo/board.c4
-rw-r--r--driver/charger/isl923x.c7
-rw-r--r--driver/charger/isl923x.h3
9 files changed, 19 insertions, 17 deletions
diff --git a/board/boten/board.c b/board/boten/board.c
index 9a43b1574e..8ff385687e 100644
--- a/board/boten/board.c
+++ b/board/boten/board.c
@@ -105,7 +105,7 @@ void board_hibernate(void)
* Charger IC need to be put into their "low power mode" before
* entering the Z-state.
*/
- raa489000_hibernate(0);
+ raa489000_hibernate(0, true);
}
/* Must come after other header files and interrupt handler declarations */
diff --git a/board/galtic/board.c b/board/galtic/board.c
index 52e9c15420..0a26811b73 100644
--- a/board/galtic/board.c
+++ b/board/galtic/board.c
@@ -323,9 +323,9 @@ void board_hibernate(void)
* Put all charger ICs present into low power mode before entering
* z-state.
*/
- raa489000_hibernate(CHARGER_PRIMARY);
+ raa489000_hibernate(CHARGER_PRIMARY, true);
if (board_get_charger_chip_count() > 1)
- raa489000_hibernate(CHARGER_SECONDARY);
+ raa489000_hibernate(CHARGER_SECONDARY, true);
}
__override void board_ocpc_init(struct ocpc_data *ocpc)
diff --git a/board/madoo/board.c b/board/madoo/board.c
index c5389dfb49..7c81d18ba8 100644
--- a/board/madoo/board.c
+++ b/board/madoo/board.c
@@ -210,8 +210,8 @@ void board_hibernate(void)
* Both charger ICs need to be put into their "low power mode" before
* entering the Z-state.
*/
- raa489000_hibernate(1);
- raa489000_hibernate(0);
+ raa489000_hibernate(1, true);
+ raa489000_hibernate(0, false);
}
void board_reset_pd_mcu(void)
diff --git a/board/magolor/board.c b/board/magolor/board.c
index 82a0690db7..0fb7f72db3 100644
--- a/board/magolor/board.c
+++ b/board/magolor/board.c
@@ -248,8 +248,8 @@ void board_hibernate(void)
* Both charger ICs need to be put into their "low power mode" before
* entering the Z-state.
*/
- raa489000_hibernate(1);
- raa489000_hibernate(0);
+ raa489000_hibernate(1, true);
+ raa489000_hibernate(0, true);
}
void board_reset_pd_mcu(void)
diff --git a/board/metaknight/board.c b/board/metaknight/board.c
index 998e93162d..e5a7365c97 100644
--- a/board/metaknight/board.c
+++ b/board/metaknight/board.c
@@ -275,8 +275,8 @@ void board_hibernate(void)
* entering the Z-state.
*/
if (board_get_charger_chip_count() > 1)
- raa489000_hibernate(1);
- raa489000_hibernate(0);
+ raa489000_hibernate(1, true);
+ raa489000_hibernate(0, true);
}
void board_reset_pd_mcu(void)
diff --git a/board/sasuke/board.c b/board/sasuke/board.c
index 2720295d14..e7e4bfd820 100644
--- a/board/sasuke/board.c
+++ b/board/sasuke/board.c
@@ -237,8 +237,8 @@ void board_hibernate(void)
* entering the Z-state.
*/
if (board_get_charger_chip_count() > 1)
- raa489000_hibernate(1);
- raa489000_hibernate(0);
+ raa489000_hibernate(1, true);
+ raa489000_hibernate(0, true);
}
/* USB-A charging control */
diff --git a/board/waddledoo/board.c b/board/waddledoo/board.c
index d173a6019f..0bdcb2b684 100644
--- a/board/waddledoo/board.c
+++ b/board/waddledoo/board.c
@@ -230,8 +230,8 @@ void board_hibernate(void)
* entering the Z-state.
*/
if (board_get_charger_chip_count() > 1)
- raa489000_hibernate(1);
- raa489000_hibernate(0);
+ raa489000_hibernate(1, true);
+ raa489000_hibernate(0, true);
}
void board_reset_pd_mcu(void)
diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c
index dbe6354476..e6e3042cb7 100644
--- a/driver/charger/isl923x.c
+++ b/driver/charger/isl923x.c
@@ -767,7 +767,7 @@ out:
}
#ifdef CONFIG_CHARGER_RAA489000
-void raa489000_hibernate(int chgnum)
+void raa489000_hibernate(int chgnum, bool disable_adc)
{
int rv, regval;
@@ -813,8 +813,9 @@ void raa489000_hibernate(int chgnum)
rv = raw_read16(chgnum, ISL9238_REG_CONTROL3, &regval);
if (!rv) {
- /* ADC is active only when adapter plugged in */
- regval &= ~RAA489000_ENABLE_ADC;
+ if (disable_adc)
+ /* ADC is active only when adapter plugged in */
+ regval &= ~RAA489000_ENABLE_ADC;
rv = raw_write16(chgnum, ISL9238_REG_CONTROL3, regval);
}
diff --git a/driver/charger/isl923x.h b/driver/charger/isl923x.h
index 0ae8327ed4..5da8649c38 100644
--- a/driver/charger/isl923x.h
+++ b/driver/charger/isl923x.h
@@ -9,6 +9,7 @@
#ifndef __CROS_EC_ISL923X_H
#define __CROS_EC_ISL923X_H
+#include "stdbool.h"
#define ISL923X_ADDR_FLAGS (0x09)
/* Registers */
@@ -378,7 +379,7 @@ int isl923x_set_comparator_inversion(int chgnum, int invert);
*
* @param chgnum index into chg_chips table.
*/
-void raa489000_hibernate(int chgnum);
+void raa489000_hibernate(int chgnum, bool disable_adc);
enum ec_error_list isl9238c_hibernate(int chgnum);
enum ec_error_list isl9238c_resume(int chgnum);