Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Mar 2013 03:48:26 +0000 (19:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Mar 2013 03:48:26 +0000 (19:48 -0800)
Pull thermal management updates from Zhang Rui:
 "Highlights:

   - introduction of Dove thermal sensor driver.

   - introduction of Kirkwood thermal sensor driver.

   - introduction of intel_powerclamp thermal cooling device driver.

   - add interrupt and DT support for rcar thermal driver.

   - add thermal emulation support which allows platform thermal driver
     to do software/hardware emulation for thermal issues."

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (36 commits)
  thermal: rcar: remove __devinitconst
  thermal: return an error on failure to register thermal class
  Thermal: rename thermal governor Kconfig option to avoid generic naming
  thermal: exynos: Use the new thermal trend type for quick cooling action.
  Thermal: exynos: Add support for temperature falling interrupt.
  Thermal: Dove: Add Themal sensor support for Dove.
  thermal: Add support for the thermal sensor on Kirkwood SoCs
  thermal: rcar: add Device Tree support
  thermal: rcar: remove machine_power_off() from rcar_thermal_notify()
  thermal: rcar: add interrupt support
  thermal: rcar: add read/write functions for common/priv data
  thermal: rcar: multi channel support
  thermal: rcar: use mutex lock instead of spin lock
  thermal: rcar: enable CPCTL to use hardware TSC deciding
  thermal: rcar: use parenthesis on macro
  Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared
  Thermal: fix a wrong comment
  thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation
  PM: intel_powerclamp: off by one in start_power_clamp()
  thermal: exynos: Miscellaneous fixes to support falling threshold interrupt
  ...

1  2 
drivers/thermal/cpu_cooling.c
drivers/thermal/exynos_thermal.c
drivers/thermal/thermal_sys.c
kernel/time/tick-sched.c

Simple merge
index bada1308318bc0cd31b94cb8433508b04a898b8d,64aa8b445054cc3d24ec1544e6a07b164e5cd00f..e04ebd8671aca27dc390c32d6ec00d6033c7d7ae
@@@ -832,7 -852,95 +852,95 @@@ static inline struct  exynos_tmu_platfo
        return (struct exynos_tmu_platform_data *)
                        platform_get_device_id(pdev)->driver_data;
  }
 -static int __devinit exynos_tmu_probe(struct platform_device *pdev)
+ #ifdef CONFIG_EXYNOS_THERMAL_EMUL
+ static ssize_t exynos_tmu_emulation_show(struct device *dev,
+                                        struct device_attribute *attr,
+                                        char *buf)
+ {
+       struct platform_device *pdev = container_of(dev,
+                                       struct platform_device, dev);
+       struct exynos_tmu_data *data = platform_get_drvdata(pdev);
+       unsigned int reg;
+       u8 temp_code;
+       int temp = 0;
+       if (data->soc == SOC_ARCH_EXYNOS4210)
+               goto out;
+       mutex_lock(&data->lock);
+       clk_enable(data->clk);
+       reg = readl(data->base + EXYNOS_EMUL_CON);
+       clk_disable(data->clk);
+       mutex_unlock(&data->lock);
+       if (reg & EXYNOS_EMUL_ENABLE) {
+               reg >>= EXYNOS_EMUL_DATA_SHIFT;
+               temp_code = reg & EXYNOS_EMUL_DATA_MASK;
+               temp = code_to_temp(data, temp_code);
+       }
+ out:
+       return sprintf(buf, "%d\n", temp * MCELSIUS);
+ }
+ static ssize_t exynos_tmu_emulation_store(struct device *dev,
+                                       struct device_attribute *attr,
+                                       const char *buf, size_t count)
+ {
+       struct platform_device *pdev = container_of(dev,
+                                       struct platform_device, dev);
+       struct exynos_tmu_data *data = platform_get_drvdata(pdev);
+       unsigned int reg;
+       int temp;
+       if (data->soc == SOC_ARCH_EXYNOS4210)
+               goto out;
+       if (!sscanf(buf, "%d\n", &temp) || temp < 0)
+               return -EINVAL;
+       mutex_lock(&data->lock);
+       clk_enable(data->clk);
+       reg = readl(data->base + EXYNOS_EMUL_CON);
+       if (temp) {
+               /* Both CELSIUS and MCELSIUS type are available for input */
+               if (temp > MCELSIUS)
+                       temp /= MCELSIUS;
+               reg = (EXYNOS_EMUL_TIME << EXYNOS_EMUL_TIME_SHIFT) |
+                       (temp_to_code(data, (temp / MCELSIUS))
+                        << EXYNOS_EMUL_DATA_SHIFT) | EXYNOS_EMUL_ENABLE;
+       } else {
+               reg &= ~EXYNOS_EMUL_ENABLE;
+       }
+       writel(reg, data->base + EXYNOS_EMUL_CON);
+       clk_disable(data->clk);
+       mutex_unlock(&data->lock);
+ out:
+       return count;
+ }
+ static DEVICE_ATTR(emulation, 0644, exynos_tmu_emulation_show,
+                                       exynos_tmu_emulation_store);
+ static int create_emulation_sysfs(struct device *dev)
+ {
+       return device_create_file(dev, &dev_attr_emulation);
+ }
+ static void remove_emulation_sysfs(struct device *dev)
+ {
+       device_remove_file(dev, &dev_attr_emulation);
+ }
+ #else
+ static inline int create_emulation_sysfs(struct device *dev) { return 0; }
+ static inline void remove_emulation_sysfs(struct device *dev) {}
+ #endif
 +static int exynos_tmu_probe(struct platform_device *pdev)
  {
        struct exynos_tmu_data *data;
        struct exynos_tmu_platform_data *pdata = pdev->dev.platform_data;
@@@ -980,10 -1099,10 +1097,10 @@@ static struct platform_driver exynos_tm
                .name   = "exynos-tmu",
                .owner  = THIS_MODULE,
                .pm     = EXYNOS_TMU_PM,
-               .of_match_table = exynos_tmu_match,
+               .of_match_table = of_match_ptr(exynos_tmu_match),
        },
        .probe = exynos_tmu_probe,
 -      .remove = __devexit_p(exynos_tmu_remove),
 +      .remove = exynos_tmu_remove,
        .id_table = exynos_tmu_driver_ids,
  };
  
Simple merge
Simple merge