- 05 5月, 2015 2 次提交
-
-
由 Javi Merino 提交于
The fair share governor has the concept of weights, which is the influence of each cooling device in a thermal zone. The current implementation forces the weights of all cooling devices in a thermal zone to add up to a 100. This complicates setups, as you need to know in advance how many cooling devices you are going to have. If you bind a new cooling device, you have to modify all the other cooling devices weights, which is error prone. Furthermore, you can't specify a "default" weight for platforms since that default value depends on the number of cooling devices in the platform. This patch generalizes the concept of weight by allowing any number to be a "weight". Weights are now relative to each other. Platforms that don't specify weights get the same default value for all their cooling devices, so all their cdevs are considered to be equally influential. It's important to note that previous users of the weights don't need to alter the code: percentages continue to work as they used to. This patch just removes the constraint of all the weights in a thermal zone having to add up to a 100. If they do, you get the same behavior as before. If they don't, fair share now works for that platform. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Durgadoss R <durgadoss.r@intel.com> Acked-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NJavi Merino <javi.merino@arm.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Kapileshwar Singh 提交于
Currently you can specify the weight of the cooling device in the device tree but that information is not populated to the thermal_bind_params where the fair share governor expects it to be. The of thermal zone device doesn't have a thermal_bind_params structure and arguably it's better to pass the weight inside the thermal_instance as it is specific to the bind of a cooling device to a thermal zone parameter. Core thermal code is fixed to populate the weight in the instance from the thermal_bind_params, so platform code that was passing the weight inside the thermal_bind_params continue to work seamlessly. While we are at it, create a default value for the weight parameter for those thermal zones that currently don't define it and remove the hardcoded default in of-thermal. Cc: Zhang Rui <rui.zhang@intel.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Len Brown <lenb@kernel.org> Cc: Peter Feuerer <peter@piie.net> Cc: Darren Hart <dvhart@infradead.org> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Kukjin Kim <kgene@kernel.org> Cc: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: NKapileshwar Singh <kapileshwar.singh@arm.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 25 2月, 2015 1 次提交
-
-
由 Nishanth Menon 提交于
When CONFIG_THERMAL is not enabled, it is better to introduce equivalent dummy functions in the exported header than to introduce #ifdeffery in drivers using the function. This will prevent issues such as that reported in: http://www.spinics.net/lists/linux-next/msg31573.html While at it switch over to IS_ENABLED for thermal macros to allow for thermal framework to be built as framework and relevant APIs be usable by relevant drivers as a result. Reported-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NNishanth Menon <nm@ti.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 10 12月, 2014 1 次提交
-
-
由 Punit Agrawal 提交于
The size of unsigned long varies between 32 and 64 bit systems while the size of phandle arguments is always 32 bits per parameter. On 64-bit systems, cooling devices registered via of-thermal apis fail to bind when the min/max cooling state is specified as THERMAL_NO_LIMIT (-1UL) as there is a mis-match between the value read from the device tree (32bit) and the pre-processor define (64bit). As we're unlikely to need cooling states larger than 32 bits, and for consistency with the size of phandle arguments, explicitly limit THERMAL_NO_LIMIT to 32 bits. Reported-by: NHyungwoo Yang <hwoo.yang@gmail.com> Acked-by: NZhang Rui <rui.zhang@intel.com> Signed-off-by: NPunit Agrawal <punit.agrawal@arm.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 09 12月, 2014 3 次提交
-
-
由 Florian Fainelli 提交于
include/linux/thermal.h contains definitions for the Thermal generic netlink family, but none of the valuable information relevant to user-space such as the Genl family name, multicast group, version or command set and data types is exported to user-space. Export all the relevant generic netlink information to user-space to make this genl family usable by user-space, and while at it, export THERMAL_NAME_LENGTH since it limits name length for thermal_hwmon devices. Kbuild and MAINTAINERS are also updated accordingly to reflect this new file: include/uapi/linux/thermal.h. Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Lukasz Majewski 提交于
Before this change it was only possible to set get_temp() and get_trend() methods to be used in the common code handling passing parameters via device tree to "cpu-thermal" CPU thermal zone device. Now it is possible to also set emulated value of temperature for debug purposes. Signed-off-by: NLukasz Majewski <l.majewski@samsung.com> Acked-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Lukasz Majewski 提交于
This patch changes name of struct __thermal_trip to thermal_trip and moves declaration of the latter to ./include/linux/thermal.h for better visibility. Signed-off-by: NLukasz Majewski <l.majewski@samsung.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 20 11月, 2014 1 次提交
-
-
由 Eduardo Valentin 提交于
Different drivers request API extensions in of-thermal. For this reason, additional callbacks are required to fit the new drivers needs. The current API implementation expects the registering sensor driver to provide a get_temp and get_trend callbacks as function parameters. As the amount of callbacks is growing, this patch changes the existing implementation to use a .ops field to hold all the of thermal callbacks to sensor drivers. This patch also changes the existing of-thermal users to fit the new API design. No functional change is introduced in this patch. Cc: Alexandre Courbot <gnurou@gmail.com> Cc: devicetree@vger.kernel.org Cc: Grant Likely <grant.likely@linaro.org> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Jean Delvare <jdelvare@suse.de> Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: lm-sensors@lm-sensors.org Cc: Rob Herring <robh+dt@kernel.org> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Zhang Rui <rui.zhang@intel.com> Acked-by: NGuenter Roeck <linux@roeck-us.net> Tested-by: NMikko Perttunen <mikko.perttunen@kapsi.fi> Reviewed-by: NMikko Perttunen <mikko.perttunen@kapsi.fi> Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com> Reviewed-by: NLukasz Majewski <l.majewski@samsung.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 10 10月, 2014 2 次提交
-
-
由 Aaron Lu 提交于
ACPI INT3402 device object could report temperature for the memory module. To expose such information to user space, a thermal zone device is registered for it so that the thermal sysfs interface can expose such information for userspace to use. Signed-off-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Aaron Lu 提交于
This macro can be used by other component so move it to a common header, but in a slightly different way: define two macros, one macro with an offset and the other doesn't. Signed-off-by: NAaron Lu <aaron.lu@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 22 7月, 2014 1 次提交
-
-
由 Javi Merino 提交于
Document struct thermal_zone_device and struct thermal_governor fields and their use by the thermal framework code. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: NJavi Merino <javi.merino@arm.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 04 12月, 2013 2 次提交
-
-
由 Eduardo Valentin 提交于
This patch adds a new API to allow registering cooling devices in the thermal framework derived from device tree nodes. This API links the cooling device with the device tree node so that binding with thermal zones is possible, given that thermal zones are pointing to cooling device device tree nodes. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Eduardo Valentin 提交于
This patch introduces a device tree bindings for describing the hardware thermal behavior and limits. Also a parser to read and interpret the data and feed it in the thermal framework is presented. This patch introduces a thermal data parser for device tree. The parsed data is used to build thermal zones and thermal binding parameters. The output data can then be used to deploy thermal policies. This patch adds also documentation regarding this API and how to define tree nodes to use this infrastructure. Note that, in order to be able to have control on the sensor registration on the DT thermal zone, it was required to allow changing the thermal zone .get_temp callback. For this reason, this patch also removes the 'const' modifier from the .ops field of thermal zone devices. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: NMark Rutland <mark.rutland@arm.com> Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
- 03 9月, 2013 2 次提交
-
-
由 Eduardo Valentin 提交于
When registering a thermal zone device using platform information via bind_params, the thermal framework will always perform the cdev binding using the lowest and highest limits (THERMAL_NO_LIMIT). This patch changes the data structures so that it is possible to inform what are the desired limits for each trip point inside a bind_param. The way the binding is performed is also changed so that it uses the new data structure. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Eduardo Valentin 提交于
When registering a new thermal_device, the thermal framework will always add a hwmon sysfs interface. This patch adds a flag to make this behavior optional. Now when registering a new thermal device, the caller can optionally inform if hwmon interface is desirable. This can be done by means of passing a thermal_zone_params.no_hwmon == true. In order to keep same behavior as of today, all current calls will by default create the hwmon interface. Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-acpi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: Zhang Rui <rui.zhang@intel.com> Suggested-by: NWei Ni <wni@nvidia.com> Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
- 25 4月, 2013 1 次提交
-
-
由 Eduardo Valentin 提交于
To follow the prefix names used by the thermal functions, this patch renames notify_thermal_framework to thermal_notify_framework. Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 15 4月, 2013 2 次提交
-
-
由 Eduardo Valentin 提交于
This patch exports the thermal_zone_get_temp API so that driver writers can fetch temperature of thermal zones managed by other drivers. Acked-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Eduardo Valentin 提交于
This patch adds a helper function to get a reference of a thermal zone, based on the zone type name. It will perform a zone name lookup and return a reference to a thermal zone device that matches the name requested. In case the zone is not found or when several zones match same name or if the required parameters are invalid, it will return the corresponding error code (ERR_PTR). Cc: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com> Acked-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 14 4月, 2013 1 次提交
-
-
由 Zhang Rui 提交于
The thermal governors are part of the thermal framework, rather than a seperate feature/module. Because the generic thermal layer can not work without thermal governors, and it must load the thermal governors during its initialization. Build them into one module in this patch. This also fix a problem that the generic thermal layer does not work when CONFIG_THERMAL=m and CONFIG_THERMAL_GOV_XXX=y. Signed-off-by: NZhang Rui <rui.zhang@intel.com> Acked-by: NEduardo Valentin <eduardo.valentin@ti.com> Acked-by: NDurgadoss R <durgadoss.r@intel.com>
-
- 26 3月, 2013 2 次提交
-
-
由 Ezequiel Garcia 提交于
The following warning is obtained when CONFIG_NET is not defined: In file included from drivers/thermal/mvebu_thermal.c:27:0: include/linux/thermal.h:254:12: warning: 'thermal_generate_netlink_event' defined but not used [-Wunused-function] This patch fixes the warning by properly inlining thermal_generate_netlink_event(). Signed-off-by: NEzequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Zhang Rui 提交于
Signed-off-by: NZhang Rui <rui.zhang@intel.com> Tested-by: NAmit Daniel kachhap <amit.daniel@samsung.com>
-
- 21 3月, 2013 1 次提交
-
-
由 Masatake YAMATO 提交于
The original name is too long. Signed-off-by: NMasatake YAMATO <yamato@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 2月, 2013 1 次提交
-
-
由 Amit Daniel Kachhap 提交于
This patch adds support to set the emulated temperature method in thermal zone (sensor). After setting this feature thermal zone may report this temperature and not the actual temperature. The emulation implementation may be based on sensor capability through platform specific handler or pure software emulation if no platform handler defined. This is useful in debugging different temperature threshold and its associated cooling action. Critical threshold's cannot be emulated. Writing 0 on this node should disable emulation. Signed-off-by: NAmit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: NKukjin Kim <kgene.kim@samsung.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 16 1月, 2013 1 次提交
-
-
由 Eduardo Valentin 提交于
This patch changes the function thermal_generate_netlink_event to receive a thermal zone device instead of a originator id. This way, the messages will always be bound to a thermal zone. Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com> Reviewed-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 04 1月, 2013 1 次提交
-
-
由 Zhang Rui 提交于
These two new thermal_trend types are used to tell the governor that the temeprature is raising/dropping quickly. Thermal cooling governors should handle this situation and make proper decisions, e.g. set cooling state to upper/lower limit directly instead of one step each time. Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 12 12月, 2012 1 次提交
-
-
由 Zhang Rui 提交于
Fix DEFAULT_THERMAL_GOVERNOR to be consistant with the default governor selected in kernel config file. Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 05 11月, 2012 7 次提交
-
-
由 Durgadoss R 提交于
This patch adds a notification API which the sensor drivers' can use to notify the framework. The framework then takes care of the throttling according to the configured policy. Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Durgadoss R 提交于
This patch makes the thermal_cdev_update function as a global one, so that other files can use it. This function serves as a single arbitrator to set the state of a cooling device. Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Durgadoss R 提交于
This patch creates a structure to hold platform thermal governor information, and provides APIs for individual thermal governors to register/unregister with the Thermal framework. Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Durgadoss R 提交于
This patch adds the thermal zone parameter as an argument to the tzd_register() function call; and updates other drivers using this function. Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Durgadoss R 提交于
This patch adds platform level information to thermal.h by introducing two structures to hold: * bind parameters for a thermal zone, * zone level platform parameters Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Durgadoss R 提交于
This patch adds the following API's to thermal_sys.c, that can be used by other Thermal drivers. * get_tz_trend: obtain the trend of the given thermal zone * get_thermal_instance: obtain the instance corresponding to the given tz, cdev and the trip point. Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
由 Durgadoss R 提交于
This patch rearranges the code in thermal.h file, in the following order, so that it is easy to read/maintain. 1. All #defines 2. All enums 3. All fops structures 4. All device structures 5. All function declarations Signed-off-by: NDurgadoss R <durgadoss.r@intel.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 24 9月, 2012 7 次提交
-
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NEduardo Valentin <eduardo.valentin@ti.com>
-
由 Zhang Rui 提交于
Remove tc1/tc2 in generic thermal layer. .get_trend() callback starts to take effect from this patch. Signed-off-by: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NValentin, Eduardo <eduardo.valentin@ti.com>
-
由 Zhang Rui 提交于
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: NZhang Rui <rui.zhang@intel.com> Reviewed-by: NRafael J. Wysocki <rjw@sisk.pl> Reviewed-by: NValentin, Eduardo <eduardo.valentin@ti.com>
-