diff options
author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2020-05-11 15:25:41 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-05-18 14:34:53 +0100 |
commit | b2a378816d0f6780a5500f4322e5b2542d41532d (patch) | |
tree | 55c987d25e2e4ecc65870ad9108bd6a3932fbb70 /sound/soc/codecs/da7213.h | |
parent | 95579eaf98f17b97dc174bb31d71902b5895bd85 (diff) |
ASoC: da7213: Add regulator support
This adds support for most regulators of da7212 for improved
power management. The only thing skipped was the speaker supply,
which has some undocumented dependencies. It's supposed to be
either always-enabled or always-disabled.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/20200511132544.82364-3-sebastian.reichel@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7213.h')
-rw-r--r-- | sound/soc/codecs/da7213.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7213.h b/sound/soc/codecs/da7213.h index 3250a3821fcc..3890829dfb6e 100644 --- a/sound/soc/codecs/da7213.h +++ b/sound/soc/codecs/da7213.h @@ -12,6 +12,7 @@ #include <linux/clk.h> #include <linux/regmap.h> +#include <linux/regulator/consumer.h> #include <sound/da7213.h> /* @@ -521,9 +522,17 @@ enum da7213_sys_clk { DA7213_SYSCLK_PLL_32KHZ }; +/* Regulators */ +enum da7213_supplies { + DA7213_SUPPLY_VDDA = 0, + DA7213_SUPPLY_VDDIO, + DA7213_NUM_SUPPLIES, +}; + /* Codec private data */ struct da7213_priv { struct regmap *regmap; + struct regulator_bulk_data supplies[DA7213_NUM_SUPPLIES]; struct clk *mclk; unsigned int mclk_rate; int clk_src; |