summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--baseboard/volteer/charger.c2
-rw-r--r--driver/charger/isl9241.h27
-rw-r--r--include/driver/charger/isl9241_public.h38
3 files changed, 40 insertions, 27 deletions
diff --git a/baseboard/volteer/charger.c b/baseboard/volteer/charger.c
index c3f26dc081..aced8fc67b 100644
--- a/baseboard/volteer/charger.c
+++ b/baseboard/volteer/charger.c
@@ -6,7 +6,7 @@
/* Volteer family-specific configuration */
#include "common.h"
#include "charger.h"
-#include "driver/charger/isl9241.h"
+#include "driver/charger/isl9241_public.h"
/* Charger Chip Configuration */
const struct charger_config_t chg_chips[] = {
diff --git a/driver/charger/isl9241.h b/driver/charger/isl9241.h
index 0717a6237d..7beaf8ac33 100644
--- a/driver/charger/isl9241.h
+++ b/driver/charger/isl9241.h
@@ -8,7 +8,7 @@
#ifndef __CROS_EC_ISL9241_H
#define __CROS_EC_ISL9241_H
-#define ISL9241_ADDR_FLAGS 0x09
+#include "driver/charger/isl9241_public.h"
#define CHARGER_NAME "ISL9241"
#define CHARGE_V_MAX 18304
@@ -128,29 +128,4 @@
#define ISL9241_VIN_ADC_BIT_OFFSET 6
#define ISL9241_VIN_ADC_STEP_MV 96
-extern const struct charger_drv isl9241_drv;
-
-/**
- * Set AC prochot threshold
- *
- * @param chgnum: Index into charger chips
- * @param ma: AC prochot threshold current in mA, multiple of 128mA
- * @return EC_SUCCESS or error
- */
-int isl9241_set_ac_prochot(int chgnum, int ma);
-
-/**
- * Set DC prochot threshold
- *
- * @param chgnum: Index into charger chips
- * @param ma: DC prochot threshold current in mA, multiple of 256mA
- * @return EC_SUCCESS or error
- */
-int isl9241_set_dc_prochot(int chgnum, int ma);
-
-#define ISL9241_AC_PROCHOT_CURRENT_MIN 128 /* mA */
-#define ISL9241_AC_PROCHOT_CURRENT_MAX 6400 /* mA */
-#define ISL9241_DC_PROCHOT_CURRENT_MIN 256 /* mA */
-#define ISL9241_DC_PROCHOT_CURRENT_MAX 12800 /* mA */
-
#endif /* __CROS_EC_ISL9241_H */
diff --git a/include/driver/charger/isl9241_public.h b/include/driver/charger/isl9241_public.h
new file mode 100644
index 0000000000..14eb0db5ec
--- /dev/null
+++ b/include/driver/charger/isl9241_public.h
@@ -0,0 +1,38 @@
+/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * Renesas (Intersil) ISL-9241 battery charger public header
+ */
+
+#ifndef __CROS_EC_DRIVER_CHARGER_ISL9241_PUBLIC_H
+#define __CROS_EC_DRIVER_CHARGER_ISL9241_PUBLIC_H
+
+#define ISL9241_ADDR_FLAGS 0x09
+
+extern const struct charger_drv isl9241_drv;
+
+/**
+ * Set AC prochot threshold
+ *
+ * @param chgnum: Index into charger chips
+ * @param ma: AC prochot threshold current in mA, multiple of 128mA
+ * @return EC_SUCCESS or error
+ */
+int isl9241_set_ac_prochot(int chgnum, int ma);
+
+/**
+ * Set DC prochot threshold
+ *
+ * @param chgnum: Index into charger chips
+ * @param ma: DC prochot threshold current in mA, multiple of 256mA
+ * @return EC_SUCCESS or error
+ */
+int isl9241_set_dc_prochot(int chgnum, int ma);
+
+#define ISL9241_AC_PROCHOT_CURRENT_MIN 128 /* mA */
+#define ISL9241_AC_PROCHOT_CURRENT_MAX 6400 /* mA */
+#define ISL9241_DC_PROCHOT_CURRENT_MIN 256 /* mA */
+#define ISL9241_DC_PROCHOT_CURRENT_MAX 12800 /* mA */
+
+#endif /* __CROS_EC_DRIVER_CHARGER_ISL9241_PUBLIC_H */