All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] thermal: broadcom: Add NSP Thermal Support
@ 2017-04-25 20:49 ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: Florian Fainelli, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland
  Cc: bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	linux-pm, devicetree

This adds support for NSP to the existing Northstar thermal driver.
This code is based on patches currently in the Linux SoC Thermal git
tree.  Specfically,
https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?h=linus&id=a94cb7eeecc4104a6874339f90c5d0647359c102


Jon Mason (2):
  thermal: broadcom: Allow for NSP to use ns-thermal driver
  ARM: dts: NSP: Add Thermal Support

 arch/arm/boot/dts/bcm-nsp.dtsi   | 26 ++++++++++++++++++++++++++
 arch/arm/mach-bcm/Kconfig        |  2 ++
 drivers/thermal/broadcom/Kconfig |  9 +++++----
 3 files changed, 33 insertions(+), 4 deletions(-)

-- 
2.7.4

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

* [PATCH 0/2] thermal: broadcom: Add NSP Thermal Support
@ 2017-04-25 20:49 ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: linux-arm-kernel

This adds support for NSP to the existing Northstar thermal driver.
This code is based on patches currently in the Linux SoC Thermal git
tree.  Specfically,
https://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal.git/commit/?h=linus&id=a94cb7eeecc4104a6874339f90c5d0647359c102


Jon Mason (2):
  thermal: broadcom: Allow for NSP to use ns-thermal driver
  ARM: dts: NSP: Add Thermal Support

 arch/arm/boot/dts/bcm-nsp.dtsi   | 26 ++++++++++++++++++++++++++
 arch/arm/mach-bcm/Kconfig        |  2 ++
 drivers/thermal/broadcom/Kconfig |  9 +++++----
 3 files changed, 33 insertions(+), 4 deletions(-)

-- 
2.7.4

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-25 20:49   ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: Florian Fainelli, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland
  Cc: bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	linux-pm, devicetree

Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
the ns-thermal driver to be selected via menuconfig.  Also, change the
ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
Kconfig description to mention support for NSP and make the default on
for iProc based platforms.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
 arch/arm/mach-bcm/Kconfig        | 2 ++
 drivers/thermal/broadcom/Kconfig | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index a0e66d8..da2bfeb 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
 	select GPIOLIB
 	select ARM_AMBA
 	select PINCTRL
+	select THERMAL
+	select THERMAL_OF
 	help
 	  This enables support for systems based on Broadcom IPROC architected SoCs.
 	  The IPROC complex contains one or more ARM CPUs along with common
diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
index f0dea8a..26d706c 100644
--- a/drivers/thermal/broadcom/Kconfig
+++ b/drivers/thermal/broadcom/Kconfig
@@ -1,8 +1,9 @@
 config BCM_NS_THERMAL
 	tristate "Northstar thermal driver"
 	depends on ARCH_BCM_IPROC || COMPILE_TEST
+	default ARCH_BCM_IPROC
 	help
-	  Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
-	  BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
-	  with a thermal sensor that allows checking CPU temperature. This
-	  driver provides support for it.
+	  Support for the Northstar and Northstar Plus family of SoCs (e.g.
+	  BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
+	  Management Unit) block with a thermal sensor that allows checking CPU
+	  temperature.
-- 
2.7.4

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-25 20:49   ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: Florian Fainelli, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland
  Cc: bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
the ns-thermal driver to be selected via menuconfig.  Also, change the
ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
Kconfig description to mention support for NSP and make the default on
for iProc based platforms.

Signed-off-by: Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
 arch/arm/mach-bcm/Kconfig        | 2 ++
 drivers/thermal/broadcom/Kconfig | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index a0e66d8..da2bfeb 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
 	select GPIOLIB
 	select ARM_AMBA
 	select PINCTRL
+	select THERMAL
+	select THERMAL_OF
 	help
 	  This enables support for systems based on Broadcom IPROC architected SoCs.
 	  The IPROC complex contains one or more ARM CPUs along with common
diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
index f0dea8a..26d706c 100644
--- a/drivers/thermal/broadcom/Kconfig
+++ b/drivers/thermal/broadcom/Kconfig
@@ -1,8 +1,9 @@
 config BCM_NS_THERMAL
 	tristate "Northstar thermal driver"
 	depends on ARCH_BCM_IPROC || COMPILE_TEST
+	default ARCH_BCM_IPROC
 	help
-	  Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
-	  BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
-	  with a thermal sensor that allows checking CPU temperature. This
-	  driver provides support for it.
+	  Support for the Northstar and Northstar Plus family of SoCs (e.g.
+	  BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
+	  Management Unit) block with a thermal sensor that allows checking CPU
+	  temperature.
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-25 20:49   ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: linux-arm-kernel

Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
the ns-thermal driver to be selected via menuconfig.  Also, change the
ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
Kconfig description to mention support for NSP and make the default on
for iProc based platforms.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
 arch/arm/mach-bcm/Kconfig        | 2 ++
 drivers/thermal/broadcom/Kconfig | 9 +++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index a0e66d8..da2bfeb 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
 	select GPIOLIB
 	select ARM_AMBA
 	select PINCTRL
+	select THERMAL
+	select THERMAL_OF
 	help
 	  This enables support for systems based on Broadcom IPROC architected SoCs.
 	  The IPROC complex contains one or more ARM CPUs along with common
diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
index f0dea8a..26d706c 100644
--- a/drivers/thermal/broadcom/Kconfig
+++ b/drivers/thermal/broadcom/Kconfig
@@ -1,8 +1,9 @@
 config BCM_NS_THERMAL
 	tristate "Northstar thermal driver"
 	depends on ARCH_BCM_IPROC || COMPILE_TEST
+	default ARCH_BCM_IPROC
 	help
-	  Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
-	  BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
-	  with a thermal sensor that allows checking CPU temperature. This
-	  driver provides support for it.
+	  Support for the Northstar and Northstar Plus family of SoCs (e.g.
+	  BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
+	  Management Unit) block with a thermal sensor that allows checking CPU
+	  temperature.
-- 
2.7.4

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

* [PATCH 2/2] ARM: dts: NSP: Add Thermal Support
  2017-04-25 20:49 ` Jon Mason
@ 2017-04-25 20:49   ` Jon Mason
  -1 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: Florian Fainelli, Zhang Rui, Eduardo Valentin, Rob Herring, Mark Rutland
  Cc: bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	linux-pm, devicetree

Add thermal support via the ns-thermal driver and create a single
thermal zone for the entire SoC.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 832795b..be6fcfb 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -383,6 +383,12 @@
 			      <0x3f408 0x04>;
 		};
 
+		thermal: thermal@3f2c0 {
+			compatible = "brcm,ns-thermal";
+			reg = <0x3f2c0 0x10>;
+			#thermal-sensor-cells = <0>;
+		};
+
 		sata_phy: sata_phy@40100 {
 			compatible = "brcm,iproc-nsp-sata-phy";
 			reg = <0x40100 0x340>;
@@ -533,4 +539,24 @@
 			brcm,pcie-msi-inten;
 		};
 	};
+
+	thermal-zones {
+		cpu-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <1000>;
+			coefficients = <(-556) 418000>;
+			thermal-sensors = <&thermal>;
+
+			trips {
+				cpu-crit {
+					temperature     = <125000>;
+					hysteresis      = <0>;
+					type            = "critical";
+				};
+			};
+
+			cooling-maps {
+			};
+		};
+	};
 };
-- 
2.7.4

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

* [PATCH 2/2] ARM: dts: NSP: Add Thermal Support
@ 2017-04-25 20:49   ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-25 20:49 UTC (permalink / raw)
  To: linux-arm-kernel

Add thermal support via the ns-thermal driver and create a single
thermal zone for the entire SoC.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
 arch/arm/boot/dts/bcm-nsp.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
index 832795b..be6fcfb 100644
--- a/arch/arm/boot/dts/bcm-nsp.dtsi
+++ b/arch/arm/boot/dts/bcm-nsp.dtsi
@@ -383,6 +383,12 @@
 			      <0x3f408 0x04>;
 		};
 
+		thermal: thermal at 3f2c0 {
+			compatible = "brcm,ns-thermal";
+			reg = <0x3f2c0 0x10>;
+			#thermal-sensor-cells = <0>;
+		};
+
 		sata_phy: sata_phy at 40100 {
 			compatible = "brcm,iproc-nsp-sata-phy";
 			reg = <0x40100 0x340>;
@@ -533,4 +539,24 @@
 			brcm,pcie-msi-inten;
 		};
 	};
+
+	thermal-zones {
+		cpu-thermal {
+			polling-delay-passive = <0>;
+			polling-delay = <1000>;
+			coefficients = <(-556) 418000>;
+			thermal-sensors = <&thermal>;
+
+			trips {
+				cpu-crit {
+					temperature     = <125000>;
+					hysteresis      = <0>;
+					type            = "critical";
+				};
+			};
+
+			cooling-maps {
+			};
+		};
+	};
 };
-- 
2.7.4

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-27 16:37     ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-27 16:37 UTC (permalink / raw)
  To: Jon Mason
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	linux-pm, devicetree

[-- Attachment #1: Type: text/plain, Size: 2435 bytes --]

Hey Jason,

On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
> the ns-thermal driver to be selected via menuconfig.  Also, change the
> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
> Kconfig description to mention support for NSP and make the default on
> for iProc based platforms.


Thanks for the patch, but..
> 
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> ---
>  arch/arm/mach-bcm/Kconfig        | 2 ++
>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index a0e66d8..da2bfeb 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>  	select GPIOLIB
>  	select ARM_AMBA
>  	select PINCTRL
> +	select THERMAL
> +	select THERMAL_OF
>  	help
>  	  This enables support for systems based on Broadcom IPROC architected SoCs.
>  	  The IPROC complex contains one or more ARM CPUs along with common

It would be better if this is split and sent through your arch tree, to
avoid conflicts. I could also pick it if you get an ack from one of your
maintainers. Still, first option is preferable.

> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
> index f0dea8a..26d706c 100644
> --- a/drivers/thermal/broadcom/Kconfig
> +++ b/drivers/thermal/broadcom/Kconfig
> @@ -1,8 +1,9 @@
>  config BCM_NS_THERMAL
>  	tristate "Northstar thermal driver"
>  	depends on ARCH_BCM_IPROC || COMPILE_TEST
> +	default ARCH_BCM_IPROC

Not sure if this is really what you wanted. Based on your commit log
message, you meant the following, perhaps?

 +	default y if ARCH_BCM_IPROC

>  	help
> -	  Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
> -	  BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
> -	  with a thermal sensor that allows checking CPU temperature. This
> -	  driver provides support for it.
> +	  Support for the Northstar and Northstar Plus family of SoCs (e.g.
> +	  BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device

Did we look BCM47094 somehow on this patch?

> +	  Management Unit) block with a thermal sensor that allows checking CPU
> +	  temperature.
> -- 
> 2.7.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-27 16:37     ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-27 16:37 UTC (permalink / raw)
  To: Jon Mason
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 2462 bytes --]

Hey Jason,

On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
> the ns-thermal driver to be selected via menuconfig.  Also, change the
> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
> Kconfig description to mention support for NSP and make the default on
> for iProc based platforms.


Thanks for the patch, but..
> 
> Signed-off-by: Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> ---
>  arch/arm/mach-bcm/Kconfig        | 2 ++
>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index a0e66d8..da2bfeb 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>  	select GPIOLIB
>  	select ARM_AMBA
>  	select PINCTRL
> +	select THERMAL
> +	select THERMAL_OF
>  	help
>  	  This enables support for systems based on Broadcom IPROC architected SoCs.
>  	  The IPROC complex contains one or more ARM CPUs along with common

It would be better if this is split and sent through your arch tree, to
avoid conflicts. I could also pick it if you get an ack from one of your
maintainers. Still, first option is preferable.

> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
> index f0dea8a..26d706c 100644
> --- a/drivers/thermal/broadcom/Kconfig
> +++ b/drivers/thermal/broadcom/Kconfig
> @@ -1,8 +1,9 @@
>  config BCM_NS_THERMAL
>  	tristate "Northstar thermal driver"
>  	depends on ARCH_BCM_IPROC || COMPILE_TEST
> +	default ARCH_BCM_IPROC

Not sure if this is really what you wanted. Based on your commit log
message, you meant the following, perhaps?

 +	default y if ARCH_BCM_IPROC

>  	help
> -	  Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
> -	  BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
> -	  with a thermal sensor that allows checking CPU temperature. This
> -	  driver provides support for it.
> +	  Support for the Northstar and Northstar Plus family of SoCs (e.g.
> +	  BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device

Did we look BCM47094 somehow on this patch?

> +	  Management Unit) block with a thermal sensor that allows checking CPU
> +	  temperature.
> -- 
> 2.7.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-27 16:37     ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-27 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

Hey Jason,

On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
> the ns-thermal driver to be selected via menuconfig.  Also, change the
> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
> Kconfig description to mention support for NSP and make the default on
> for iProc based platforms.


Thanks for the patch, but..
> 
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> ---
>  arch/arm/mach-bcm/Kconfig        | 2 ++
>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> index a0e66d8..da2bfeb 100644
> --- a/arch/arm/mach-bcm/Kconfig
> +++ b/arch/arm/mach-bcm/Kconfig
> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>  	select GPIOLIB
>  	select ARM_AMBA
>  	select PINCTRL
> +	select THERMAL
> +	select THERMAL_OF
>  	help
>  	  This enables support for systems based on Broadcom IPROC architected SoCs.
>  	  The IPROC complex contains one or more ARM CPUs along with common

It would be better if this is split and sent through your arch tree, to
avoid conflicts. I could also pick it if you get an ack from one of your
maintainers. Still, first option is preferable.

> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
> index f0dea8a..26d706c 100644
> --- a/drivers/thermal/broadcom/Kconfig
> +++ b/drivers/thermal/broadcom/Kconfig
> @@ -1,8 +1,9 @@
>  config BCM_NS_THERMAL
>  	tristate "Northstar thermal driver"
>  	depends on ARCH_BCM_IPROC || COMPILE_TEST
> +	default ARCH_BCM_IPROC

Not sure if this is really what you wanted. Based on your commit log
message, you meant the following, perhaps?

 +	default y if ARCH_BCM_IPROC

>  	help
> -	  Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
> -	  BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
> -	  with a thermal sensor that allows checking CPU temperature. This
> -	  driver provides support for it.
> +	  Support for the Northstar and Northstar Plus family of SoCs (e.g.
> +	  BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device

Did we look BCM47094 somehow on this patch?

> +	  Management Unit) block with a thermal sensor that allows checking CPU
> +	  temperature.
> -- 
> 2.7.4
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170427/c74ae1b8/attachment.sig>

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

* Re: [PATCH 2/2] ARM: dts: NSP: Add Thermal Support
@ 2017-04-27 16:38     ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-27 16:38 UTC (permalink / raw)
  To: Jon Mason
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
	linux-pm, devicetree

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

On Tue, Apr 25, 2017 at 04:49:11PM -0400, Jon Mason wrote:
> Add thermal support via the ns-thermal driver and create a single
> thermal zone for the entire SoC.
> 
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
>  arch/arm/boot/dts/bcm-nsp.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
> index 832795b..be6fcfb 100644
> --- a/arch/arm/boot/dts/bcm-nsp.dtsi
> +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
> @@ -383,6 +383,12 @@
>  			      <0x3f408 0x04>;
>  		};
>  
> +		thermal: thermal@3f2c0 {
> +			compatible = "brcm,ns-thermal";
> +			reg = <0x3f2c0 0x10>;
> +			#thermal-sensor-cells = <0>;
> +		};
> +
>  		sata_phy: sata_phy@40100 {
>  			compatible = "brcm,iproc-nsp-sata-phy";
>  			reg = <0x40100 0x340>;
> @@ -533,4 +539,24 @@
>  			brcm,pcie-msi-inten;
>  		};
>  	};
> +
> +	thermal-zones {
> +		cpu-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <1000>;
> +			coefficients = <(-556) 418000>;
> +			thermal-sensors = <&thermal>;
> +
> +			trips {
> +				cpu-crit {
> +					temperature     = <125000>;
> +					hysteresis      = <0>;
> +					type            = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +			};
> +		};
> +	};
>  };
> -- 
> 2.7.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 2/2] ARM: dts: NSP: Add Thermal Support
@ 2017-04-27 16:38     ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-27 16:38 UTC (permalink / raw)
  To: Jon Mason
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]

On Tue, Apr 25, 2017 at 04:49:11PM -0400, Jon Mason wrote:
> Add thermal support via the ns-thermal driver and create a single
> thermal zone for the entire SoC.
> 
> Signed-off-by: Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

Acked-by: Eduardo Valentin <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

> ---
>  arch/arm/boot/dts/bcm-nsp.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
> index 832795b..be6fcfb 100644
> --- a/arch/arm/boot/dts/bcm-nsp.dtsi
> +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
> @@ -383,6 +383,12 @@
>  			      <0x3f408 0x04>;
>  		};
>  
> +		thermal: thermal@3f2c0 {
> +			compatible = "brcm,ns-thermal";
> +			reg = <0x3f2c0 0x10>;
> +			#thermal-sensor-cells = <0>;
> +		};
> +
>  		sata_phy: sata_phy@40100 {
>  			compatible = "brcm,iproc-nsp-sata-phy";
>  			reg = <0x40100 0x340>;
> @@ -533,4 +539,24 @@
>  			brcm,pcie-msi-inten;
>  		};
>  	};
> +
> +	thermal-zones {
> +		cpu-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <1000>;
> +			coefficients = <(-556) 418000>;
> +			thermal-sensors = <&thermal>;
> +
> +			trips {
> +				cpu-crit {
> +					temperature     = <125000>;
> +					hysteresis      = <0>;
> +					type            = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +			};
> +		};
> +	};
>  };
> -- 
> 2.7.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 2/2] ARM: dts: NSP: Add Thermal Support
@ 2017-04-27 16:38     ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-27 16:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 25, 2017 at 04:49:11PM -0400, Jon Mason wrote:
> Add thermal support via the ns-thermal driver and create a single
> thermal zone for the entire SoC.
> 
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
>  arch/arm/boot/dts/bcm-nsp.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/bcm-nsp.dtsi b/arch/arm/boot/dts/bcm-nsp.dtsi
> index 832795b..be6fcfb 100644
> --- a/arch/arm/boot/dts/bcm-nsp.dtsi
> +++ b/arch/arm/boot/dts/bcm-nsp.dtsi
> @@ -383,6 +383,12 @@
>  			      <0x3f408 0x04>;
>  		};
>  
> +		thermal: thermal at 3f2c0 {
> +			compatible = "brcm,ns-thermal";
> +			reg = <0x3f2c0 0x10>;
> +			#thermal-sensor-cells = <0>;
> +		};
> +
>  		sata_phy: sata_phy at 40100 {
>  			compatible = "brcm,iproc-nsp-sata-phy";
>  			reg = <0x40100 0x340>;
> @@ -533,4 +539,24 @@
>  			brcm,pcie-msi-inten;
>  		};
>  	};
> +
> +	thermal-zones {
> +		cpu-thermal {
> +			polling-delay-passive = <0>;
> +			polling-delay = <1000>;
> +			coefficients = <(-556) 418000>;
> +			thermal-sensors = <&thermal>;
> +
> +			trips {
> +				cpu-crit {
> +					temperature     = <125000>;
> +					hysteresis      = <0>;
> +					type            = "critical";
> +				};
> +			};
> +
> +			cooling-maps {
> +			};
> +		};
> +	};
>  };
> -- 
> 2.7.4
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170427/0f0f5b1a/attachment.sig>

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-27 17:42       ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-27 17:42 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	BCM Kernel Feedback, linux-arm-kernel, open list, linux-pm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> Hey Jason,

It's Jon :)

>
> On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
>> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
>> the ns-thermal driver to be selected via menuconfig.  Also, change the
>> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
>> Kconfig description to mention support for NSP and make the default on
>> for iProc based platforms.
>
>
> Thanks for the patch, but..
>>
>> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
>> ---
>>  arch/arm/mach-bcm/Kconfig        | 2 ++
>>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> index a0e66d8..da2bfeb 100644
>> --- a/arch/arm/mach-bcm/Kconfig
>> +++ b/arch/arm/mach-bcm/Kconfig
>> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>>       select GPIOLIB
>>       select ARM_AMBA
>>       select PINCTRL
>> +     select THERMAL
>> +     select THERMAL_OF
>>       help
>>         This enables support for systems based on Broadcom IPROC architected SoCs.
>>         The IPROC complex contains one or more ARM CPUs along with common
>
> It would be better if this is split and sent through your arch tree, to
> avoid conflicts. I could also pick it if you get an ack from one of your
> maintainers. Still, first option is preferable.

Sure, I'll be happy to split this off.  I should've thought to split
it up before sending.  Thanks for the suggestion.

>
>> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
>> index f0dea8a..26d706c 100644
>> --- a/drivers/thermal/broadcom/Kconfig
>> +++ b/drivers/thermal/broadcom/Kconfig
>> @@ -1,8 +1,9 @@
>>  config BCM_NS_THERMAL
>>       tristate "Northstar thermal driver"
>>       depends on ARCH_BCM_IPROC || COMPILE_TEST
>> +     default ARCH_BCM_IPROC
>
> Not sure if this is really what you wanted. Based on your commit log
> message, you meant the following, perhaps?
>
>  +      default y if ARCH_BCM_IPROC

IIUC, my original default works, as we have used it frequently in
other places in the kernel.
grep -rI "default ARCH_BCM_IPROC" * | wc -l
15

However, if the above is preferred (or the other 15 massively broken),
I'll be happy to do it that way.


>>       help
>> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
>> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
>> -       with a thermal sensor that allows checking CPU temperature. This
>> -       driver provides support for it.
>> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
>> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
>
> Did we look BCM47094 somehow on this patch?

Naa, just trying to be more concise, while adding the NSP products to
the list..  BCM47094 is a type of BCM4709.  So, it is still there :)

>
>> +       Management Unit) block with a thermal sensor that allows checking CPU
>> +       temperature.
>> --
>> 2.7.4
>>

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-27 17:42       ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-27 17:42 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	BCM Kernel Feedback, linux-arm-kernel, open list,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hey Jason,

It's Jon :)

>
> On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
>> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
>> the ns-thermal driver to be selected via menuconfig.  Also, change the
>> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
>> Kconfig description to mention support for NSP and make the default on
>> for iProc based platforms.
>
>
> Thanks for the patch, but..
>>
>> Signed-off-by: Jon Mason <jon.mason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
>> ---
>>  arch/arm/mach-bcm/Kconfig        | 2 ++
>>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> index a0e66d8..da2bfeb 100644
>> --- a/arch/arm/mach-bcm/Kconfig
>> +++ b/arch/arm/mach-bcm/Kconfig
>> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>>       select GPIOLIB
>>       select ARM_AMBA
>>       select PINCTRL
>> +     select THERMAL
>> +     select THERMAL_OF
>>       help
>>         This enables support for systems based on Broadcom IPROC architected SoCs.
>>         The IPROC complex contains one or more ARM CPUs along with common
>
> It would be better if this is split and sent through your arch tree, to
> avoid conflicts. I could also pick it if you get an ack from one of your
> maintainers. Still, first option is preferable.

Sure, I'll be happy to split this off.  I should've thought to split
it up before sending.  Thanks for the suggestion.

>
>> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
>> index f0dea8a..26d706c 100644
>> --- a/drivers/thermal/broadcom/Kconfig
>> +++ b/drivers/thermal/broadcom/Kconfig
>> @@ -1,8 +1,9 @@
>>  config BCM_NS_THERMAL
>>       tristate "Northstar thermal driver"
>>       depends on ARCH_BCM_IPROC || COMPILE_TEST
>> +     default ARCH_BCM_IPROC
>
> Not sure if this is really what you wanted. Based on your commit log
> message, you meant the following, perhaps?
>
>  +      default y if ARCH_BCM_IPROC

IIUC, my original default works, as we have used it frequently in
other places in the kernel.
grep -rI "default ARCH_BCM_IPROC" * | wc -l
15

However, if the above is preferred (or the other 15 massively broken),
I'll be happy to do it that way.


>>       help
>> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
>> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
>> -       with a thermal sensor that allows checking CPU temperature. This
>> -       driver provides support for it.
>> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
>> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
>
> Did we look BCM47094 somehow on this patch?

Naa, just trying to be more concise, while adding the NSP products to
the list..  BCM47094 is a type of BCM4709.  So, it is still there :)

>
>> +       Management Unit) block with a thermal sensor that allows checking CPU
>> +       temperature.
>> --
>> 2.7.4
>>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-27 17:42       ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-27 17:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> Hey Jason,

It's Jon :)

>
> On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
>> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
>> the ns-thermal driver to be selected via menuconfig.  Also, change the
>> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
>> Kconfig description to mention support for NSP and make the default on
>> for iProc based platforms.
>
>
> Thanks for the patch, but..
>>
>> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
>> ---
>>  arch/arm/mach-bcm/Kconfig        | 2 ++
>>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>>  2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> index a0e66d8..da2bfeb 100644
>> --- a/arch/arm/mach-bcm/Kconfig
>> +++ b/arch/arm/mach-bcm/Kconfig
>> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>>       select GPIOLIB
>>       select ARM_AMBA
>>       select PINCTRL
>> +     select THERMAL
>> +     select THERMAL_OF
>>       help
>>         This enables support for systems based on Broadcom IPROC architected SoCs.
>>         The IPROC complex contains one or more ARM CPUs along with common
>
> It would be better if this is split and sent through your arch tree, to
> avoid conflicts. I could also pick it if you get an ack from one of your
> maintainers. Still, first option is preferable.

Sure, I'll be happy to split this off.  I should've thought to split
it up before sending.  Thanks for the suggestion.

>
>> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
>> index f0dea8a..26d706c 100644
>> --- a/drivers/thermal/broadcom/Kconfig
>> +++ b/drivers/thermal/broadcom/Kconfig
>> @@ -1,8 +1,9 @@
>>  config BCM_NS_THERMAL
>>       tristate "Northstar thermal driver"
>>       depends on ARCH_BCM_IPROC || COMPILE_TEST
>> +     default ARCH_BCM_IPROC
>
> Not sure if this is really what you wanted. Based on your commit log
> message, you meant the following, perhaps?
>
>  +      default y if ARCH_BCM_IPROC

IIUC, my original default works, as we have used it frequently in
other places in the kernel.
grep -rI "default ARCH_BCM_IPROC" * | wc -l
15

However, if the above is preferred (or the other 15 massively broken),
I'll be happy to do it that way.


>>       help
>> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
>> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
>> -       with a thermal sensor that allows checking CPU temperature. This
>> -       driver provides support for it.
>> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
>> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
>
> Did we look BCM47094 somehow on this patch?

Naa, just trying to be more concise, while adding the NSP products to
the list..  BCM47094 is a type of BCM4709.  So, it is still there :)

>
>> +       Management Unit) block with a thermal sensor that allows checking CPU
>> +       temperature.
>> --
>> 2.7.4
>>

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
  2017-04-27 17:42       ` Jon Mason
  (?)
@ 2017-04-28 13:07         ` Eduardo Valentin
  -1 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-28 13:07 UTC (permalink / raw)
  To: Jon Mason
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	BCM Kernel Feedback, linux-arm-kernel, open list, linux-pm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

[-- Attachment #1: Type: text/plain, Size: 3863 bytes --]

On Thu, Apr 27, 2017 at 01:42:25PM -0400, Jon Mason wrote:
> On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > Hey Jason,
> 
> It's Jon :)

Apologies. I think I either read too fast, or my fingers were faster
than my brain. Sorry.

> 
> >
> > On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
> >> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
> >> the ns-thermal driver to be selected via menuconfig.  Also, change the
> >> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
> >> Kconfig description to mention support for NSP and make the default on
> >> for iProc based platforms.
> >
> >
> > Thanks for the patch, but..
> >>
> >> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> >> ---
> >>  arch/arm/mach-bcm/Kconfig        | 2 ++
> >>  drivers/thermal/broadcom/Kconfig | 9 +++++----
> >>  2 files changed, 7 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> >> index a0e66d8..da2bfeb 100644
> >> --- a/arch/arm/mach-bcm/Kconfig
> >> +++ b/arch/arm/mach-bcm/Kconfig
> >> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
> >>       select GPIOLIB
> >>       select ARM_AMBA
> >>       select PINCTRL
> >> +     select THERMAL
> >> +     select THERMAL_OF
> >>       help
> >>         This enables support for systems based on Broadcom IPROC architected SoCs.
> >>         The IPROC complex contains one or more ARM CPUs along with common
> >
> > It would be better if this is split and sent through your arch tree, to
> > avoid conflicts. I could also pick it if you get an ack from one of your
> > maintainers. Still, first option is preferable.
> 
> Sure, I'll be happy to split this off.  I should've thought to split
> it up before sending.  Thanks for the suggestion.

Cool!

> 
> >
> >> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
> >> index f0dea8a..26d706c 100644
> >> --- a/drivers/thermal/broadcom/Kconfig
> >> +++ b/drivers/thermal/broadcom/Kconfig
> >> @@ -1,8 +1,9 @@
> >>  config BCM_NS_THERMAL
> >>       tristate "Northstar thermal driver"
> >>       depends on ARCH_BCM_IPROC || COMPILE_TEST
> >> +     default ARCH_BCM_IPROC
> >
> > Not sure if this is really what you wanted. Based on your commit log
> > message, you meant the following, perhaps?
> >
> >  +      default y if ARCH_BCM_IPROC
> 
> IIUC, my original default works, as we have used it frequently in
> other places in the kernel.
> grep -rI "default ARCH_BCM_IPROC" * | wc -l
> 15

Yeah... Are you sure they are all correct?

> 
> However, if the above is preferred (or the other 15 massively broken),
> I'll be happy to do it that way.

Your construction is syntactically correct. Maybe might still work (did
not check myself) for the purpose you describe, but the construction
mentioned in Documentation/kbuild/kconfig-language.txt is:
 +      default y if BAR

So, please fix it.


> 
> 
> >>       help
> >> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
> >> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
> >> -       with a thermal sensor that allows checking CPU temperature. This
> >> -       driver provides support for it.
> >> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
> >> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
> >
> > Did we look BCM47094 somehow on this patch?
> 
> Naa, just trying to be more concise, while adding the NSP products to
> the list..  BCM47094 is a type of BCM4709.  So, it is still there :)
> 
> >
> >> +       Management Unit) block with a thermal sensor that allows checking CPU
> >> +       temperature.
> >> --
> >> 2.7.4
> >>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-28 13:07         ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-28 13:07 UTC (permalink / raw)
  To: Jon Mason
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	BCM Kernel Feedback, linux-arm-kernel, open list, linux-pm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

[-- Attachment #1: Type: text/plain, Size: 3863 bytes --]

On Thu, Apr 27, 2017 at 01:42:25PM -0400, Jon Mason wrote:
> On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > Hey Jason,
> 
> It's Jon :)

Apologies. I think I either read too fast, or my fingers were faster
than my brain. Sorry.

> 
> >
> > On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
> >> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
> >> the ns-thermal driver to be selected via menuconfig.  Also, change the
> >> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
> >> Kconfig description to mention support for NSP and make the default on
> >> for iProc based platforms.
> >
> >
> > Thanks for the patch, but..
> >>
> >> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> >> ---
> >>  arch/arm/mach-bcm/Kconfig        | 2 ++
> >>  drivers/thermal/broadcom/Kconfig | 9 +++++----
> >>  2 files changed, 7 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> >> index a0e66d8..da2bfeb 100644
> >> --- a/arch/arm/mach-bcm/Kconfig
> >> +++ b/arch/arm/mach-bcm/Kconfig
> >> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
> >>       select GPIOLIB
> >>       select ARM_AMBA
> >>       select PINCTRL
> >> +     select THERMAL
> >> +     select THERMAL_OF
> >>       help
> >>         This enables support for systems based on Broadcom IPROC architected SoCs.
> >>         The IPROC complex contains one or more ARM CPUs along with common
> >
> > It would be better if this is split and sent through your arch tree, to
> > avoid conflicts. I could also pick it if you get an ack from one of your
> > maintainers. Still, first option is preferable.
> 
> Sure, I'll be happy to split this off.  I should've thought to split
> it up before sending.  Thanks for the suggestion.

Cool!

> 
> >
> >> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
> >> index f0dea8a..26d706c 100644
> >> --- a/drivers/thermal/broadcom/Kconfig
> >> +++ b/drivers/thermal/broadcom/Kconfig
> >> @@ -1,8 +1,9 @@
> >>  config BCM_NS_THERMAL
> >>       tristate "Northstar thermal driver"
> >>       depends on ARCH_BCM_IPROC || COMPILE_TEST
> >> +     default ARCH_BCM_IPROC
> >
> > Not sure if this is really what you wanted. Based on your commit log
> > message, you meant the following, perhaps?
> >
> >  +      default y if ARCH_BCM_IPROC
> 
> IIUC, my original default works, as we have used it frequently in
> other places in the kernel.
> grep -rI "default ARCH_BCM_IPROC" * | wc -l
> 15

Yeah... Are you sure they are all correct?

> 
> However, if the above is preferred (or the other 15 massively broken),
> I'll be happy to do it that way.

Your construction is syntactically correct. Maybe might still work (did
not check myself) for the purpose you describe, but the construction
mentioned in Documentation/kbuild/kconfig-language.txt is:
 +      default y if BAR

So, please fix it.


> 
> 
> >>       help
> >> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
> >> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
> >> -       with a thermal sensor that allows checking CPU temperature. This
> >> -       driver provides support for it.
> >> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
> >> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
> >
> > Did we look BCM47094 somehow on this patch?
> 
> Naa, just trying to be more concise, while adding the NSP products to
> the list..  BCM47094 is a type of BCM4709.  So, it is still there :)
> 
> >
> >> +       Management Unit) block with a thermal sensor that allows checking CPU
> >> +       temperature.
> >> --
> >> 2.7.4
> >>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-28 13:07         ` Eduardo Valentin
  0 siblings, 0 replies; 22+ messages in thread
From: Eduardo Valentin @ 2017-04-28 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Apr 27, 2017 at 01:42:25PM -0400, Jon Mason wrote:
> On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > Hey Jason,
> 
> It's Jon :)

Apologies. I think I either read too fast, or my fingers were faster
than my brain. Sorry.

> 
> >
> > On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
> >> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
> >> the ns-thermal driver to be selected via menuconfig.  Also, change the
> >> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
> >> Kconfig description to mention support for NSP and make the default on
> >> for iProc based platforms.
> >
> >
> > Thanks for the patch, but..
> >>
> >> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> >> ---
> >>  arch/arm/mach-bcm/Kconfig        | 2 ++
> >>  drivers/thermal/broadcom/Kconfig | 9 +++++----
> >>  2 files changed, 7 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
> >> index a0e66d8..da2bfeb 100644
> >> --- a/arch/arm/mach-bcm/Kconfig
> >> +++ b/arch/arm/mach-bcm/Kconfig
> >> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
> >>       select GPIOLIB
> >>       select ARM_AMBA
> >>       select PINCTRL
> >> +     select THERMAL
> >> +     select THERMAL_OF
> >>       help
> >>         This enables support for systems based on Broadcom IPROC architected SoCs.
> >>         The IPROC complex contains one or more ARM CPUs along with common
> >
> > It would be better if this is split and sent through your arch tree, to
> > avoid conflicts. I could also pick it if you get an ack from one of your
> > maintainers. Still, first option is preferable.
> 
> Sure, I'll be happy to split this off.  I should've thought to split
> it up before sending.  Thanks for the suggestion.

Cool!

> 
> >
> >> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
> >> index f0dea8a..26d706c 100644
> >> --- a/drivers/thermal/broadcom/Kconfig
> >> +++ b/drivers/thermal/broadcom/Kconfig
> >> @@ -1,8 +1,9 @@
> >>  config BCM_NS_THERMAL
> >>       tristate "Northstar thermal driver"
> >>       depends on ARCH_BCM_IPROC || COMPILE_TEST
> >> +     default ARCH_BCM_IPROC
> >
> > Not sure if this is really what you wanted. Based on your commit log
> > message, you meant the following, perhaps?
> >
> >  +      default y if ARCH_BCM_IPROC
> 
> IIUC, my original default works, as we have used it frequently in
> other places in the kernel.
> grep -rI "default ARCH_BCM_IPROC" * | wc -l
> 15

Yeah... Are you sure they are all correct?

> 
> However, if the above is preferred (or the other 15 massively broken),
> I'll be happy to do it that way.

Your construction is syntactically correct. Maybe might still work (did
not check myself) for the purpose you describe, but the construction
mentioned in Documentation/kbuild/kconfig-language.txt is:
 +      default y if BAR

So, please fix it.


> 
> 
> >>       help
> >> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
> >> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
> >> -       with a thermal sensor that allows checking CPU temperature. This
> >> -       driver provides support for it.
> >> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
> >> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
> >
> > Did we look BCM47094 somehow on this patch?
> 
> Naa, just trying to be more concise, while adding the NSP products to
> the list..  BCM47094 is a type of BCM4709.  So, it is still there :)
> 
> >
> >> +       Management Unit) block with a thermal sensor that allows checking CPU
> >> +       temperature.
> >> --
> >> 2.7.4
> >>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170428/b46e5a16/attachment.sig>

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
  2017-04-28 13:07         ` Eduardo Valentin
  (?)
@ 2017-04-28 18:04           ` Jon Mason
  -1 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-28 18:04 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	BCM Kernel Feedback, linux-arm-kernel, open list, linux-pm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Fri, Apr 28, 2017 at 9:07 AM, Eduardo Valentin <edubezval@gmail.com> wrote:
> On Thu, Apr 27, 2017 at 01:42:25PM -0400, Jon Mason wrote:
>> On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
>> > Hey Jason,
>>
>> It's Jon :)
>
> Apologies. I think I either read too fast, or my fingers were faster
> than my brain. Sorry.

NP,  That exact error happens more frequently that you would think :)

>>
>> >
>> > On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
>> >> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
>> >> the ns-thermal driver to be selected via menuconfig.  Also, change the
>> >> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
>> >> Kconfig description to mention support for NSP and make the default on
>> >> for iProc based platforms.
>> >
>> >
>> > Thanks for the patch, but..
>> >>
>> >> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
>> >> ---
>> >>  arch/arm/mach-bcm/Kconfig        | 2 ++
>> >>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>> >>  2 files changed, 7 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> >> index a0e66d8..da2bfeb 100644
>> >> --- a/arch/arm/mach-bcm/Kconfig
>> >> +++ b/arch/arm/mach-bcm/Kconfig
>> >> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>> >>       select GPIOLIB
>> >>       select ARM_AMBA
>> >>       select PINCTRL
>> >> +     select THERMAL
>> >> +     select THERMAL_OF
>> >>       help
>> >>         This enables support for systems based on Broadcom IPROC architected SoCs.
>> >>         The IPROC complex contains one or more ARM CPUs along with common
>> >
>> > It would be better if this is split and sent through your arch tree, to
>> > avoid conflicts. I could also pick it if you get an ack from one of your
>> > maintainers. Still, first option is preferable.
>>
>> Sure, I'll be happy to split this off.  I should've thought to split
>> it up before sending.  Thanks for the suggestion.
>
> Cool!
>
>>
>> >
>> >> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
>> >> index f0dea8a..26d706c 100644
>> >> --- a/drivers/thermal/broadcom/Kconfig
>> >> +++ b/drivers/thermal/broadcom/Kconfig
>> >> @@ -1,8 +1,9 @@
>> >>  config BCM_NS_THERMAL
>> >>       tristate "Northstar thermal driver"
>> >>       depends on ARCH_BCM_IPROC || COMPILE_TEST
>> >> +     default ARCH_BCM_IPROC
>> >
>> > Not sure if this is really what you wanted. Based on your commit log
>> > message, you meant the following, perhaps?
>> >
>> >  +      default y if ARCH_BCM_IPROC
>>
>> IIUC, my original default works, as we have used it frequently in
>> other places in the kernel.
>> grep -rI "default ARCH_BCM_IPROC" * | wc -l
>> 15
>
> Yeah... Are you sure they are all correct?
>
>>
>> However, if the above is preferred (or the other 15 massively broken),
>> I'll be happy to do it that way.
>
> Your construction is syntactically correct. Maybe might still work (did
> not check myself) for the purpose you describe, but the construction
> mentioned in Documentation/kbuild/kconfig-language.txt is:
>  +      default y if BAR
>
> So, please fix it.

Oh, thanks for the info.  I was unaware of this, and we should
definitely follow the documentation..  I'll make the relevant changes
and do follow-on patches to correct the other places.

>
>>
>>
>> >>       help
>> >> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
>> >> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
>> >> -       with a thermal sensor that allows checking CPU temperature. This
>> >> -       driver provides support for it.
>> >> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
>> >> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
>> >
>> > Did we look BCM47094 somehow on this patch?
>>
>> Naa, just trying to be more concise, while adding the NSP products to
>> the list..  BCM47094 is a type of BCM4709.  So, it is still there :)
>>
>> >
>> >> +       Management Unit) block with a thermal sensor that allows checking CPU
>> >> +       temperature.
>> >> --
>> >> 2.7.4
>> >>

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

* Re: [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-28 18:04           ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-28 18:04 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Florian Fainelli, Zhang Rui, Rob Herring, Mark Rutland,
	BCM Kernel Feedback, linux-arm-kernel, open list, linux-pm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Fri, Apr 28, 2017 at 9:07 AM, Eduardo Valentin <edubezval@gmail.com> wrote:
> On Thu, Apr 27, 2017 at 01:42:25PM -0400, Jon Mason wrote:
>> On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
>> > Hey Jason,
>>
>> It's Jon :)
>
> Apologies. I think I either read too fast, or my fingers were faster
> than my brain. Sorry.

NP,  That exact error happens more frequently that you would think :)

>>
>> >
>> > On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
>> >> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
>> >> the ns-thermal driver to be selected via menuconfig.  Also, change the
>> >> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
>> >> Kconfig description to mention support for NSP and make the default on
>> >> for iProc based platforms.
>> >
>> >
>> > Thanks for the patch, but..
>> >>
>> >> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
>> >> ---
>> >>  arch/arm/mach-bcm/Kconfig        | 2 ++
>> >>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>> >>  2 files changed, 7 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> >> index a0e66d8..da2bfeb 100644
>> >> --- a/arch/arm/mach-bcm/Kconfig
>> >> +++ b/arch/arm/mach-bcm/Kconfig
>> >> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>> >>       select GPIOLIB
>> >>       select ARM_AMBA
>> >>       select PINCTRL
>> >> +     select THERMAL
>> >> +     select THERMAL_OF
>> >>       help
>> >>         This enables support for systems based on Broadcom IPROC architected SoCs.
>> >>         The IPROC complex contains one or more ARM CPUs along with common
>> >
>> > It would be better if this is split and sent through your arch tree, to
>> > avoid conflicts. I could also pick it if you get an ack from one of your
>> > maintainers. Still, first option is preferable.
>>
>> Sure, I'll be happy to split this off.  I should've thought to split
>> it up before sending.  Thanks for the suggestion.
>
> Cool!
>
>>
>> >
>> >> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
>> >> index f0dea8a..26d706c 100644
>> >> --- a/drivers/thermal/broadcom/Kconfig
>> >> +++ b/drivers/thermal/broadcom/Kconfig
>> >> @@ -1,8 +1,9 @@
>> >>  config BCM_NS_THERMAL
>> >>       tristate "Northstar thermal driver"
>> >>       depends on ARCH_BCM_IPROC || COMPILE_TEST
>> >> +     default ARCH_BCM_IPROC
>> >
>> > Not sure if this is really what you wanted. Based on your commit log
>> > message, you meant the following, perhaps?
>> >
>> >  +      default y if ARCH_BCM_IPROC
>>
>> IIUC, my original default works, as we have used it frequently in
>> other places in the kernel.
>> grep -rI "default ARCH_BCM_IPROC" * | wc -l
>> 15
>
> Yeah... Are you sure they are all correct?
>
>>
>> However, if the above is preferred (or the other 15 massively broken),
>> I'll be happy to do it that way.
>
> Your construction is syntactically correct. Maybe might still work (did
> not check myself) for the purpose you describe, but the construction
> mentioned in Documentation/kbuild/kconfig-language.txt is:
>  +      default y if BAR
>
> So, please fix it.

Oh, thanks for the info.  I was unaware of this, and we should
definitely follow the documentation..  I'll make the relevant changes
and do follow-on patches to correct the other places.

>
>>
>>
>> >>       help
>> >> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
>> >> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
>> >> -       with a thermal sensor that allows checking CPU temperature. This
>> >> -       driver provides support for it.
>> >> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
>> >> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
>> >
>> > Did we look BCM47094 somehow on this patch?
>>
>> Naa, just trying to be more concise, while adding the NSP products to
>> the list..  BCM47094 is a type of BCM4709.  So, it is still there :)
>>
>> >
>> >> +       Management Unit) block with a thermal sensor that allows checking CPU
>> >> +       temperature.
>> >> --
>> >> 2.7.4
>> >>

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

* [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver
@ 2017-04-28 18:04           ` Jon Mason
  0 siblings, 0 replies; 22+ messages in thread
From: Jon Mason @ 2017-04-28 18:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 28, 2017 at 9:07 AM, Eduardo Valentin <edubezval@gmail.com> wrote:
> On Thu, Apr 27, 2017 at 01:42:25PM -0400, Jon Mason wrote:
>> On Thu, Apr 27, 2017 at 12:37 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
>> > Hey Jason,
>>
>> It's Jon :)
>
> Apologies. I think I either read too fast, or my fingers were faster
> than my brain. Sorry.

NP,  That exact error happens more frequently that you would think :)

>>
>> >
>> > On Tue, Apr 25, 2017 at 04:49:10PM -0400, Jon Mason wrote:
>> >> Change the iProc Kconfig to select THERMAL and THERMAL_OF, which allows
>> >> the ns-thermal driver to be selected via menuconfig.  Also, change the
>> >> ns-thermal driver to work on any iProc based SoC.  Finally, tweak the
>> >> Kconfig description to mention support for NSP and make the default on
>> >> for iProc based platforms.
>> >
>> >
>> > Thanks for the patch, but..
>> >>
>> >> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
>> >> ---
>> >>  arch/arm/mach-bcm/Kconfig        | 2 ++
>> >>  drivers/thermal/broadcom/Kconfig | 9 +++++----
>> >>  2 files changed, 7 insertions(+), 4 deletions(-)
>> >>
>> >> diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
>> >> index a0e66d8..da2bfeb 100644
>> >> --- a/arch/arm/mach-bcm/Kconfig
>> >> +++ b/arch/arm/mach-bcm/Kconfig
>> >> @@ -19,6 +19,8 @@ config ARCH_BCM_IPROC
>> >>       select GPIOLIB
>> >>       select ARM_AMBA
>> >>       select PINCTRL
>> >> +     select THERMAL
>> >> +     select THERMAL_OF
>> >>       help
>> >>         This enables support for systems based on Broadcom IPROC architected SoCs.
>> >>         The IPROC complex contains one or more ARM CPUs along with common
>> >
>> > It would be better if this is split and sent through your arch tree, to
>> > avoid conflicts. I could also pick it if you get an ack from one of your
>> > maintainers. Still, first option is preferable.
>>
>> Sure, I'll be happy to split this off.  I should've thought to split
>> it up before sending.  Thanks for the suggestion.
>
> Cool!
>
>>
>> >
>> >> diff --git a/drivers/thermal/broadcom/Kconfig b/drivers/thermal/broadcom/Kconfig
>> >> index f0dea8a..26d706c 100644
>> >> --- a/drivers/thermal/broadcom/Kconfig
>> >> +++ b/drivers/thermal/broadcom/Kconfig
>> >> @@ -1,8 +1,9 @@
>> >>  config BCM_NS_THERMAL
>> >>       tristate "Northstar thermal driver"
>> >>       depends on ARCH_BCM_IPROC || COMPILE_TEST
>> >> +     default ARCH_BCM_IPROC
>> >
>> > Not sure if this is really what you wanted. Based on your commit log
>> > message, you meant the following, perhaps?
>> >
>> >  +      default y if ARCH_BCM_IPROC
>>
>> IIUC, my original default works, as we have used it frequently in
>> other places in the kernel.
>> grep -rI "default ARCH_BCM_IPROC" * | wc -l
>> 15
>
> Yeah... Are you sure they are all correct?
>
>>
>> However, if the above is preferred (or the other 15 massively broken),
>> I'll be happy to do it that way.
>
> Your construction is syntactically correct. Maybe might still work (did
> not check myself) for the purpose you describe, but the construction
> mentioned in Documentation/kbuild/kconfig-language.txt is:
>  +      default y if BAR
>
> So, please fix it.

Oh, thanks for the info.  I was unaware of this, and we should
definitely follow the documentation..  I'll make the relevant changes
and do follow-on patches to correct the other places.

>
>>
>>
>> >>       help
>> >> -       Northstar is a family of SoCs that includes e.g. BCM4708, BCM47081,
>> >> -       BCM4709 and BCM47094. It contains DMU (Device Management Unit) block
>> >> -       with a thermal sensor that allows checking CPU temperature. This
>> >> -       driver provides support for it.
>> >> +       Support for the Northstar and Northstar Plus family of SoCs (e.g.
>> >> +       BCM4708, BCM4709, BCM5301x, BCM95852X, etc). It contains DMU (Device
>> >
>> > Did we look BCM47094 somehow on this patch?
>>
>> Naa, just trying to be more concise, while adding the NSP products to
>> the list..  BCM47094 is a type of BCM4709.  So, it is still there :)
>>
>> >
>> >> +       Management Unit) block with a thermal sensor that allows checking CPU
>> >> +       temperature.
>> >> --
>> >> 2.7.4
>> >>

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

end of thread, other threads:[~2017-04-28 18:04 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 20:49 [PATCH 0/2] thermal: broadcom: Add NSP Thermal Support Jon Mason
2017-04-25 20:49 ` Jon Mason
2017-04-25 20:49 ` [PATCH 1/2] thermal: broadcom: Allow for NSP to use ns-thermal driver Jon Mason
2017-04-25 20:49   ` Jon Mason
2017-04-25 20:49   ` Jon Mason
2017-04-27 16:37   ` Eduardo Valentin
2017-04-27 16:37     ` Eduardo Valentin
2017-04-27 16:37     ` Eduardo Valentin
2017-04-27 17:42     ` Jon Mason
2017-04-27 17:42       ` Jon Mason
2017-04-27 17:42       ` Jon Mason
2017-04-28 13:07       ` Eduardo Valentin
2017-04-28 13:07         ` Eduardo Valentin
2017-04-28 13:07         ` Eduardo Valentin
2017-04-28 18:04         ` Jon Mason
2017-04-28 18:04           ` Jon Mason
2017-04-28 18:04           ` Jon Mason
2017-04-25 20:49 ` [PATCH 2/2] ARM: dts: NSP: Add Thermal Support Jon Mason
2017-04-25 20:49   ` Jon Mason
2017-04-27 16:38   ` Eduardo Valentin
2017-04-27 16:38     ` Eduardo Valentin
2017-04-27 16:38     ` Eduardo Valentin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.