<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/thermal.h, branch v3.7.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Thermal: Introduce locking for cdev.thermal_instances list.</title>
<updated>2012-09-24T06:44:37+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-07-24T08:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f4a821ce6ed41970d0155f55067fb07009974fbe'/>
<id>f4a821ce6ed41970d0155f55067fb07009974fbe</id>
<content type='text'>
we need to go over all the thermal_instance list of a cooling device
to decide which cooling state to put the cooling device to.

But at this time, as a cooling device may be referenced in multiple
thermal zones, we need to lock the list first in case
another thermal zone is updating this cooling device.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
we need to go over all the thermal_instance list of a cooling device
to decide which cooling state to put the cooling device to.

But at this time, as a cooling device may be referenced in multiple
thermal zones, we need to lock the list first in case
another thermal zone is updating this cooling device.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: Unify the code for both active and passive cooling</title>
<updated>2012-09-24T06:44:37+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-27T06:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=908b9fb792b77663a007af240e7ee89460de2025'/>
<id>908b9fb792b77663a007af240e7ee89460de2025</id>
<content type='text'>
Remove thermal_zone_device_passive(). And use
thermal_zone_trip_update() and thermal_zone_do_update()
for both active and passive cooling.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove thermal_zone_device_passive(). And use
thermal_zone_trip_update() and thermal_zone_do_update()
for both active and passive cooling.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: Introduce simple arbitrator for setting device cooling state</title>
<updated>2012-09-24T06:44:37+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-27T06:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ce119f83257aae29b84a5bfad0669e8348437b18'/>
<id>ce119f83257aae29b84a5bfad0669e8348437b18</id>
<content type='text'>
This fixes the problem that a cooling device may be referenced by
by multiple trip points in multiple thermal zones.

With this patch, we have two stages for updating a thermal zone,
1. check if a thermal_instance needs to be updated or not
2. update the cooling device, based on the target cooling state
   of all its instances.

Note that, currently, the cooling device is set to the deepest
cooling state required.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the problem that a cooling device may be referenced by
by multiple trip points in multiple thermal zones.

With this patch, we have two stages for updating a thermal zone,
1. check if a thermal_instance needs to be updated or not
2. update the cooling device, based on the target cooling state
   of all its instances.

Note that, currently, the cooling device is set to the deepest
cooling state required.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: List thermal_instance in thermal_cooling_device.</title>
<updated>2012-09-24T06:44:37+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-27T06:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b5e4ae620b06274981781aeadc2aea50b507f7fb'/>
<id>b5e4ae620b06274981781aeadc2aea50b507f7fb</id>
<content type='text'>
List thermal_instance in thermal_cooling_device so that
cooling device can know the cooling state requirement
of all the thermal instances.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
List thermal_instance in thermal_cooling_device so that
cooling device can know the cooling state requirement
of all the thermal instances.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: Rename thermal_zone_device.cooling_devices</title>
<updated>2012-09-24T06:44:37+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-27T02:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d374139d5b0b596cfbd892bf3ec7dacb3049904'/>
<id>2d374139d5b0b596cfbd892bf3ec7dacb3049904</id>
<content type='text'>
Rename thermal_zone_device.cooling_devices
to thermal_zone_device.thermal_instances

thermal_zone_device.cooling_devices is not accurate
as this is a list for thermal instances, rather than cooling devices.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename thermal_zone_device.cooling_devices
to thermal_zone_device.thermal_instances

thermal_zone_device.cooling_devices is not accurate
as this is a list for thermal instances, rather than cooling devices.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: Remove tc1/tc2 in generic thermal layer.</title>
<updated>2012-09-24T06:44:36+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-27T01:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b7ddb840c3908464b19d4aa4f6dc4c463302442'/>
<id>1b7ddb840c3908464b19d4aa4f6dc4c463302442</id>
<content type='text'>
Remove tc1/tc2 in generic thermal layer.
.get_trend() callback starts to take effect from this patch.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Valentin, Eduardo &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove tc1/tc2 in generic thermal layer.
.get_trend() callback starts to take effect from this patch.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Valentin, Eduardo &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: Introduce .get_trend() callback.</title>
<updated>2012-09-24T06:44:36+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-27T01:54:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=601f3d4242be6ed6f72a2aadabc91e8255dad811'/>
<id>601f3d4242be6ed6f72a2aadabc91e8255dad811</id>
<content type='text'>
According to ACPI spec, tc1 and tc2 are used by OSPM
to anticipate the temperature trends.
We introduced the same concept to the generic thermal layer
for passive cooling, but now it seems that these values
are hard to be used on other platforms.

So We introduce .get_trend() as a more general solution.

For the platform thermal drivers that have their own way to
anticipate the temperature trends, they should provide
their own .get_trend() callback.
Or else, we will calculate the temperature trends by simply
comparing the current temperature and the cached previous
temperature reading.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Valentin, Eduardo &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to ACPI spec, tc1 and tc2 are used by OSPM
to anticipate the temperature trends.
We introduced the same concept to the generic thermal layer
for passive cooling, but now it seems that these values
are hard to be used on other platforms.

So We introduce .get_trend() as a more general solution.

For the platform thermal drivers that have their own way to
anticipate the temperature trends, they should provide
their own .get_trend() callback.
Or else, we will calculate the temperature trends by simply
comparing the current temperature and the cached previous
temperature reading.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Valentin, Eduardo &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal: set upper and lower limits</title>
<updated>2012-09-24T06:44:36+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2012-06-26T08:35:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9d99842f99d847191ebd0c28469d2c70fcc5bf9e'/>
<id>9d99842f99d847191ebd0c28469d2c70fcc5bf9e</id>
<content type='text'>
set upper and lower limits when binding
a thermal cooling device to a thermal zone device.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
set upper and lower limits when binding
a thermal cooling device to a thermal zone device.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Reviewed-by: Eduardo Valentin &lt;eduardo.valentin@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for-v3.6' of git://git.infradead.org/battery-2.6</title>
<updated>2012-08-01T01:08:25+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-08-01T01:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b24ff71108164e047cf2c95990b77651163e315'/>
<id>4b24ff71108164e047cf2c95990b77651163e315</id>
<content type='text'>
Pull battery updates from Anton Vorontsov:
 "The tag contains just a few battery-related changes for v3.6.  It's is
  all pretty straightforward, except one thing.

  One of our patches added thermal support for power supply class, but
  thermal/ subsystem changed under our feet.  We (well, Stephen, that
  is) caught the issue and it was decided[1] that I'd just delay the
  battery pull request, and then will fix it up by merging upstream back
  into battery tree at the specific commit.

  That's not all though: another[2] small fixup for thermal subsystem
  was needed to get rid of a warning in power supply subsystem (the
  warning was not drivers/power's "fault", the thermal registration
  function just needed a proper const annotation, which is also done by
  a small commit on top of the merge.

  So, to sum this up:
   - The 'master' branch of the battery tree was in the -next tree for
     weeks, was never rebased, altered etc.  It should be all OK;
   - Although, for-v3.6 tag contains the 'master' branch + merge + the
     warning fix.

  [1] http://lkml.org/lkml/2012/6/19/23
  [2] http://lkml.org/lkml/2012/6/18/28"

* tag 'for-v3.6' of git://git.infradead.org/battery-2.6: (23 commits)
  thermal: Constify 'type' argument for the registration routine
  olpc-battery: update CHARGE_FULL_DESIGN property for BYD LiFe batteries
  olpc-battery: Add VOLTAGE_MAX_DESIGN property
  charger-manager: Fix build break related to EXTCON
  lp8727_charger: Move header file into platform_data directory
  power_supply: Add min/max alert properties for CAPACITY, TEMP, TEMP_AMBIENT
  bq27x00_battery: Add support for BQ27425 chip
  charger-manager: Set current limit of regulator for over current protection
  charger-manager: Use EXTCON Subsystem to detect charger cables for charging
  test_power: Add VOLTAGE_NOW and BATTERY_TEMP properties
  test_power: Add support for USB AC source
  gpio-charger: Use cansleep version of gpio_set_value
  bq27x00_battery: Add support for power average and health properties
  sbs-battery: Don't trigger false supply_changed event
  twl4030_charger: Allow charger to control the regulator that feeds it
  twl4030_charger: Add backup-battery charging
  twl4030_charger: Fix some typos
  max17042_battery: Support CHARGE_COUNTER power supply attribute
  smb347-charger: Add constant charge and current properties
  power_supply: Add constant charge_current and charge_voltage properties
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull battery updates from Anton Vorontsov:
 "The tag contains just a few battery-related changes for v3.6.  It's is
  all pretty straightforward, except one thing.

  One of our patches added thermal support for power supply class, but
  thermal/ subsystem changed under our feet.  We (well, Stephen, that
  is) caught the issue and it was decided[1] that I'd just delay the
  battery pull request, and then will fix it up by merging upstream back
  into battery tree at the specific commit.

  That's not all though: another[2] small fixup for thermal subsystem
  was needed to get rid of a warning in power supply subsystem (the
  warning was not drivers/power's "fault", the thermal registration
  function just needed a proper const annotation, which is also done by
  a small commit on top of the merge.

  So, to sum this up:
   - The 'master' branch of the battery tree was in the -next tree for
     weeks, was never rebased, altered etc.  It should be all OK;
   - Although, for-v3.6 tag contains the 'master' branch + merge + the
     warning fix.

  [1] http://lkml.org/lkml/2012/6/19/23
  [2] http://lkml.org/lkml/2012/6/18/28"

* tag 'for-v3.6' of git://git.infradead.org/battery-2.6: (23 commits)
  thermal: Constify 'type' argument for the registration routine
  olpc-battery: update CHARGE_FULL_DESIGN property for BYD LiFe batteries
  olpc-battery: Add VOLTAGE_MAX_DESIGN property
  charger-manager: Fix build break related to EXTCON
  lp8727_charger: Move header file into platform_data directory
  power_supply: Add min/max alert properties for CAPACITY, TEMP, TEMP_AMBIENT
  bq27x00_battery: Add support for BQ27425 chip
  charger-manager: Set current limit of regulator for over current protection
  charger-manager: Use EXTCON Subsystem to detect charger cables for charging
  test_power: Add VOLTAGE_NOW and BATTERY_TEMP properties
  test_power: Add support for USB AC source
  gpio-charger: Use cansleep version of gpio_set_value
  bq27x00_battery: Add support for power average and health properties
  sbs-battery: Don't trigger false supply_changed event
  twl4030_charger: Allow charger to control the regulator that feeds it
  twl4030_charger: Add backup-battery charging
  twl4030_charger: Fix some typos
  max17042_battery: Support CHARGE_COUNTER power supply attribute
  smb347-charger: Add constant charge and current properties
  power_supply: Add constant charge_current and charge_voltage properties
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: Constify 'type' argument for the registration routine</title>
<updated>2012-07-31T12:45:37+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>anton.vorontsov@linaro.org</email>
</author>
<published>2012-07-31T11:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b1bf5871f7d59de6484cc887e205d6d2f1e6fbd'/>
<id>4b1bf5871f7d59de6484cc887e205d6d2f1e6fbd</id>
<content type='text'>
thermal_zone_device_register() does not modify 'type' argument, so it is
safe to declare it as const. Otherwise, if we pass a const string, we are
getting the ugly warning:

CC drivers/power/power_supply_core.o
drivers/power/power_supply_core.c: In function 'psy_register_thermal':
drivers/power/power_supply_core.c:204:6: warning: passing argument 1 of 'thermal_zone_device_register' discards 'const' qualifier from pointer target type [enabled by default]
include/linux/thermal.h:140:29: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
thermal_zone_device_register() does not modify 'type' argument, so it is
safe to declare it as const. Otherwise, if we pass a const string, we are
getting the ugly warning:

CC drivers/power/power_supply_core.o
drivers/power/power_supply_core.c: In function 'psy_register_thermal':
drivers/power/power_supply_core.c:204:6: warning: passing argument 1 of 'thermal_zone_device_register' discards 'const' qualifier from pointer target type [enabled by default]
include/linux/thermal.h:140:29: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Anton Vorontsov &lt;anton.vorontsov@linaro.org&gt;
Acked-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
