Robert Lee | 19 Jan 03:27 2012

[RFC PATCH v4] ARM: imx: Add basic imx6q thermal management

Based on v3.2 plus recently submitted cpu_cooling functionality here:

http://www.spinics.net/lists/linux-pm/msg26500.html

link to previous submissions:
v3: http://www.spinics.net/lists/arm-kernel/msg155955.html
v2: http://www.spinics.net/lists/arm-kernel/msg155790.html
v1: http://www.spinics.net/lists/arm-kernel/msg155111.html

Changes in v4:
1.  Removed bad suspend/resume assignment into thermal class.  After further
examination and discussion with SoC designers, a sequence is now used 
for making measurements that is is unaffected by system suspendresumes.  
Temp Sensor automatically powers off in hardware during the low power mode
caused by a system suspend.
2.  Moved some structures from static to dynamic allocation.
3.  Added some noise handling to temperatuer sensor readings.

Changes in v3:
1. Fixed the various issues pointed out in v2
2. Made other code cleanup and a bit of re-organizing
3. Removed unecessary platform driver and device.

Changes in v2:
1. Cleaned up some style issues pointed out in v1
2. Made various other code cleanup and re-organizing
3. Added temperature sensor calibration
4. Created platform driver and device to hook into pm suspend.

Performed some basic testing to ensure proper cooling operating.  If
(Continue reading)

Robert Lee | 19 Jan 03:27 2012

[RFC PATCH v4] ARM: imx: Add basic imx6q thermal management

Adds support for temperature sensor readings, registers with common
thermal framework, and uses the new common cpu_cooling interface.

Signed-off-by: Robert Lee <rob.lee <at> linaro.org>
---
 arch/arm/boot/dts/imx6q.dtsi    |    1 +
 drivers/thermal/Kconfig         |    6 +
 drivers/thermal/Makefile        |    1 +
 drivers/thermal/imx6q_thermal.c |  540 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 548 insertions(+), 0 deletions(-)
 create mode 100644 drivers/thermal/imx6q_thermal.c

diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index 7dda599..d62b88d 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
 <at>  <at>  -508,6 +508,7  <at>  <at> 
 			};

 			ocotp <at> 021bc000 {
+				compatible = "fsl,imx6q-ocotp";
 				reg = <0x021bc000 0x4000>;
 			};

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 298c1cd..dd8cede 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
 <at>  <at>  -29,3 +29,9  <at>  <at>  config CPU_THERMAL
 	  This will be useful for platforms using the generic thermal interface
(Continue reading)

Dirk Behme | 13 Jun 10:46 2012

Re: [RFC PATCH v4] ARM: imx: Add basic imx6q thermal management

On 19.01.2012 03:27, Robert Lee wrote:
> Adds support for temperature sensor readings, registers with common
> thermal framework, and uses the new common cpu_cooling interface.
> 
> Signed-off-by: Robert Lee <rob.lee <at> linaro.org>
> ---
>  arch/arm/boot/dts/imx6q.dtsi    |    1 +
>  drivers/thermal/Kconfig         |    6 +
>  drivers/thermal/Makefile        |    1 +
>  drivers/thermal/imx6q_thermal.c |  540 +++++++++++++++++++++++++++++++++++++++
>  4 files changed, 548 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/thermal/imx6q_thermal.c
...
> +static int __init imx6q_thermal_init(void)
> +{
> +       struct device_node *np_ocotp, *np_anatop;
> +       unsigned int fuse_data;
> +       int ret;
> +
> +       np_ocotp = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ocotp");
> +       np_anatop = of_find_compatible_node(NULL, NULL, "fsl,imx6q-anatop");
> +
> +       if (!(np_ocotp && np_anatop))
> +               return -ENXIO; /* not a compatible platform */
> +
> +       ocotp_base = of_iomap(np_ocotp, 0);
> +
> +       if (!ocotp_base) {
> +               pr_err("Could not retrieve ocotp-base\n");
> +               ret = -ENXIO;
(Continue reading)


Gmane