ASoC: dt-bindings: wlf,wm8960: Describe the power supplies
Subsystems (4)
PATCH 1/2 ASoC: dt-bindings: wlf,wm8960: Describe the power supplies
From: Fabio Estevam <[email protected]>
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1
Add them to bindings to improve the hardware description.
--- .../devicetree/bindings/sound/wlf,wm8960.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/sound/wlf,wm8960.yaml +20 -0
@@ -26,6 +26,21 @@ properties: '#sound-dai-cells': const: 0 + AVDD-supply: + description: Analogue supply. + + DBVDD-supply: + description: Digital Buffer Supply. + + DCVDD-supply: + description: Digital Core Supply. + + SPKVDD1-supply: + description: Supply for speaker drivers 1. + + SPKVDD2-supply: + description: Supply for speaker drivers 2. + wlf,capless: type: boolean description:
@@ -84,5 +99,10 @@ examples: wlf,hp-cfg = <3 2 3>; wlf,gpio-cfg = <1 3>; wlf,shared-lrclk; + DCVDD-supply = <®_audio>; + DBVDD-supply = <®_audio>; + AVDD-supply = <®_audio>; + SPKVDD1-supply = <®_audio>; + SPKVDD2-supply = <®_audio>; }; };
Signature · 1 line
2.34.1
PATCH 2/2 ASoC: wm8960: Add support for the power supplies
From: Fabio Estevam <[email protected]>
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1
Add support for them.
---
Hi,
I haven't tested this. The motivation for this patch is due to a schema warning on imx8m-evk.dts that says 'SPKVDD1-supply' is not a valid property.
sound/soc/codecs/wm8960.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-)
sound/soc/codecs/wm8960.c +33 -1
@@ -120,6 +120,15 @@ static bool wm8960_volatile(struct device *dev, unsigned int reg) } } +#define WM8960_NUM_SUPPLIES 5 +static const char *wm8960_supply_names[WM8960_NUM_SUPPLIES ] = { +"DCVDD" , +"DBVDD" , +"AVDD" , +"SPKVDD1" , +"SPKVDD2" , +}; +struct wm8960_priv {struct clk *mclk;struct regmap *regmap;
@@ -137,6 +146,7 @@ struct wm8960_priv {bool is_stream_in_use[2 ];struct wm8960_data pdata;ktime_t dsch_start; +struct regulator_bulk_data supplies[WM8960_NUM_SUPPLIES ]; };#define wm8960_reset (c) regmap_write(c, WM8960_RESET, 0)
@@ -1417,6 +1427,7 @@ static int wm8960_i2c_probe(struct i2c_client *i2c) {struct wm8960_data *pdata =dev_get_platdata (&i2c->dev);struct wm8960_priv *wm8960; +unsigned int i;int ret;u8 val;
@@ -1439,6 +1450,23 @@ static int wm8960_i2c_probe(struct i2c_client *i2c) } } +for (i =0 ; i <ARRAY_SIZE (wm8960->supplies); i++) + wm8960->supplies[i].supply = wm8960_supply_names[i]; + + ret =devm_regulator_bulk_get (&i2c->dev,ARRAY_SIZE (wm8960->supplies), + wm8960->supplies); +if (ret <0 ) { +dev_err (&i2c->dev,"Failed to request supplies: %d\n" , ret); +return ret; + } + + ret =regulator_bulk_enable (ARRAY_SIZE (wm8960->supplies), + wm8960->supplies); +if (ret <0 ) { +dev_err (&i2c->dev,"Failed to enable supplies: %d\n" , ret); +return ret; + } + wm8960->regmap =devm_regmap_init_i2c (i2c, &wm8960_regmap);if (IS_ERR (wm8960->regmap))return PTR_ERR (wm8960->regmap);
@@ -1505,7 +1533,11 @@ static int wm8960_i2c_probe(struct i2c_client *i2c) }static void wm8960_i2c_remove (struct i2c_client *client) -{} +{ +struct wm8960_priv *wm8960 =i2c_get_clientdata (client); + +regulator_bulk_disable (ARRAY_SIZE (wm8960->supplies), wm8960->supplies); +}static const struct i2c_device_id wm8960_i2c_id[] = { {"wm8960" ,0 },
Signature · 1 line
2.34.1
Re: [PATCH 2/2] ASoC: wm8960: Add support for the power supplies
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1
Quoted 4 lines
Add support for them.
Signed-off-by Fabio Estevam <[email protected]>---
Thanks,
Charles
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1
Quoted 4 lines
Add them to bindings to improve the hardware description.
Signed-off-by Fabio Estevam <[email protected]>---
Thanks,
Charles
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1
Quoted 3 lines
Add them to bindings to improve the hardware description.
Signed-off-by Fabio Estevam <[email protected]>
Thanks,
Conor.
Mark Brown
maintainerQuoted 9 lines · Fabio Estevam
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: wlf,wm8960: Describe the power supplies
commit: 6a41c3a1606089bdf7f8da2b267d1d82fb32b378
[2/2] ASoC: wm8960: Add support for the power supplies
commit: 422f10adc3eb5a7ff8567bf6e6590a4e4fa756c3All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark
Quoted 11 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
WM8960 has the following power supplies:
- AVDD
- DBVDD
- DCVDD
- SPKVDD1
- SPKVDD1Add them to bindings to improve the hardware description.
Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
You missed at least DT list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time, thus I will skip this patch entirely till you follow the process allowing the patch to be tested.
Please kindly resend and include all necessary To/Cc entries.
Best regards,
Krzysztof