misc: cs40l2x: Route VPMON to DSP

Routed the battery monitoring ADC output (VPMON) to the DSP in support
of DSP algorithms that may query the battery voltage.

Change-Id: I8d83ed6a3f8ad7f0d985406eb4ef4038760151ca
Signed-off-by: Jeff LaBundy <jeff.labundy@cirrus.com>
Signed-off-by: Ravi Vembu <raviv@motorola.com>
This commit is contained in:
Jeff LaBundy 2018-04-26 10:52:23 -05:00 • committed by a7301c
commit 04b908a357
2 changed files with 10 additions and 0 deletions

View file

@ -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;
}

View file

@ -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