Skip to contentSkip to conversation

mfd: arizona: Add DT binding for setting 32kHz clock source

PATCH In review Charles Keepax 2 participants 11 messages Feb 28, 2015 – Mar 2, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 mfd: arizona: Add DT binding for setting 32kHz clock source

From: Richard Fitzgerald <[email protected]>

---
 drivers/mfd/arizona-core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mfd/arizona-core.c +3 -0
index 09ba8f1..dddaaef 100644
@@ -552,6 +552,9 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 			ret);
 	}
 
+	of_property_read_u32(arizona->dev->of_node, "wlf,clk32k-src",
+			     &pdata->clk32k_src);
+
 	of_property_for_each_u32(arizona->dev->of_node, "wlf,inmode", prop,
 				 cur, val) {
 		if (count == ARRAY_SIZE(arizona->pdata.inmode))
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 2/5 mfd: arizona: Add DT binding documentation for CODEC 32k clock source

---
 Documentation/devicetree/bindings/mfd/arizona.txt |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
Documentation/devicetree/bindings/mfd/arizona.txt +5 -0
index bfef000..7ca7c1f 100644
@@ -36,6 +36,11 @@ Optional properties:
   - wlf,reset : GPIO specifier for the GPIO controlling /RESET
   - wlf,ldoena : GPIO specifier for the GPIO controlling LDOENA
 
+  - wlf,clk32k-src : Set input source for the CODEC 32kHz clock. This can be
+    set to None (will be derived internally from SYSCLK), MCLK1, or MCLK2.
+    Defines (ARIZONA_32KZ_xxxx) can be found in <dt-bindings/mfd/arizona.txt>.
+    The default if this entry is not present is MCLK2.
+
   - wlf,gpio-defaults : A list of GPIO configuration register values. Defines
     for the appropriate values can found in <dt-bindings/mfd/arizona.txt>. If
     absent, no configuration of these registers is performed. If any entry has
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 3/5 mfd: arizona: Add DT binding for the DMIC references

In reply to Charles Keepax
---
 drivers/mfd/arizona-core.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/mfd/arizona-core.c +10 -0
index dddaaef..6002ce9 100644
@@ -564,6 +564,16 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 		count++;
 	}
 
+	count = 0;
+	of_property_for_each_u32(arizona->dev->of_node, "wlf,dmic-ref", prop,
+				 cur, val) {
+		if (count == ARRAY_SIZE(arizona->pdata.dmic_ref))
+			break;
+
+		arizona->pdata.dmic_ref[count] = val;
+		count++;
+	}
+
 	return 0;
 }
 
Signature · 1 line
1.7.2.5
#3 lore raw

Re: [PATCH 3/5] mfd: arizona: Add DT binding for the DMIC references

Quoted 4 lines · Charles Keepax
---
 drivers/mfd/arizona-core.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Same here. Requires DT/Clk Ack.

Quoted 21 lines
drivers/mfd/arizona-core.c +10 -0
index dddaaef..6002ce9 100644
@@ -564,6 +564,16 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 		count++;
 	}
 
+	count = 0;
+	of_property_for_each_u32(arizona->dev->of_node, "wlf,dmic-ref", prop,
+				 cur, val) {
+		if (count == ARRAY_SIZE(arizona->pdata.dmic_ref))
+			break;
+
+		arizona->pdata.dmic_ref[count] = val;
+		count++;
+	}
+
 	return 0;
 }
 
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#4 lore raw

Re: [PATCH 3/5] mfd: arizona: Add DT binding for the DMIC references

Quoted 8 lines · Lee Jones
Quoted 4 lines · Charles Keepax
---
 drivers/mfd/arizona-core.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

Same here. Requires DT/Clk Ack.

This specifies the reference voltage rather than clock so probably a clk ack is not appropriate, I guess that means I should perhaps add some clarification to the commit message though.

Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

PATCH 4/5 mfd: arizona: Add DT binding documentation for DMIC references

In reply to Charles Keepax
---
 Documentation/devicetree/bindings/mfd/arizona.txt |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
Documentation/devicetree/bindings/mfd/arizona.txt +6 -0
index 7ca7c1f..8709f07 100644
@@ -54,6 +54,12 @@ Optional properties:
     input singals. If values less than the number of input signals, elements
     that has not been specifed are set to 0 by default.
 
+  - wlf,dmic-ref : DMIC reference for each input, can be selected from either
+    MICVDD or one of the MICBIAS's, defines (ARIZONA_DMIC_xxxx) are provided
+    in <dt-bindings/mfd/arizona.txt>. If present, the number of values should
+    be less than or equal to the number of inputs, unspecified inputs will
+    use the chip default.
+
   - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if
     they are being externally supplied. As covered in
     Documentation/devicetree/bindings/regulator/regulator.txt
Signature · 1 line
1.7.2.5
#6 lore raw

PATCH 5/5 mfd: arizona: Update DT binding documentation for inmode

In reply to Charles Keepax

Update the DT binding documentation for the inmode binding to mention the new defines and clarify the text slightly.

---
 Documentation/devicetree/bindings/mfd/arizona.txt |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/mfd/arizona.txt +5 -6
index 8709f07..f5afa69 100644
@@ -47,12 +47,11 @@ Optional properties:
     a value that is out of range for a 16 bit register then the chip default
     will be used. If present exactly five values must be specified.
 
-  - wlf,inmode : A list of INn_MODE register values, where n is the number
-    of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
-    2 (Digital Microphone). If absent, INn_MODE registers set to 0 by default.
-    If present, values must be specified less than or equal to the number of
-    input singals. If values less than the number of input signals, elements
-    that has not been specifed are set to 0 by default.
+  - wlf,inmode : A list of the mode for each input. Each input can be set to
+    differential, single-ended or a digital microphone. Defines for all values
+    (ARIZONA_INMODE_xxxx) are located in <dt-bindings/mfd/arizona.txt>. If
+    present, the number of values should be less than or equal to the number
+    of inputs, unspecified inputs will use the chip default.
 
   - wlf,dmic-ref : DMIC reference for each input, can be selected from either
     MICVDD or one of the MICBIAS's, defines (ARIZONA_DMIC_xxxx) are provided
Signature · 6 lines
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
In reply to Charles Keepax
Quoted 7 lines · Charles Keepax

From: Richard Fitzgerald <rf-yzvPICuk2AATkU/[email protected]>

---
 drivers/mfd/arizona-core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Requires a DT, or at least a Clk Ack.

Quoted 14 lines
drivers/mfd/arizona-core.c +3 -0
index 09ba8f1..dddaaef 100644
@@ -552,6 +552,9 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 			ret);
 	}
 
+	of_property_read_u32(arizona->dev->of_node, "wlf,clk32k-src",
+			     &pdata->clk32k_src);
+
 	of_property_for_each_u32(arizona->dev->of_node, "wlf,inmode", prop,
 				 cur, val) {
 		if (count == ARRAY_SIZE(arizona->pdata.inmode))
Signature · 8 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
In reply to Charles Keepax

Charles,

Why have you started using my kernel.org email address?

Where did you even get it from?

Please use my linaro.org one for MFD.

Kind regards,
Lee

Quoted 22 lines · Charles Keepax

From: Richard Fitzgerald <[email protected]>

---
 drivers/mfd/arizona-core.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mfd/arizona-core.c +3 -0
index 09ba8f1..dddaaef 100644
@@ -552,6 +552,9 @@ static int arizona_of_get_core_pdata(struct arizona *arizona)
 			ret);
 	}
 
+	of_property_read_u32(arizona->dev->of_node, "wlf,clk32k-src",
+			     &pdata->clk32k_src);
+
 	of_property_for_each_u32(arizona->dev->of_node, "wlf,inmode", prop,
 				 cur, val) {
 		if (count == ARRAY_SIZE(arizona->pdata.inmode))
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#9 lore raw
Quoted 10 lines · Lee Jones

Charles,

Why have you started using my kernel.org email address?

Where did you even get it from?

Please use my linaro.org one for MFD.

Kind regards,
Lee

Apologies I had assumed you have moved over to using that email address I will switch back to using the Linaro one.

Thanks,
Charles

#10 lore raw
Quoted 7 lines · Charles Keepax
Quoted 6 lines · Lee Jones

Charles,

Why have you started using my kernel.org email address?

Where did you even get it from?

Quoted 7 lines
Quoted 4 lines

Please use my linaro.org one for MFD.

Kind regards,
Lee

Apologies I had assumed you have moved over to using that email address I will switch back to using the Linaro one.

It's better to assume MAINTAINERS is correct (until it isn't). ;)

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog