android_kernel_samsung_msm8976/include/linux/msm_thermal.h

357 lines
11 KiB
C
Raw Permalink Normal View History

/*
* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MSM_THERMAL_H
#define __MSM_THERMAL_H
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
#include <linux/thermal.h>
#define MAX_THRESHOLD 2
#define TSENS_NAME_MAX 20
#define MONITOR_ALL_TSENS -1
msm: thermal: Add support for device manager in KTM Add support for device manager framework to KTM. Device manager allows for aggregation of muliple kernel clients request on mitigation devices. Clients can set and register for device change notifications. Currently it supports hotplug device and cpuX (X= 0... NR_CPUS - 1) devices. Device manager framework exports below 3 APIs for a device for clients to use. 1. struct device_clnt_data *devmgr_register_mitigation_client( struct device *dev, const char *device_name, void (*callback)(struct device_clnt_data *, union device_request *, void *)) API to register mitigation device. This API returns handle, which should be used by clients when placing mitigation request. It supports to register for device change notification with callback as an optional parameter to client. @dev: Client device structure. @device_name: Mitgation device name which the client is interested to mitigate. @callback: Optional callback pointer for device change notification, otherwise pass NULL. Returns client handle structure for that device on success, or NULL with IS_ERR() condition containing error number. 2. int devmgr_client_request_mitigation(struct device_clnt_data *clnt, enum device_req_type type, union device_request *req); API for clients to set valid mitigation for a registered device. @clnt: Client handle for device. @type: Type of device request populated above. @req: Valid mitigation request. Returns zero on successful mitigation update or negative error number. 3. void devmgr_unregister_mitigation_client( struct device *dev, struct device_clnt_data *clnt) API for clients to unregister for a device whenever it is done with device. @dev: Client device structure. @clnt: Client handle for device. Change-Id: Ieda99577a035a32b745df6b004b5487a55ec70ac Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-27 20:38:22 +00:00
#define HOTPLUG_DEVICE "hotplug"
#define CPU0_DEVICE "cpu0"
#define CPU1_DEVICE "cpu1"
#define CPU2_DEVICE "cpu2"
#define CPU3_DEVICE "cpu3"
#define CPU4_DEVICE "cpu4"
#define CPU5_DEVICE "cpu5"
#define CPU6_DEVICE "cpu6"
#define CPU7_DEVICE "cpu7"
#define CPUFREQ_MAX_NO_MITIGATION UINT_MAX
#define CPUFREQ_MIN_NO_MITIGATION 0
#define HOTPLUG_NO_MITIGATION(_mask) cpumask_clear(_mask)
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
#define IS_HI_THRESHOLD_SET(_val) (_val & 1)
#define IS_LOW_THRESHOLD_SET(_val) (_val & 2)
struct msm_thermal_data {
struct platform_device *pdev;
uint32_t sensor_id;
uint32_t poll_ms;
int32_t limit_temp_degC;
int32_t temp_hysteresis_degC;
uint32_t bootup_freq_step;
uint32_t bootup_freq_control_mask;
int32_t core_limit_temp_degC;
int32_t core_temp_hysteresis_degC;
int32_t hotplug_temp_degC;
int32_t hotplug_temp_hysteresis_degC;
uint32_t core_control_mask;
uint32_t freq_mitig_temp_degc;
uint32_t freq_mitig_temp_hysteresis_degc;
uint32_t freq_mitig_control_mask;
uint32_t freq_limit;
int32_t vdd_rstr_temp_degC;
int32_t vdd_rstr_temp_hyst_degC;
int32_t vdd_mx_min;
int32_t psm_temp_degC;
int32_t psm_temp_hyst_degC;
int32_t ocr_temp_degC;
int32_t ocr_temp_hyst_degC;
uint32_t ocr_sensor_id;
int32_t phase_rpm_resource_type;
int32_t phase_rpm_resource_id;
int32_t gfx_phase_warm_temp_degC;
int32_t gfx_phase_warm_temp_hyst_degC;
int32_t gfx_phase_hot_temp_degC;
int32_t gfx_phase_hot_temp_hyst_degC;
int32_t gfx_sensor;
int32_t gfx_phase_request_key;
int32_t cx_phase_hot_temp_degC;
int32_t cx_phase_hot_temp_hyst_degC;
int32_t cx_phase_request_key;
int32_t vdd_mx_temp_degC;
int32_t vdd_mx_temp_hyst_degC;
int32_t vdd_mx_sensor_id;
int32_t therm_reset_temp_degC;
};
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
enum sensor_id_type {
THERM_ZONE_ID,
THERM_TSENS_ID,
THERM_ID_MAX_NR,
};
msm: thermal: Add progressive mitigation algo support to KTM After the interrupt mode is initialized, KTM starts the progressive algorithm based frequency mitigation for multiple sensors based on thermal sensor information devicetree configuration. This mitigation will be disabled when thermal-engine starts and disables the KTM boot up polling mode mitigation. By default progressive mitigation is in monitor state. In monitor state algorithm waits for sensor high threshold trigger. If sensor temperature reaches high threshold, progressive mitigation algorithm starts in polling mode. In each polling iteration, if current temperature is greater than or equal to high threshold, it mitigates by one level down of supported frequency table from fmax. If current temperature is less than high threshold in a particular sample, it reduces mitigation by one level up from previous mitigation state and at this condition if mitigation is fully cleared, then algorithm moves from polling mode to monitor mode. In polling mode if the temperature is less than low threshold then algorithm will clear all mitigations and will switch to monitor mode. Add an optional devicetree entry "qcom,ktm-prog-mitigation-config" to thermal sensor info node which takes cluster id to be mitigated, high threshold, low threshold and progressive mitigation algo sampling as input. Change-Id: Ic609e5beb603c3dec1f7de8f64d1c35516eed057 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2014-06-04 22:41:08 +00:00
enum msm_therm_progressive_state {
MSM_THERM_PROGRESSIVE_SAMPLING,
MSM_THERM_PROGRESSIVE_PAUSED,
MSM_THERM_PROGRESSIVE_MONITOR,
MSM_THERM_PROGRESSIVE_NR,
};
enum msm_therm_monitor_type {
MSM_THERM_MONITOR,
MSM_THERM_PROGRESSIVE,
MSM_THERM_NR,
};
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
struct threshold_info;
struct therm_threshold {
msm: thermal: Add progressive mitigation algo support to KTM After the interrupt mode is initialized, KTM starts the progressive algorithm based frequency mitigation for multiple sensors based on thermal sensor information devicetree configuration. This mitigation will be disabled when thermal-engine starts and disables the KTM boot up polling mode mitigation. By default progressive mitigation is in monitor state. In monitor state algorithm waits for sensor high threshold trigger. If sensor temperature reaches high threshold, progressive mitigation algorithm starts in polling mode. In each polling iteration, if current temperature is greater than or equal to high threshold, it mitigates by one level down of supported frequency table from fmax. If current temperature is less than high threshold in a particular sample, it reduces mitigation by one level up from previous mitigation state and at this condition if mitigation is fully cleared, then algorithm moves from polling mode to monitor mode. In polling mode if the temperature is less than low threshold then algorithm will clear all mitigations and will switch to monitor mode. Add an optional devicetree entry "qcom,ktm-prog-mitigation-config" to thermal sensor info node which takes cluster id to be mitigated, high threshold, low threshold and progressive mitigation algo sampling as input. Change-Id: Ic609e5beb603c3dec1f7de8f64d1c35516eed057 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2014-06-04 22:41:08 +00:00
int32_t sensor_id;
enum sensor_id_type id_type;
struct sensor_threshold threshold[MAX_THRESHOLD];
int32_t trip_triggered;
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
void (*notify)(struct therm_threshold *);
msm: thermal: Add progressive mitigation algo support to KTM After the interrupt mode is initialized, KTM starts the progressive algorithm based frequency mitigation for multiple sensors based on thermal sensor information devicetree configuration. This mitigation will be disabled when thermal-engine starts and disables the KTM boot up polling mode mitigation. By default progressive mitigation is in monitor state. In monitor state algorithm waits for sensor high threshold trigger. If sensor temperature reaches high threshold, progressive mitigation algorithm starts in polling mode. In each polling iteration, if current temperature is greater than or equal to high threshold, it mitigates by one level down of supported frequency table from fmax. If current temperature is less than high threshold in a particular sample, it reduces mitigation by one level up from previous mitigation state and at this condition if mitigation is fully cleared, then algorithm moves from polling mode to monitor mode. In polling mode if the temperature is less than low threshold then algorithm will clear all mitigations and will switch to monitor mode. Add an optional devicetree entry "qcom,ktm-prog-mitigation-config" to thermal sensor info node which takes cluster id to be mitigated, high threshold, low threshold and progressive mitigation algo sampling as input. Change-Id: Ic609e5beb603c3dec1f7de8f64d1c35516eed057 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2014-06-04 22:41:08 +00:00
struct threshold_info *parent;
enum msm_therm_progressive_state prog_state;
bool prog_trip_clear;
int32_t cur_state;
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
};
struct threshold_info {
msm: thermal: Add progressive mitigation algo support to KTM After the interrupt mode is initialized, KTM starts the progressive algorithm based frequency mitigation for multiple sensors based on thermal sensor information devicetree configuration. This mitigation will be disabled when thermal-engine starts and disables the KTM boot up polling mode mitigation. By default progressive mitigation is in monitor state. In monitor state algorithm waits for sensor high threshold trigger. If sensor temperature reaches high threshold, progressive mitigation algorithm starts in polling mode. In each polling iteration, if current temperature is greater than or equal to high threshold, it mitigates by one level down of supported frequency table from fmax. If current temperature is less than high threshold in a particular sample, it reduces mitigation by one level up from previous mitigation state and at this condition if mitigation is fully cleared, then algorithm moves from polling mode to monitor mode. In polling mode if the temperature is less than low threshold then algorithm will clear all mitigations and will switch to monitor mode. Add an optional devicetree entry "qcom,ktm-prog-mitigation-config" to thermal sensor info node which takes cluster id to be mitigated, high threshold, low threshold and progressive mitigation algo sampling as input. Change-Id: Ic609e5beb603c3dec1f7de8f64d1c35516eed057 Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2014-06-04 22:41:08 +00:00
uint32_t thresh_ct;
bool thresh_triggered;
struct list_head list_ptr;
enum msm_therm_monitor_type algo_type;
struct mutex lock;
long curr_max_temp;
struct therm_threshold *thresh_list;
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
};
msm: thermal: Add support for device manager in KTM Add support for device manager framework to KTM. Device manager allows for aggregation of muliple kernel clients request on mitigation devices. Clients can set and register for device change notifications. Currently it supports hotplug device and cpuX (X= 0... NR_CPUS - 1) devices. Device manager framework exports below 3 APIs for a device for clients to use. 1. struct device_clnt_data *devmgr_register_mitigation_client( struct device *dev, const char *device_name, void (*callback)(struct device_clnt_data *, union device_request *, void *)) API to register mitigation device. This API returns handle, which should be used by clients when placing mitigation request. It supports to register for device change notification with callback as an optional parameter to client. @dev: Client device structure. @device_name: Mitgation device name which the client is interested to mitigate. @callback: Optional callback pointer for device change notification, otherwise pass NULL. Returns client handle structure for that device on success, or NULL with IS_ERR() condition containing error number. 2. int devmgr_client_request_mitigation(struct device_clnt_data *clnt, enum device_req_type type, union device_request *req); API for clients to set valid mitigation for a registered device. @clnt: Client handle for device. @type: Type of device request populated above. @req: Valid mitigation request. Returns zero on successful mitigation update or negative error number. 3. void devmgr_unregister_mitigation_client( struct device *dev, struct device_clnt_data *clnt) API for clients to unregister for a device whenever it is done with device. @dev: Client device structure. @clnt: Client handle for device. Change-Id: Ieda99577a035a32b745df6b004b5487a55ec70ac Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-27 20:38:22 +00:00
enum device_req_type {
DEVICE_REQ_NONE = -1,
HOTPLUG_MITIGATION_REQ,
CPUFREQ_MITIGATION_REQ,
DEVICE_REQ_MAX,
};
/**
* For frequency mitigation request, if client is interested
* only in one, either max_freq or min_freq, update default
* value for other one also for mitigation request.
* Default value for request structure variables:
* max_freq = UINT_MAX;
* min_freq = 0;
* offline_mask = CPU_MASK_NONE;
*/
struct cpufreq_request {
uint32_t max_freq;
uint32_t min_freq;
};
union device_request {
struct cpufreq_request freq;
cpumask_t offline_mask;
};
struct device_clnt_data;
struct device_manager_data {
char device_name[TSENS_NAME_MAX];
union device_request active_req;
struct list_head client_list;
struct list_head dev_ptr;
struct mutex clnt_lock;
int (*request_validate)(struct device_clnt_data *,
union device_request *,
enum device_req_type);
int (*update)(struct device_manager_data *);
void *data;
};
struct device_clnt_data {
struct device_manager_data *dev_mgr;
bool req_active;
union device_request request;
struct list_head clnt_ptr;
void (*callback)(struct device_clnt_data *,
union device_request *req, void *);
void *usr_data;
};
extern void sec_debug_set_thermal_upload(void);
#ifdef CONFIG_THERMAL_MONITOR
extern int msm_thermal_init(struct msm_thermal_data *pdata);
extern int msm_thermal_device_init(void);
extern int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq,
bool is_max);
extern int msm_thermal_set_cluster_freq(uint32_t cluster, uint32_t freq,
bool is_max);
extern int msm_thermal_get_freq_plan_size(uint32_t cluster,
unsigned int *table_len);
extern int msm_thermal_get_cluster_freq_plan(uint32_t cluster,
unsigned int *table_ptr);
extern int msm_thermal_get_cluster_voltage_plan(uint32_t cluster,
uint32_t *table_ptr);
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
/**
* sensor_mgr_init_threshold - Initialize thresholds data structure for
* sensor(s) with high and low thresholds and
* threshold callback.
*
* @dev: Client device structure.
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
* @thresh_inp: Client threshold data structure.
* @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS
* to monitor all temperature sensors.
*
* @high_temp: Trigger threshold value for sensor_id or all sensors.
* @low_temp: Clear threshold value for sensor_id or all sensors.
* @callback: Callback pointer for threshold notification.
*
* Returns which threshold is set on success, negative error number
* on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used
* to decipher which threshold being set.
*/
extern int sensor_mgr_init_threshold(struct device *dev,
struct threshold_info *thresh_inp,
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
int sensor_id, int32_t high_temp,
int32_t low_temp,
void (*callback)(struct therm_threshold *));
/**
* sensor_mgr_convert_id_and_set_threshold - It accepts sensor h/w ID, converts
* it to sensor zone id and sets
* thermal threshold for those
* sensors listed in threshold info.
*
* @thresh_inp: Client threshold data structure.
*
* Returns zero on success, negative error number on failure.
*/
extern int sensor_mgr_convert_id_and_set_threshold(
struct threshold_info *thresh_inp);
/**
* sensor_mgr_set_threshold- It sets thermal threshold trips for a sensor.
*
* @zone_id: Thermal zone ID for the sensor.
* @threshold: threshold info for the sensor.
*
* Returns zero on success, negative error number on failure.
*/
extern int sensor_mgr_set_threshold(uint32_t zone_id,
struct sensor_threshold *threshold);
/**
* sensor_mgr_remove_threshold- It cancels threshold notification and
* removes threshold from sensor manager
* threshold list.
*
* @dev: Client device structure.
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
* @thresh_inp: The threshold info which needs to be removed.
*/
extern void sensor_mgr_remove_threshold(struct device *dev,
struct threshold_info *thresh_inp);
msm: thermal: Add support for device manager in KTM Add support for device manager framework to KTM. Device manager allows for aggregation of muliple kernel clients request on mitigation devices. Clients can set and register for device change notifications. Currently it supports hotplug device and cpuX (X= 0... NR_CPUS - 1) devices. Device manager framework exports below 3 APIs for a device for clients to use. 1. struct device_clnt_data *devmgr_register_mitigation_client( struct device *dev, const char *device_name, void (*callback)(struct device_clnt_data *, union device_request *, void *)) API to register mitigation device. This API returns handle, which should be used by clients when placing mitigation request. It supports to register for device change notification with callback as an optional parameter to client. @dev: Client device structure. @device_name: Mitgation device name which the client is interested to mitigate. @callback: Optional callback pointer for device change notification, otherwise pass NULL. Returns client handle structure for that device on success, or NULL with IS_ERR() condition containing error number. 2. int devmgr_client_request_mitigation(struct device_clnt_data *clnt, enum device_req_type type, union device_request *req); API for clients to set valid mitigation for a registered device. @clnt: Client handle for device. @type: Type of device request populated above. @req: Valid mitigation request. Returns zero on successful mitigation update or negative error number. 3. void devmgr_unregister_mitigation_client( struct device *dev, struct device_clnt_data *clnt) API for clients to unregister for a device whenever it is done with device. @dev: Client device structure. @clnt: Client handle for device. Change-Id: Ieda99577a035a32b745df6b004b5487a55ec70ac Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-27 20:38:22 +00:00
/**
* devmgr_register_mitigation_client - Register for a device and
* gets a handle for mitigation.
* @dev: Client device structure.
* @device_name: Mitgation device name which the client is interested
* to mitigate.
* @callback: Optional callback pointer for device change notification,
* otherwise pass NULL.
*
* Returns client handle structure for that device on success, or NULL
* with IS_ERR() condition containing error number.
*/
extern struct device_clnt_data *devmgr_register_mitigation_client(
struct device *dev,
const char *device_name,
void (*callback)(struct device_clnt_data *,
union device_request *, void *));
/**
* devmgr_client_request_mitigation - Set a valid mitigation for
* registered device.
* @clnt: Client handle for device.
* @type: Type of device request populated above.
* @req: Valid mitigation request.
*
* Returns zero on successful mitigation update, or negative error number.
*/
extern int devmgr_client_request_mitigation(struct device_clnt_data *clnt,
enum device_req_type type,
union device_request *req);
/**
* devmgr_unregister_mitigation_client - Unregister mitigation device
* @dev: Client device structure.
* @clnt: Client handle for device.
*/
extern void devmgr_unregister_mitigation_client(
struct device *dev,
struct device_clnt_data *clnt);
#else
static inline int msm_thermal_init(struct msm_thermal_data *pdata)
{
return -ENOSYS;
}
static inline int msm_thermal_device_init(void)
{
return -ENOSYS;
}
static inline int msm_thermal_set_frequency(uint32_t cpu, uint32_t freq,
bool is_max)
{
return -ENOSYS;
}
static inline int msm_thermal_set_cluster_freq(uint32_t cluster, uint32_t freq,
bool is_max)
{
return -ENOSYS;
}
static inline int msm_thermal_get_freq_plan_size(uint32_t cluster,
unsigned int *table_len)
{
return -ENOSYS;
}
static inline int msm_thermal_get_cluster_freq_plan(uint32_t cluster,
unsigned int *table_ptr)
{
return -ENOSYS;
}
static inline int msm_thermal_get_cluster_voltage_plan(uint32_t cluster,
uint32_t *table_ptr)
{
return -ENOSYS;
}
static inline int sensor_mgr_init_threshold(struct device *dev,
struct threshold_info *thresh_inp,
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
int sensor_id, int32_t high_temp,
int32_t low_temp,
void (*callback)(struct therm_threshold *))
{
return -ENOSYS;
}
static inline int sensor_mgr_convert_id_and_set_threshold(
struct threshold_info *thresh_inp)
{
return -ENOSYS;
}
static inline int sensor_mgr_set_threshold(uint32_t zone_id,
struct sensor_threshold *threshold)
{
return -ENOSYS;
}
static inline void sensor_mgr_remove_threshold(struct device *dev,
msm: thermal: Add support for sensor manager in KTM Add and export sensor manager framework APIs for kernel clients who are interested in thermal sensors. Sensor manager allows multiple clients to set and get notification for a threshold. Clients can also use multiple sensors to trigger a single mitigation action. Below are main sensor manager APIs to monitor sensor thresholds. 1.int sensor_mgr_init_threshold(struct threshold_info *thresh_inp, int sensor_id, int32_t high_temp, int32_t low_temp, void (*callback)(struct therm_threshold *)) API to initialize thresholds data structure for sensor(s) with high and low thresholds and threshold callback. @thresh_inp: Client threshold data structure. @sensor_id: Sensor h/w ID to be monitored. Use MONITOR_ALL_TSENS to monitor all temperature sensor. @high_temp: Trigger threshold value for sensor_id or all sensors. @low_temp: Clear threshold value for sensor_id or all sensors. @callback: Callback pointer for threshold notification. Returns zero on success, negative error number on failure. 2.int sensor_mgr_set_threshold(uint32_t zone_id, struct sensor_threshold *threshold) It sets thermal threshold trips for a sensor. @zone_id: Thermal zone id for the sensor. @threshold: Threshold info for the sensor. Returns which threshold is set on success, negative error number on failure. MACRO IS_HI_THRESHOLD_SET/IS_LOW_THRESHOLD_SET can be used to decipher which threshold being set. 3.int sensor_mgr_convert_id_and_set_threshold( struct threshold_info *thresh_inp) It accepts sensor HW id, converts it to sensor zone id and sets thermal threshold for those sensors listed in threshold info. @thresh_inp: Client threshold data structure. Returns zero on success, negative error number on failure. 4.void sensor_mgr_remove_threshold(struct threshold_info *thresh_inp) It cancels threshold notification and removes threshold from sensor manager threshold list. @thresh_inp: Threshold info which needs to be removed. Change-Id: I916104bde472bd9b45bdb66d81b09cd850e11fba Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-22 13:07:46 +00:00
struct threshold_info *thresh_inp)
{
}
msm: thermal: Add support for device manager in KTM Add support for device manager framework to KTM. Device manager allows for aggregation of muliple kernel clients request on mitigation devices. Clients can set and register for device change notifications. Currently it supports hotplug device and cpuX (X= 0... NR_CPUS - 1) devices. Device manager framework exports below 3 APIs for a device for clients to use. 1. struct device_clnt_data *devmgr_register_mitigation_client( struct device *dev, const char *device_name, void (*callback)(struct device_clnt_data *, union device_request *, void *)) API to register mitigation device. This API returns handle, which should be used by clients when placing mitigation request. It supports to register for device change notification with callback as an optional parameter to client. @dev: Client device structure. @device_name: Mitgation device name which the client is interested to mitigate. @callback: Optional callback pointer for device change notification, otherwise pass NULL. Returns client handle structure for that device on success, or NULL with IS_ERR() condition containing error number. 2. int devmgr_client_request_mitigation(struct device_clnt_data *clnt, enum device_req_type type, union device_request *req); API for clients to set valid mitigation for a registered device. @clnt: Client handle for device. @type: Type of device request populated above. @req: Valid mitigation request. Returns zero on successful mitigation update or negative error number. 3. void devmgr_unregister_mitigation_client( struct device *dev, struct device_clnt_data *clnt) API for clients to unregister for a device whenever it is done with device. @dev: Client device structure. @clnt: Client handle for device. Change-Id: Ieda99577a035a32b745df6b004b5487a55ec70ac Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2015-01-27 20:38:22 +00:00
static inline struct device_clnt_data *devmgr_register_mitigation_client(
struct device *dev,
const char *device_name,
void (*callback)(struct device_clnt_data *,
union device_request *, void *))
{
return NULL;
}
static inline int devmgr_client_request_mitigation(
struct device_clnt_data *clnt,
enum device_req_type type,
union device_request *req)
{
return -ENOSYS;
}
static inline void devmgr_unregister_mitigation_client(
struct device *dev,
struct device_clnt_data *clnt)
{
}
#endif
#endif /*__MSM_THERMAL_H*/