linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] arm64: dts: qcom: pm8998: Add ADC node and die temperature channel
@ 2018-09-10 16:02 Matthias Kaehlcke
  2018-09-10 16:02 ` [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg' Matthias Kaehlcke
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Matthias Kaehlcke @ 2018-09-10 16:02 UTC (permalink / raw)
  To: Andy Gross, David Brown, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler
  Cc: linux-arm-msm, linux-soc, devicetree, linux-arm-kernel,
	linux-kernel, linux-iio, Douglas Anderson, Matthias Kaehlcke

This series adds the DT node for the QCOM SPMI PMIC5 ADC and a channel
for the die temperature.

The die temperature is going to be used by the temperature alarm driver
(https://lore.kernel.org/patchwork/project/lkml/list/?series=361416).

The driver for the QCOM SPMI PMIC5 ADC landed in the 'testing' branch of the
'iio' tree:

https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=testing&id=e13d757279bbc59776c8435fb94e54b5a58bdd0b

Matthias Kaehlcke (3):
  dt-bindings: iio: vadc: Fix documentation of 'reg'
  arm64: dts: qcom: pm8998: Add adc node
  arm64: dts: qcom: pm8998: Add die temperature channel node to the ADC

 .../bindings/iio/adc/qcom,spmi-vadc.txt         |  4 ++--
 arch/arm64/boot/dts/qcom/pm8998.dtsi            | 17 ++++++++++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)

-- 
2.19.0.rc2.392.g5ba43deb5a-goog


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg'
  2018-09-10 16:02 [PATCH v3 0/3] arm64: dts: qcom: pm8998: Add ADC node and die temperature channel Matthias Kaehlcke
@ 2018-09-10 16:02 ` Matthias Kaehlcke
  2018-09-16 13:05   ` Jonathan Cameron
  2018-09-10 16:03 ` [PATCH v3 2/3] arm64: dts: qcom: pm8998: Add adc node Matthias Kaehlcke
  2018-09-10 16:03 ` [PATCH v3 3/3] arm64: dts: qcom: pm8998: Add die temperature channel node to the ADC Matthias Kaehlcke
  2 siblings, 1 reply; 5+ messages in thread
From: Matthias Kaehlcke @ 2018-09-10 16:02 UTC (permalink / raw)
  To: Andy Gross, David Brown, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler
  Cc: linux-arm-msm, linux-soc, devicetree, linux-arm-kernel,
	linux-kernel, linux-iio, Douglas Anderson, Matthias Kaehlcke

The documentation of Qualcomm's SPMI PMIC voltage ADC claims that the
'reg' property consists of two values, the SPMI address and the length
of the controller's registers. However the SPMI bus to which it is added
specifies "#size-cells = <0>;". Remove the controller register length
from the documentation of the field and the example.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes in v3:
- fixed separator in commit message
- removed duplicate 'Signed-off-by' tag

Changes in v2:
- none
---
 Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt
index 0fb46137f936..d0c188e5c922 100644
--- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt
@@ -13,7 +13,7 @@ VADC node:
 - reg:
     Usage: required
     Value type: <prop-encoded-array>
-    Definition: VADC base address and length in the SPMI PMIC register map.
+    Definition: VADC base address in the SPMI PMIC register map.
 
 - #address-cells:
     Usage: required
@@ -104,7 +104,7 @@ Example:
 	/* VADC node */
 	pmic_vadc: vadc@3100 {
 		compatible = "qcom,spmi-vadc";
-		reg = <0x3100 0x100>;
+		reg = <0x3100>;
 		interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
 		#address-cells = <1>;
 		#size-cells = <0>;
-- 
2.19.0.rc2.392.g5ba43deb5a-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/3] arm64: dts: qcom: pm8998: Add adc node
  2018-09-10 16:02 [PATCH v3 0/3] arm64: dts: qcom: pm8998: Add ADC node and die temperature channel Matthias Kaehlcke
  2018-09-10 16:02 ` [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg' Matthias Kaehlcke
@ 2018-09-10 16:03 ` Matthias Kaehlcke
  2018-09-10 16:03 ` [PATCH v3 3/3] arm64: dts: qcom: pm8998: Add die temperature channel node to the ADC Matthias Kaehlcke
  2 siblings, 0 replies; 5+ messages in thread
From: Matthias Kaehlcke @ 2018-09-10 16:03 UTC (permalink / raw)
  To: Andy Gross, David Brown, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler
  Cc: linux-arm-msm, linux-soc, devicetree, linux-arm-kernel,
	linux-kernel, linux-iio, Douglas Anderson, Matthias Kaehlcke

This adds the adc node to pm8998 based on the examples in the
bindings. It also fixes the order of the included headers.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v3:
- fixed separator in commit message
- added 'Reviewed-by: Douglas Anderson <dianders@chromium.org>' tag

Changes in v2:
- removed io-channel-ranges attribute
---
 arch/arm64/boot/dts/qcom/pm8998.dtsi | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/pm8998.dtsi b/arch/arm64/boot/dts/qcom/pm8998.dtsi
index 92bed1e7d4bb..41593ebbea2c 100644
--- a/arch/arm64/boot/dts/qcom/pm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8998.dtsi
@@ -1,8 +1,9 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 /* Copyright 2018 Google LLC. */
 
-#include <dt-bindings/spmi/spmi.h>
+#include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/spmi/spmi.h>
 
 &spmi_bus {
 	pm8998_lsid0: pmic@0 {
@@ -11,6 +12,15 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pm8998_adc: adc@3100 {
+			compatible = "qcom,spmi-adc-rev2";
+			reg = <0x3100>;
+			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#io-channel-cells = <1>;
+		};
+
 		pm8998_gpio: gpios@c000 {
 			compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio";
 			reg = <0xc000>;
-- 
2.19.0.rc2.392.g5ba43deb5a-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 3/3] arm64: dts: qcom: pm8998: Add die temperature channel node to the ADC
  2018-09-10 16:02 [PATCH v3 0/3] arm64: dts: qcom: pm8998: Add ADC node and die temperature channel Matthias Kaehlcke
  2018-09-10 16:02 ` [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg' Matthias Kaehlcke
  2018-09-10 16:03 ` [PATCH v3 2/3] arm64: dts: qcom: pm8998: Add adc node Matthias Kaehlcke
@ 2018-09-10 16:03 ` Matthias Kaehlcke
  2 siblings, 0 replies; 5+ messages in thread
From: Matthias Kaehlcke @ 2018-09-10 16:03 UTC (permalink / raw)
  To: Andy Gross, David Brown, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Jonathan Cameron, Hartmut Knaack,
	Lars-Peter Clausen, Peter Meerwald-Stadler
  Cc: linux-arm-msm, linux-soc, devicetree, linux-arm-kernel,
	linux-kernel, linux-iio, Douglas Anderson, Matthias Kaehlcke

Add a channel node for the die temperature to the ADC.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v3:
- fixed separator in commit message
- remove duplicate 'Signed-off-by' tag

Changes in v2:
- none
---
 arch/arm64/boot/dts/qcom/pm8998.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm8998.dtsi b/arch/arm64/boot/dts/qcom/pm8998.dtsi
index 41593ebbea2c..d18d4f260fbe 100644
--- a/arch/arm64/boot/dts/qcom/pm8998.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8998.dtsi
@@ -19,6 +19,11 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			#io-channel-cells = <1>;
+
+			die-temp {
+				reg = <ADC5_DIE_TEMP>;
+				label = "die_temp";
+			};
 		};
 
 		pm8998_gpio: gpios@c000 {
-- 
2.19.0.rc2.392.g5ba43deb5a-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg'
  2018-09-10 16:02 ` [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg' Matthias Kaehlcke
@ 2018-09-16 13:05   ` Jonathan Cameron
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2018-09-16 13:05 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Andy Gross, David Brown, Rob Herring, Mark Rutland,
	Catalin Marinas, Will Deacon, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, linux-arm-msm, linux-soc, devicetree,
	linux-arm-kernel, linux-kernel, linux-iio, Douglas Anderson

On Mon, 10 Sep 2018 09:02:59 -0700
Matthias Kaehlcke <mka@chromium.org> wrote:

> The documentation of Qualcomm's SPMI PMIC voltage ADC claims that the
> 'reg' property consists of two values, the SPMI address and the length
> of the controller's registers. However the SPMI bus to which it is added
> specifies "#size-cells = <0>;". Remove the controller register length
> from the documentation of the field and the example.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> Reviewed-by: Rob Herring <robh@kernel.org>
I've already tidied this up and applied.  It should hit linux-next
tomorrow.

Jonathan
> ---

> Changes in v3:
> - fixed separator in commit message
> - removed duplicate 'Signed-off-by' tag
> 
> Changes in v2:
> - none
> ---
>  Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt
> index 0fb46137f936..d0c188e5c922 100644
> --- a/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt
> +++ b/Documentation/devicetree/bindings/iio/adc/qcom,spmi-vadc.txt
> @@ -13,7 +13,7 @@ VADC node:
>  - reg:
>      Usage: required
>      Value type: <prop-encoded-array>
> -    Definition: VADC base address and length in the SPMI PMIC register map.
> +    Definition: VADC base address in the SPMI PMIC register map.
>  
>  - #address-cells:
>      Usage: required
> @@ -104,7 +104,7 @@ Example:
>  	/* VADC node */
>  	pmic_vadc: vadc@3100 {
>  		compatible = "qcom,spmi-vadc";
> -		reg = <0x3100 0x100>;
> +		reg = <0x3100>;
>  		interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-16 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 16:02 [PATCH v3 0/3] arm64: dts: qcom: pm8998: Add ADC node and die temperature channel Matthias Kaehlcke
2018-09-10 16:02 ` [PATCH v3 1/3] dt-bindings: iio: vadc: Fix documentation of 'reg' Matthias Kaehlcke
2018-09-16 13:05   ` Jonathan Cameron
2018-09-10 16:03 ` [PATCH v3 2/3] arm64: dts: qcom: pm8998: Add adc node Matthias Kaehlcke
2018-09-10 16:03 ` [PATCH v3 3/3] arm64: dts: qcom: pm8998: Add die temperature channel node to the ADC Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).