[PATCH RESEND v6 3/6] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3

2015-03-04 Thread Lukasz Majewski
With those bindings it is possible to use pwm-fan device available in
Odroid U3 as a cooling device.

Signed-off-by: Lukasz Majewski 
Acked-by: Eduardo Valentin 
---
Changes for v2:
- Rename cooling-pwm-values property to cooling-levels
Changes for v3:
- Change patch's topic to "ARM dts"
- Reduce maximal cooling-level to 230 from 255
Changes for v4:
- None
Changes for v5:
- None
Changes for v6:
- None
---
 arch/arm/boot/dts/exynos4412-odroidu3.dts | 33 ++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts 
b/arch/arm/boot/dts/exynos4412-odroidu3.dts
index 4c04837..abcfa3c 100644
--- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
@@ -32,9 +32,40 @@
};
};
 
-   pwm-fan {
+   fan0: pwm-fan {
compatible = "pwm-fan";
pwms = < 0 1 0>;
+   cooling-min-state = <0>;
+   cooling-max-state = <3>;
+   #cooling-cells = <2>;
+   cooling-levels = <0 102 170 230>;
+   };
+
+   thermal-zones {
+   cpu_thermal: cpu-thermal {
+   cooling-maps {
+   map0 {
+trip = <_alert1>;
+cooling-device = < 7 7>;
+   };
+   map1 {
+trip = <_alert2>;
+cooling-device = < 13 13>;
+   };
+   map2 {
+trip = <_alert0>;
+cooling-device = < 0 1>;
+   };
+   map3 {
+trip = <_alert1>;
+cooling-device = < 1 2>;
+   };
+   map4 {
+trip = <_alert2>;
+cooling-device = < 2 3>;
+   };
+   };
+   };
};
 };
 
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH RESEND v6 3/6] ARM: dts: Add properties to use pwm-fan device as a cooling device in Odroid U3

2015-03-04 Thread Lukasz Majewski
With those bindings it is possible to use pwm-fan device available in
Odroid U3 as a cooling device.

Signed-off-by: Lukasz Majewski l.majew...@samsung.com
Acked-by: Eduardo Valentin edubez...@gmail.com
---
Changes for v2:
- Rename cooling-pwm-values property to cooling-levels
Changes for v3:
- Change patch's topic to ARM dts
- Reduce maximal cooling-level to 230 from 255
Changes for v4:
- None
Changes for v5:
- None
Changes for v6:
- None
---
 arch/arm/boot/dts/exynos4412-odroidu3.dts | 33 ++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts 
b/arch/arm/boot/dts/exynos4412-odroidu3.dts
index 4c04837..abcfa3c 100644
--- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
@@ -32,9 +32,40 @@
};
};
 
-   pwm-fan {
+   fan0: pwm-fan {
compatible = pwm-fan;
pwms = pwm 0 1 0;
+   cooling-min-state = 0;
+   cooling-max-state = 3;
+   #cooling-cells = 2;
+   cooling-levels = 0 102 170 230;
+   };
+
+   thermal-zones {
+   cpu_thermal: cpu-thermal {
+   cooling-maps {
+   map0 {
+trip = cpu_alert1;
+cooling-device = cpu0 7 7;
+   };
+   map1 {
+trip = cpu_alert2;
+cooling-device = cpu0 13 13;
+   };
+   map2 {
+trip = cpu_alert0;
+cooling-device = fan0 0 1;
+   };
+   map3 {
+trip = cpu_alert1;
+cooling-device = fan0 1 2;
+   };
+   map4 {
+trip = cpu_alert2;
+cooling-device = fan0 2 3;
+   };
+   };
+   };
};
 };
 
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/