diff --git a/drivers/misc/cs40l2x.c b/drivers/misc/cs40l2x.c index e03cb6f94982..13123b28de2b 100644 --- a/drivers/misc/cs40l2x.c +++ b/drivers/misc/cs40l2x.c @@ -2132,6 +2132,15 @@ static int cs40l2x_init(struct cs40l2x_private *cs40l2x) return ret; } + ret = regmap_update_bits(regmap, CS40L2X_DSP1_RX4_SRC, + CS40L2X_DSP1_RXn_SRC_MASK, + CS40L2X_DSP1_RXn_SRC_VPMON + << CS40L2X_DSP1_RXn_SRC_SHIFT); + if (ret) { + dev_err(dev, "Failed to route battery monitor to DSP\n"); + return ret; + } + return 0; } diff --git a/drivers/misc/cs40l2x.h b/drivers/misc/cs40l2x.h index 654ac83e50b1..6ac166517266 100644 --- a/drivers/misc/cs40l2x.h +++ b/drivers/misc/cs40l2x.h @@ -592,6 +592,7 @@ #define CS40L2X_DSP1_RXn_SRC_SHIFT 0 #define CS40L2X_DSP1_RXn_SRC_VMON 0x18 #define CS40L2X_DSP1_RXn_SRC_IMON 0x19 +#define CS40L2X_DSP1_RXn_SRC_VPMON 0x28 #define CS40L2X_DSP1_RESET_MASK 0x200 #define CS40L2X_DSP1_RESET_SHIFT 9