Skip to contentSkip to conversation

mfd: wm8994: Allow to configure Speaker Mode Pullup from dts

PATCH Applied Anthony Brandon 4 participants 15 messages Jul 9, 2018 – Jul 16, 2018 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v2 1/4 dt-bindings: sound: wm8994: document wlf,spkmode-pu property

Add the wlf,spkmode-pu property to control the Speaker Mode pull-up from the device tree.

---
 Documentation/devicetree/bindings/sound/wm8994.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/sound/wm8994.txt +3 -0
index 4a9dead..b74a221 100644
@@ -57,6 +57,9 @@ Optional properties:
 
   - wlf,ldoena-always-driven : If present LDOENA is always driven.
 
+  - wlf,spkmode-pu : If present enable the internal pull-up resistor on
+    the SPKMODE pin.
+
 Example:
 
 wm8994: codec@1a {
Signature · 1 line
2.7.4
#2 lore raw

PATCH v2 2/4 mfd: wm8994: Allow to configure Speaker Mode Pullup from dts

From: Alberto Panizzo <[email protected]>

Configuring Speaker Mode Pullup was already supported in pdata, but not in the dts.

---
 drivers/mfd/wm8994-core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/wm8994-core.c +2 -0
index a944841..fa4b1b7 100644
@@ -302,6 +302,8 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994)
 	if (of_find_property(np, "wlf,ldoena-always-driven", NULL))
 		pdata->lineout2fb = true;
 
+	pdata->spkmode_pu = of_property_read_bool(np, "wlf,spkmode-pu");
+
 	pdata->ldo[0].enable = of_get_named_gpio(np, "wlf,ldo1ena", 0);
 	if (pdata->ldo[0].enable < 0)
 		pdata->ldo[0].enable = 0;
Signature · 1 line
2.7.4
Applied
#4 lore raw
In reply to Anthony Brandon
Quoted 10 lines · Anthony Brandon

From: Alberto Panizzo <[email protected]>

Configuring Speaker Mode Pullup was already supported in pdata, but not in the dts.

---
 drivers/mfd/wm8994-core.c | 2 ++
 1 file changed, 2 insertions(+)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#5 lore raw

PATCH v2 3/4 dt-bindings: sound: wm8994: document wlf,csnaddr-pd property

In reply to Anthony Brandon

Add the wlf,csnaddr-pd property to allow the CS/Addr pull-down to be controlled from the device tree.

---
 Documentation/devicetree/bindings/sound/wm8994.txt | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/sound/wm8994.txt +3 -0
index b74a221..0795931 100644
@@ -60,6 +60,9 @@ Optional properties:
   - wlf,spkmode-pu : If present enable the internal pull-up resistor on
     the SPKMODE pin.
 
+  - wlf,csnaddr-pd : If present enable the internal pull-down resistor on
+    the CS/ADDR pin.
+
 Example:
 
 wm8994: codec@1a {
Signature · 1 line
2.7.4
maintainer Reviewed-by on v2 3/4
#7 lore raw

Re: [PATCH v2 3/4] dt-bindings: sound: wm8994: document wlf,csnaddr-pd property

In reply to Anthony Brandon
Quoted 7 lines · Anthony Brandon

Add the wlf,csnaddr-pd property to allow the CS/Addr pull-down to be controlled from the device tree.

---
 Documentation/devicetree/bindings/sound/wm8994.txt | 3 +++
 1 file changed, 3 insertions(+)
#8 lore raw

PATCH v2 4/4 mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts

In reply to Anthony Brandon

From: Alberto Panizzo <[email protected]>

For designs where CS/ADDR pin is floating, it is useful to allow dts to define whether to keep internal pull down or not.

---
 drivers/mfd/wm8994-core.c        | 4 ++++
 include/linux/mfd/wm8994/pdata.h | 6 ++++++
 2 files changed, 10 insertions(+)
drivers/mfd/wm8994-core.c +4 -0
index fa4b1b7..22bd652 100644
@@ -304,6 +304,8 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994)
 
 	pdata->spkmode_pu = of_property_read_bool(np, "wlf,spkmode-pu");
 
+	pdata->csnaddr_pd = of_property_read_bool(np, "wlf,csnaddr-pd");
+
 	pdata->ldo[0].enable = of_get_named_gpio(np, "wlf,ldo1ena", 0);
 	if (pdata->ldo[0].enable < 0)
 		pdata->ldo[0].enable = 0;
@@ -562,6 +564,8 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
 
 	if (pdata->spkmode_pu)
 		pulls |= WM8994_SPKMODE_PU;
+	if (pdata->csnaddr_pd)
+		pulls |= WM8994_CSNADDR_PD;
 
 	/* Disable unneeded pulls */
 	wm8994_set_bits(wm8994, WM8994_PULL_CONTROL_2,
include/linux/mfd/wm8994/pdata.h +6 -0
index 90c6052..b19c370 100644
@@ -222,6 +222,12 @@ struct wm8994_pdata {
 	 */
 	bool spkmode_pu;
 
+	/*
+	 * CS/ADDR must be pulled internally by the device on this
+	 * system.
+	 */
+	bool csnaddr_pd;
+
 	/**
 	 * Maximum number of channels clocks will be generated for,
 	 * useful for systems where and I2S bus with multiple data
Signature · 1 line
2.7.4
Acked-by on v2 4/4
#9 lore raw

Re: [PATCH v2 4/4] mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts

Quoted 8 lines · Anthony Brandon

From: Alberto Panizzo <[email protected]>

For designs where CS/ADDR pin is floating, it is useful to allow dts to define whether to keep internal pull down or not.

---

Thanks,
Charles

Applied
#10 lore raw

Re: [PATCH v2 4/4] mfd: wm8994: Allow to configure CS/ADDR Pulldown from dts

In reply to Anthony Brandon
Quoted 11 lines · Anthony Brandon

From: Alberto Panizzo <[email protected]>

For designs where CS/ADDR pin is floating, it is useful to allow dts to define whether to keep internal pull down or not.

---
 drivers/mfd/wm8994-core.c        | 4 ++++
 include/linux/mfd/wm8994/pdata.h | 6 ++++++
 2 files changed, 10 insertions(+)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#13 lore raw

Re: [PATCH v2 1/4] dt-bindings: sound: wm8994: document wlf,spkmode-pu property

Hi,

Is there anything more I can do to get this (and patch 3/4) applied? Or just wait a bit longer?
I'm asking because I noticed that changes 2 and 4 have been applied but these have not.

Regards,
Anthony

Quoted 10 lines · Rob Herring
Quoted 7 lines · Anthony Brandon

Add the wlf,spkmode-pu property to control the Speaker Mode pull-up from the device tree.

---
 Documentation/devicetree/bindings/sound/wm8994.txt | 3 +++
 1 file changed, 3 insertions(+)
maintainer
#14 lore raw

Re: [PATCH v2 1/4] dt-bindings: sound: wm8994: document wlf,spkmode-pu property

Quoted 7 lines · Anthony Brandon

Hi,

Is there anything more I can do to get this (and patch 3/4) applied? Or just wait a bit longer?
I'm asking because I noticed that changes 2 and 4 have been applied but these have not.

That's probably because you didn't CC Mark and alsa ML on these. Normally a series goes in together.

Anyways, I can apply them if there's no other changes to this file for 4.19.

Rob

#15 lore raw

Re: [PATCH v2 1/4] dt-bindings: sound: wm8994: document wlf,spkmode-pu property

Quoted 10 lines · Rob Herring
Quoted 7 lines · Anthony Brandon

Hi,

Is there anything more I can do to get this (and patch 3/4) applied? Or just wait a bit longer?
I'm asking because I noticed that changes 2 and 4 have been applied but these have not.

Quoted 6 lines

That's probably because you didn't CC Mark and alsa ML on these. Normally a series goes in together.

Anyways, I can apply them if there's no other changes to this file for 4.19.

Rob

Thanks, I understand. I'll keep that in mind for next time.

Regards,
Anthony