mbox series

[00/14] thermal/drivers/hi3660: Dual cluster sensors support

Message ID 1537866192-12320-1-git-send-email-daniel.lezcano@linaro.org
Headers show
Series thermal/drivers/hi3660: Dual cluster sensors support | expand

Message

Daniel Lezcano Sept. 25, 2018, 9:02 a.m. UTC
This patch series provides the changes to support the dual clusters sensor on
the hikey960 board.

Most of the patches set the scene for the addition of other sensors which comes
at the end of the series.

Daniel Lezcano (14):
  thermal/drivers/hisi: Change the platform data pointer to sensor ops
  thermal/drivers/hisi: Change the driver to be sensor oriented
  thermal/drivers/hisi: Set the thermal zone private data to the sensor
    pointer
  thermal/drivers/hisi: Factor out the probe functions
  thermal/drivers/hisi: Prepare to support multiple sensors
  thermal/drivers/hisi: Add multiple sensors support
  thermal/drivers/hisi: Replace macro name with relevant sensor location
  ARM64: dts: hisilicon: Add tsensor interrupt name
  thermal/drivers/hisi: Use platform_get_irq_byname
  ARM64: dts: hisilicon: Add interrupt names for the tsensors
  thermal/drivers/hisi: Remove pointless irq field
  thermal/drivers/hisi: Add more sensors channel
  ARM64: dts: hisilicon: Add dual clusters thermal zones for hi3660
  thermal/drivers/hisi: Add the dual clusters sensors for hi3660

 .../bindings/thermal/hisilicon-thermal.txt         |   9 +-
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi          |  60 +++--
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi          |   1 +
 drivers/thermal/hisi_thermal.c                     | 249 ++++++++++++---------
 4 files changed, 204 insertions(+), 115 deletions(-)

-- 
2.7.4

Comments

Rob Herring (Arm) Oct. 15, 2018, 4:28 p.m. UTC | #1
On Tue, Sep 25, 2018 at 11:03:06AM +0200, Daniel Lezcano wrote:
> Add the interrupt names for the sensors, so the code can rely on them

> instead of dealing with index which are prone to error.

> 

> The name comes from the Hisilicon documentation found on internet.

> 

> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---

>  .../bindings/thermal/hisilicon-thermal.txt         |  3 ++

>  arch/arm64/boot/dts/hisilicon/hi3660.dtsi          | 63 +++++++++++-----------

>  arch/arm64/boot/dts/hisilicon/hi6220.dtsi          |  1 +

>  3 files changed, 36 insertions(+), 31 deletions(-)


Lots of whitespace errors reported by checkpatch.pl.

> 

> diff --git a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt

> index cef716a..3edfae3 100644

> --- a/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt

> +++ b/Documentation/devicetree/bindings/thermal/hisilicon-thermal.txt

> @@ -7,6 +7,7 @@

>    region.

>  - interrupt: The interrupt number to the cpu. Defines the interrupt used

>    by /SOCTHERM/tsensor.

> +- interrupt-names: The interrupt names for the different sensors


Need to define what the names are.

>  - clock-names: Input clock name, should be 'thermal_clk'.

>  - clocks: phandles for clock specified in "clock-names" property.

>  - #thermal-sensor-cells: Should be 1. See ./thermal.txt for a description.

> @@ -18,6 +19,7 @@ for Hi6220:

>  		compatible = "hisilicon,tsensor";

>  		reg = <0x0 0xf7030700 0x0 0x1000>;

>  		interrupts = <0 7 0x4>;

> +		interrupt-names = "tsensor_intr";


That name seems pretty pointless.

>  		clocks = <&sys_ctrl HI6220_TSENSOR_CLK>;

>  		clock-names = "thermal_clk";

>  		#thermal-sensor-cells = <1>;

> @@ -28,5 +30,6 @@ for Hi3660:

>  		compatible = "hisilicon,hi3660-tsensor";

>  		reg = <0x0 0xfff30000 0x0 0x1000>;

>  		interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;

> +		interrupt-names = "tsensor_a73";


Just 'a73' is sufficient.

>  		#thermal-sensor-cells = <1>;

>  	};