aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/max98396.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2022-06-24 12:47:08 +0200
committerMark Brown <broonie@kernel.org>2022-06-27 13:16:09 +0100
commit703ee0557f8921c96e8c42f832b3bd69b7bfb262 (patch)
treef99ee03fcd129ac5d64a03a2398ca4d3c216d5ee /sound/soc/codecs/max98396.h
parentASoC: dt-bindings: max98396: Document adi,bypass-slot-no (diff)
downloadwireguard-linux-703ee0557f8921c96e8c42f832b3bd69b7bfb262.tar.xz
wireguard-linux-703ee0557f8921c96e8c42f832b3bd69b7bfb262.zip
ASoC: max98396: add voltage regulators
The device has up to 5 potentially independent power supplies: AVDD, DVDD, DVVDIO, VBAT and PVDD. The former 3 are mandatory for the device to function. One of VBAT and PVDD should also be made available. Regulators are enabled during probe time and will stay active except when in suspend mode. Futher, the chip needs to be informed about the presence of VBAT through a bit in register 0x20a0. Signed-off-by: Daniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20220624104712.1934484-5-daniel@zonque.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98396.h')
-rw-r--r--sound/soc/codecs/max98396.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98396.h b/sound/soc/codecs/max98396.h
index 694411038597..8fa081f5d2d3 100644
--- a/sound/soc/codecs/max98396.h
+++ b/sound/soc/codecs/max98396.h
@@ -274,6 +274,9 @@
#define MAX98396_DSP_SPK_SAFE_EN_SHIFT (5)
#define MAX98396_DSP_SPK_WB_FLT_EN_SHIFT (6)
+/* MAX98396_R20A0_AMP_SUPPLY_CTL */
+#define MAX98396_AMP_SUPPLY_NOVBAT (0x1 << 0)
+
/* MAX98396_R20E0_IV_SENSE_PATH_CFG */
#define MAX98396_IV_SENSE_DCBLK_EN_MASK (0x3 << 0)
#define MAX98396_IV_SENSE_DCBLK_EN_SHIFT (0)
@@ -291,9 +294,13 @@ enum {
CODEC_TYPE_MAX98397,
};
+#define MAX98396_NUM_CORE_SUPPLIES 3
+
struct max98396_priv {
struct regmap *regmap;
struct gpio_desc *reset_gpio;
+ struct regulator_bulk_data core_supplies[MAX98396_NUM_CORE_SUPPLIES];
+ struct regulator *pvdd, *vbat;
unsigned int v_slot;
unsigned int i_slot;
unsigned int bypass_slot;