[PATCH] ARM: dts: stm32: Enable thermal sensor support on STM32MP157c-ed1

2018-12-07 Thread David HERNANDEZ SANCHEZ
Enable STM32 Digital Thermal Sensor (dts) driver for STM32MP157c-ed1 board. Signed-off-by: David Hernandez Sanchez diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts index c3ecb1e..98ef7a0 100644 --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts +++ b/arch/arm

[PATCH] ARM: dts: stm32: Enable thermal sensor support on STM32MP157c-ed1

2018-12-07 Thread David HERNANDEZ SANCHEZ
Enable STM32 Digital Thermal Sensor (dts) driver for STM32MP157c-ed1 board. Signed-off-by: David Hernandez Sanchez diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts index c3ecb1e..98ef7a0 100644 --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts +++ b/arch/arm

[PATCH] thermal: stm32: read factory settings inside stm_thermal_prepare

2018-12-06 Thread David HERNANDEZ SANCHEZ
-off-by: David Hernandez Sanchez Fixes: 1d693155 ("thermal: add stm32 thermal driver") diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c index 47623da..daa1257 100644 --- a/drivers/thermal/st/stm_thermal.c +++ b/drivers/thermal/st/stm_thermal.c @@ -532

[PATCH] thermal: stm32: read factory settings inside stm_thermal_prepare

2018-12-06 Thread David HERNANDEZ SANCHEZ
-off-by: David Hernandez Sanchez Fixes: 1d693155 ("thermal: add stm32 thermal driver") diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c index 47623da..daa1257 100644 --- a/drivers/thermal/st/stm_thermal.c +++ b/drivers/thermal/st/stm_thermal.c @@ -532

[PATCH] thermal: stm32: Fix stm_thermal_read_factory_settings

2018-12-06 Thread David HERNANDEZ SANCHEZ
Adding brackets allows to multiply the register value, masked by TS1_RAMP_COEFF_MASK, by an ADJUST value properly and not to multiply ADJUST by register value and then mask the whole. Signed-off-by: David Hernandez Sanchez Fixes: 1d693155 ("thermal: add stm32 thermal driver")

[PATCH] thermal: stm32: Fix stm_thermal_read_factory_settings

2018-12-06 Thread David HERNANDEZ SANCHEZ
Adding brackets allows to multiply the register value, masked by TS1_RAMP_COEFF_MASK, by an ADJUST value properly and not to multiply ADJUST by register value and then mask the whole. Signed-off-by: David Hernandez Sanchez Fixes: 1d693155 ("thermal: add stm32 thermal driver")

[PATCH] thermal: stm32: read factory settings properly

2018-12-06 Thread David HERNANDEZ SANCHEZ
Call stm_thermal_read_factory_settings once internal peripheral is properly clocked. To avoid wrong initialization of fmt0 (stm_thermal_sensor struct) member add brackets properly. Change-Id: I150d00fd50e382df04bfad12f0653b1ed6a1db1b Signed-off-by: David Hernandez Sanchez diff --git a/drivers

[PATCH] thermal: stm32: read factory settings properly

2018-12-06 Thread David HERNANDEZ SANCHEZ
Call stm_thermal_read_factory_settings once internal peripheral is properly clocked. To avoid wrong initialization of fmt0 (stm_thermal_sensor struct) member add brackets properly. Change-Id: I150d00fd50e382df04bfad12f0653b1ed6a1db1b Signed-off-by: David Hernandez Sanchez diff --git a/drivers

[PATCH 0/3] Introduce STM32 thermal driver

2018-10-05 Thread David HERNANDEZ SANCHEZ
. Br, David HERNANDEZ SANCHEZ David Hernandez Sanchez (3): dt-bindings: stm32-thermal: add binding documentation thermal: add stm32 thermal driver ARM: dts: stm32: add thermal sensor support on STM32MP157c .../devicetree/bindings/thermal/stm32-thermal.txt | 61 ++ arch/arm/boot/dts

[PATCH 0/3] Introduce STM32 thermal driver

2018-10-05 Thread David HERNANDEZ SANCHEZ
. Br, David HERNANDEZ SANCHEZ David Hernandez Sanchez (3): dt-bindings: stm32-thermal: add binding documentation thermal: add stm32 thermal driver ARM: dts: stm32: add thermal sensor support on STM32MP157c .../devicetree/bindings/thermal/stm32-thermal.txt | 61 ++ arch/arm/boot/dts

[PATCH 2/3] thermal: add stm32 thermal driver

2018-10-05 Thread David HERNANDEZ SANCHEZ
reset. Signed-off-by: David Hernandez Sanchez diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 0e69edc..5422523 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -432,7 +432,7 @@ source "drivers/thermal/samsung/Kconfig" endmenu menu "STM

[PATCH 2/3] thermal: add stm32 thermal driver

2018-10-05 Thread David HERNANDEZ SANCHEZ
reset. Signed-off-by: David Hernandez Sanchez diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 0e69edc..5422523 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -432,7 +432,7 @@ source "drivers/thermal/samsung/Kconfig" endmenu menu "STM

[PATCH 3/3] ARM: dts: stm32: add thermal sensor support on STM32MP157c

2018-10-05 Thread David HERNANDEZ SANCHEZ
Add configuration on DT for thermal sensor driver Signed-off-by: David Hernandez Sanchez diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi index 661be94..e90b9f6 100644 --- a/arch/arm/boot/dts/stm32mp157c.dtsi +++ b/arch/arm/boot/dts/stm32mp157c.dtsi @@ -84,6

[PATCH 1/3] dt-bindings: stm32-thermal: add binding documentation

2018-10-05 Thread David HERNANDEZ SANCHEZ
Add thermal binding documentation for STM32 DTS sensor Signed-off-by: David Hernandez Sanchez diff --git a/Documentation/devicetree/bindings/thermal/stm32-thermal.txt b/Documentation/devicetree/bindings/thermal/stm32-thermal.txt new file mode 100644 index 000..8c0d5a4 --- /dev/null +++ b

[PATCH 3/3] ARM: dts: stm32: add thermal sensor support on STM32MP157c

2018-10-05 Thread David HERNANDEZ SANCHEZ
Add configuration on DT for thermal sensor driver Signed-off-by: David Hernandez Sanchez diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi index 661be94..e90b9f6 100644 --- a/arch/arm/boot/dts/stm32mp157c.dtsi +++ b/arch/arm/boot/dts/stm32mp157c.dtsi @@ -84,6

[PATCH 1/3] dt-bindings: stm32-thermal: add binding documentation

2018-10-05 Thread David HERNANDEZ SANCHEZ
Add thermal binding documentation for STM32 DTS sensor Signed-off-by: David Hernandez Sanchez diff --git a/Documentation/devicetree/bindings/thermal/stm32-thermal.txt b/Documentation/devicetree/bindings/thermal/stm32-thermal.txt new file mode 100644 index 000..8c0d5a4 --- /dev/null +++ b