]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Jun 2015 00:51:55 +0000 (17:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Jun 2015 00:51:55 +0000 (17:51 -0700)
Pull thermal management updates from Zhang Rui:
 "Specifics:

   - enhance Thermal Framework with several new capabilities:

       * use power estimates
       * compute weights with relative integers instead of percentages
       * allow governors to have private data in thermal zones
       * export thermal zone parameters through sysfs

     Thanks to the ARM thermal team (Javi, Punit, KP).

   - introduce a new thermal governor: power allocator.  First in kernel
     closed loop PI(D) controller for thermal control.  Thanks to ARM
     thermal team.

   - enhance OF thermal to allow thermal zones to have sustainable power
     HW specification.  Thanks to Punit.

   - introduce thermal driver for Intel Quark SoC x1000platform.  Thanks
     to Ong, Boon Leong.

   - introduce QPNP PMIC temperature alarm driver.  Thanks to Ivan T. I.

   - introduce thermal driver for Hisilicon hi6220.  Thanks to
     kongxinwei.

   - enhance Exynos thermal driver to handle Exynos5433 TMU.  Thanks to
     Chanwoo C.

   - TI thermal driver now has a better implementation for EOCZ bit.
     From Pavel M.

   - add id for Skylake processors in int340x processor thermal driver.

   - a couple of small fixes and cleanups."

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (36 commits)
  thermal: hisilicon: add new hisilicon thermal sensor driver
  dt-bindings: Document the hi6220 thermal sensor bindings
  thermal: of-thermal: add support for reading coefficients property
  thermal: support slope and offset coefficients
  thermal: power_allocator: round the division when divvying up power
  thermal: exynos: Add the support for Exynos5433 TMU
  thermal: cpu_cooling: Fix power calculation when CPUs are offline
  thermal: cpu_cooling: Remove cpu_dev update on policy CPU update
  thermal: export thermal_zone_parameters to sysfs
  thermal: cpu_cooling: Check memory allocation of power_table
  ti-soc-thermal: request temperature periodically if hw can't do that itself
  ti-soc-thermal: implement eocz bit to make driver useful on omap3
  cleanup ti-soc-thermal
  thermal: remove stale THERMAL_POWER_ACTOR select
  thermal: Default OF created trip points to writable
  thermal: core: Add Kconfig option to enable writable trips
  thermal: x86_pkg_temp: drop const for thermal_zone_parameters
  of: thermal: Introduce sustainable power for a thermal zone
  thermal: add trace events to the power allocator governor
  thermal: introduce the Power Allocator governor
  ...

1  2 
drivers/thermal/ti-soc-thermal/ti-bandgap.c

index bc14dc874594e4d9fd37a68874bb6adb6eb4b562,63e2f5ce7e94a212a9b118fa53472f8bfe2f2f8a..10c47c048f7a3b0e4f5538c3698492fd5482c21b
@@@ -113,42 -113,9 +113,40 @@@ static int ti_bandgap_power(struct ti_b
        for (i = 0; i < bgp->conf->sensor_count; i++)
                /* active on 0 */
                RMW_BITS(bgp, i, temp_sensor_ctrl, bgap_tempsoff_mask, !on);
- exit:
-       return ret;
+       return 0;
  }
  
 +/**
 + * ti_errata814_bandgap_read_temp() - helper function to read dra7 sensor temperature
 + * @bgp: pointer to ti_bandgap structure
 + * @reg: desired register (offset) to be read
 + *
 + * Function to read dra7 bandgap sensor temperature. This is done separately
 + * so as to workaround the errata "Bandgap Temperature read Dtemp can be
 + * corrupted" - Errata ID: i814".
 + * Read accesses to registers listed below can be corrupted due to incorrect
 + * resynchronization between clock domains.
 + * Read access to registers below can be corrupted :
 + * CTRL_CORE_DTEMP_MPU/GPU/CORE/DSPEVE/IVA_n (n = 0 to 4)
 + * CTRL_CORE_TEMP_SENSOR_MPU/GPU/CORE/DSPEVE/IVA_n
 + *
 + * Return: the register value.
 + */
 +static u32 ti_errata814_bandgap_read_temp(struct ti_bandgap *bgp,  u32 reg)
 +{
 +      u32 val1, val2;
 +
 +      val1 = ti_bandgap_readl(bgp, reg);
 +      val2 = ti_bandgap_readl(bgp, reg);
 +
 +      /* If both times we read the same value then that is right */
 +      if (val1 == val2)
 +              return val1;
 +
 +      /* if val1 and val2 are different read it third time */
 +      return ti_bandgap_readl(bgp, reg);
 +}
 +
  /**
   * ti_bandgap_read_temp() - helper function to read sensor temperature
   * @bgp: pointer to ti_bandgap structure