Skip to content

Thermal Framework Enhancements

Durgadoss R linux-pm lkml 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest10 patches 3 repliesIn review
  2. v4 posting 2/29 patches 13 repliesApplied
  3. v3 posting 2/28 patches 30 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v2 posting 2/29 patches20 repliesSuperseded
v4 posting 1/215 patches10 repliesSuperseded
v3 posting 1/215 patches8 repliesSuperseded
v2 posting 1/214 patches19 repliesSuperseded
v113 patches47 repliesSuperseded

Changes in v5 from the cover letter

* Cleaned up the thermal_release function; Now all kfree's are done in _unregister functions.
* Kconfig option to selectively enable and use this new version of thermal_core.c
* According to a previous comment from Rui, moved all new API's into a file named thermal_core_new.c

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10Thermal: Do kfree in _unregister functionsdrivers/thermal/thermal_core.c+5 -122 replies
2/10Thermal: Create sensor level APIsdrivers/thermal/Kconfig drivers/thermal/Makefile drivers/thermal/thermal_core.c +3 more+410 -10 replies
3/10Thermal: Add cooling device APIsdrivers/thermal/thermal_core_new.c include/linux/thermal.h+196 -01 reply
4/10Thermal: Create zone level APIsdrivers/thermal/thermal_core_new.c include/linux/thermal.h+291 -00 replies
5/10Thermal: Add APIs to bind cdev to new zone structuredrivers/thermal/thermal_core_new.c include/linux/thermal.h+143 -00 replies
6/10Thermal: Add trip point sysfs nodes for sensordrivers/thermal/thermal_core_new.c include/linux/thermal.h+395 -20 replies
7/10Thermal: Create Thermal map sysfs attributes for a zonedrivers/thermal/thermal_core_new.c include/linux/thermal.h+300 -00 replies
8/10Thermal: Add Documentation to new APIsDocumentation/thermal/sysfs-api2.txt+240 -00 replies
9/10Thermal: Add ABI Documentation for sysfs interfacesDocumentation/ABI/testing/sysfs-class-thermal+137 -00 replies
10/10Thermal: Dummy driver used for testingdrivers/thermal/Kconfig drivers/thermal/Makefile drivers/thermal/thermal_test.c+331 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCHv5 00/10] Thermal Framework Enhancements

This patch set is a v5 of the previous versions submitted here:
[v4]: http://lwn.net/Articles/568988/
[v3]: https://lkml.org/lkml/2013/2/5/228
[v2]: http://lwn.net/Articles/531720/
[v1]: https://lkml.org/lkml/2012/12/18/108
[RFC]:https://patchwork.kernel.org/patch/1758921/

This patch set is based on Rui's -next tree, on top of commit 'c698a4492f01127ca90fc28cd5157f3d616fe4ff' This is tested on a Core-i5 running ubuntu 12.04.

Changes since v4:
* Cleaned up the thermal_release function; Now all kfree's are done in _unregister functions.
* Kconfig option to selectively enable and use this new version of thermal_core.c
* According to a previous comment from Rui, moved all new API's into a file named thermal_core_new.c
Changes since v3:
* Added a patch to conditionally do kfree(cdev) in thermal_release function.
* Reworked all sysfs attributes to have one value per file This includes sensor_trip_* and map_weight* attributes.
* Added 'lock' variable in thermal_zone structure to protect its members.
* Added Documentation to all functions in thermal_core.c
* Changes all strcpy() to strlcpy()
* Used devm_kzalloc() in places where applicable
* Address some buffer overflow conditions and contentions in tz->sensors[] and tz->cdevs[].
Changes since v2:
* Reworked the map sysfs attributes in patch [5/8]
* Dropped configuration for maximum sensors and cooling devices, through Kconfig.
* Added __remove_trip_attr method
* Renamed __clean_map_entry to __remove_map_entry for consistency in naming.
Changes Since v1:
* Removed kobject creation for thermal_trip and thermal_map nodes as per Greg-KH's comments.
* Added ABI Documentation under 'testing'.
* Modified the GET_INDEX macro to be more linux-like, thanks to Joe Perches.
* Added get_[sensor/cdev]_by_name APIs to thermal.h

This series contains 10 patches:
Patch 1/10: Remove code from thermal_release function.
Do kfree in _unregister functions.
Patch 2/10: Creates new sensor level APIs
Patch 3/10: Adds new cooling device APIs
Patch 4/10: Creates new zone level APIs. The existing tzd structure is
kept as such for clarity and compatibility purposes.
Patch 5/10: Creates functions to add/remove a cdev to/from a zone. The
existing tcd structure need not be modified.
Patch 6/10: Adds sensorX_trip_[active/passive/hot/critical] sysfs nodes,
under /sys/class/thermal/zoneY/. This exposes various trip points for sensorX present in zoneY.
Patch 7/10: Adds mapY_* sysfs node. These attributes represent the
relationship between various sensors and cooling devices in a thermal zone.
Patch 8/10: Creates Documentation for the new APIs. A new file is
created for clarity. Final goal is to merge with the existing file or refactor the files, as whatever seems appropriate.
Patch 9/10: Add ABI documentation for sysfs interfaces introduced in this patch. Patch 10/10: A dummy driver that can be used for testing. This is not for merge.

Thanks to Rui for helping me in resolving some
Kconfig issues, related to this series.

Durgadoss R (10):
Thermal: Do kfree in _unregister functions
Thermal: Create sensor level APIs
Thermal: Add cooling device APIs
Thermal: Create zone level APIs
Thermal: Add APIs to bind cdev to new zone structure
Thermal: Add trip point sysfs nodes for sensor
Thermal: Create Thermal map sysfs attributes for a zone
Thermal: Add Documentation to new APIs
Thermal: Add ABI Documentation for sysfs interfaces
Thermal: Dummy driver used for testing

 Documentation/ABI/testing/sysfs-class-thermal |  137 +++
 Documentation/thermal/sysfs-api2.txt          |  240 ++++
 drivers/thermal/Kconfig                       |    9 +
 drivers/thermal/Makefile                      |    4 +
 drivers/thermal/thermal_core.c                |   19 +-
 drivers/thermal/thermal_core.h                |    1 +
 drivers/thermal/thermal_core_new.c            | 1585 +++++++++++++++++++++++++
 drivers/thermal/thermal_test.c                |  322 +++++
 include/linux/thermal.h                       |  144 ++-
 9 files changed, 2447 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-thermal
 create mode 100644 Documentation/thermal/sysfs-api2.txt
 create mode 100644 drivers/thermal/thermal_core_new.c
 create mode 100644 drivers/thermal/thermal_test.c
Signature · 1 line
1.7.9.5