mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
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:
parent
98d5fb77b8
commit
04b908a357
2 changed files with 10 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue