| | | | |
| Offset 1, 95 lines modified | Offset 1, 345 lines modified |
| 1 | /*·SPDX-License-Identifier:·GPL-2.0·WITH·Linux-syscall-note·*/ | 1 | /*·SPDX-License-Identifier:·GPL-2.0·*/ |
| 2 | #ifndef·_UAPI_LINUX_THERMAL_H | |
| 3 | #define·_UAPI_LINUX_THERMAL_H | 2 | /* |
| | 3 | ·*··thermal.h··($Revision:·0·$) |
| | 4 | ·* |
| | 5 | ·*··Copyright·(C)·2008··Intel·Corp |
| | 6 | ·*··Copyright·(C)·2008··Zhang·Rui·<rui.zhang@intel.com> |
| | 7 | ·*··Copyright·(C)·2008··Sujith·Thomas·<sujith.thomas@intel.com> |
| | 8 | ·*/ |
| | |
| 4 | #define·THERMAL_NAME_LENGTH» 20 | 9 | #ifndef·__THERMAL_H__ |
| | 10 | #define·__THERMAL_H__ |
| | |
| 5 | enum·thermal_device_mode·{ | |
| 6 | » THERMAL_DEVICE_DISABLED·=·0, | |
| 7 | » THERMAL_DEVICE_ENABLED, | 11 | #include·<linux/of.h> |
| | 12 | #include·<linux/idr.h> |
| | 13 | #include·<linux/device.h> |
| | 14 | #include·<linux/sysfs.h> |
| | 15 | #include·<linux/workqueue.h> |
| | 16 | #include·<uapi/linux/thermal.h> |
| | |
| | 17 | /*·invalid·cooling·state·*/ |
| | 18 | #define·THERMAL_CSTATE_INVALID·-1UL |
| | |
| | 19 | /*·No·upper/lower·limit·requirement·*/ |
| | 20 | #define·THERMAL_NO_LIMIT»((u32)~0) |
| | |
| | 21 | /*·Default·weight·of·a·bound·cooling·device·*/ |
| | 22 | #define·THERMAL_WEIGHT_DEFAULT·0 |
| | |
| | 23 | /*·use·value,·which·<·0K,·to·indicate·an·invalid/uninitialized·temperature·*/ |
| | 24 | #define·THERMAL_TEMP_INVALID» -274000 |
| | |
| | 25 | struct·thermal_zone_device; |
| | 26 | struct·thermal_cooling_device; |
| | 27 | struct·thermal_instance; |
| | 28 | struct·thermal_debugfs; |
| | 29 | struct·thermal_attr; |
| | |
| | 30 | enum·thermal_trend·{ |
| | 31 | » THERMAL_TREND_STABLE,·/*·temperature·is·stable·*/ |
| | 32 | » THERMAL_TREND_RAISING,·/*·temperature·is·raising·*/ |
| | 33 | » THERMAL_TREND_DROPPING,·/*·temperature·is·dropping·*/ |
| 8 | }; | 34 | }; |
| | |
| 9 | enum·thermal_trip_type·{ | |
| 10 | » THERMAL_TRIP_ACTIVE·=·0, | |
| 11 | » THERMAL_TRIP_PASSIVE, | |
| 12 | » THERMAL_TRIP_HOT, | |
| 13 | » THERMAL_TRIP_CRITICAL, | 35 | /*·Thermal·notification·reason·*/ |
| | 36 | enum·thermal_notify_event·{ |
| | 37 | » THERMAL_EVENT_UNSPECIFIED,·/*·Unspecified·event·*/ |
| | 38 | » THERMAL_EVENT_TEMP_SAMPLE,·/*·New·Temperature·sample·*/ |
| | 39 | » THERMAL_TRIP_VIOLATED,·/*·TRIP·Point·violation·*/ |
| | 40 | » THERMAL_TRIP_CHANGED,·/*·TRIP·Point·temperature·changed·*/ |
| | 41 | » THERMAL_DEVICE_DOWN,·/*·Thermal·device·is·down·*/ |
| | 42 | » THERMAL_DEVICE_UP,·/*·Thermal·device·is·up·after·a·down·event·*/ |
| | 43 | » THERMAL_DEVICE_POWER_CAPABILITY_CHANGED,·/*·power·capability·changed·*/ |
| | 44 | » THERMAL_TABLE_CHANGED,·/*·Thermal·table(s)·changed·*/ |
| | 45 | » THERMAL_EVENT_KEEP_ALIVE,·/*·Request·for·user·space·handler·to·respond·*/ |
| | 46 | » THERMAL_TZ_BIND_CDEV,·/*·Cooling·dev·is·bind·to·the·thermal·zone·*/ |
| | 47 | » THERMAL_TZ_UNBIND_CDEV,·/*·Cooling·dev·is·unbind·from·the·thermal·zone·*/ |
| | 48 | » THERMAL_INSTANCE_WEIGHT_CHANGED,·/*·Thermal·instance·weight·changed·*/ |
| | 49 | » THERMAL_TZ_RESUME,·/*·Thermal·zone·is·resuming·after·system·sleep·*/ |
| 14 | }; | 50 | }; |
| | |
| 15 | /*·Adding·event·notification·support·elements·*/ | |
| 16 | #define·THERMAL_GENL_FAMILY_NAME»»"thermal" | |
| 17 | #define·THERMAL_GENL_VERSION» » » 0x01 | |
| 18 | #define·THERMAL_GENL_SAMPLING_GROUP_NAME»"sampling" | |
| 19 | #define·THERMAL_GENL_EVENT_GROUP_NAME» » "event" | 51 | /** |
| | 52 | ·*·struct·thermal_trip·-·representation·of·a·point·in·temperature·domain |
| | 53 | ·*·@temperature:·temperature·value·in·miliCelsius |
| | 54 | ·*·@hysteresis:·relative·hysteresis·in·miliCelsius |
| | 55 | ·*·@type:·trip·point·type |
| | 56 | ·*·@priv:·pointer·to·driver·data·associated·with·this·trip |
| | 57 | ·*·@flags:·flags·representing·binary·properties·of·the·trip |
| | 58 | ·*/ |
| | 59 | struct·thermal_trip·{ |
| | 60 | » int·temperature; |
| | 61 | » int·hysteresis; |
| | 62 | » enum·thermal_trip_type·type; |
| | 63 | » u8·flags; |
| | 64 | » void·*priv; |
| | 65 | }; |
| | |
| | 66 | #define·THERMAL_TRIP_FLAG_RW_TEMP» BIT(0) |
| | 67 | #define·THERMAL_TRIP_FLAG_RW_HYST» BIT(1) |
| | |
| | 68 | #define·THERMAL_TRIP_FLAG_RW» (THERMAL_TRIP_FLAG_RW_TEMP·|·\ |
| | 69 | » » » » ·THERMAL_TRIP_FLAG_RW_HYST) |
| | |
| | 70 | #define·THERMAL_TRIP_PRIV_TO_INT(_val_)» (uintptr_t)(_val_) |
| | 71 | #define·THERMAL_INT_TO_TRIP_PRIV(_val_)» (void·*)(uintptr_t)(_val_) |
| | |
| | 72 | struct·cooling_spec·{ |
| | 73 | » unsigned·long·upper;» /*·Highest·cooling·state··*/ |
| | 74 | » unsigned·long·lower;» /*·Lowest·cooling·state··*/ |
| | 75 | » unsigned·int·weight;» /*·Cooling·device·weight·*/ |
| 20 | /*·Attributes·of·thermal_genl_family·*/ | |
| 21 | enum·thermal_genl_attr·{ | |
| 22 | » THERMAL_GENL_ATTR_UNSPEC, | |
| 23 | » THERMAL_GENL_ATTR_TZ, | |
| 24 | » THERMAL_GENL_ATTR_TZ_ID, | |
| 25 | » THERMAL_GENL_ATTR_TZ_TEMP, | |
| 26 | » THERMAL_GENL_ATTR_TZ_TRIP, | |
| 27 | » THERMAL_GENL_ATTR_TZ_TRIP_ID, | |
| 28 | » THERMAL_GENL_ATTR_TZ_TRIP_TYPE, | |
| 29 | » THERMAL_GENL_ATTR_TZ_TRIP_TEMP, | |
| 30 | » THERMAL_GENL_ATTR_TZ_TRIP_HYST, | |
| 31 | » THERMAL_GENL_ATTR_TZ_MODE, | |
| 32 | » THERMAL_GENL_ATTR_TZ_NAME, | |
| 33 | » THERMAL_GENL_ATTR_TZ_CDEV_WEIGHT, | |
| 34 | » THERMAL_GENL_ATTR_TZ_GOV, | |
| 35 | » THERMAL_GENL_ATTR_TZ_GOV_NAME, | |
| 36 | » THERMAL_GENL_ATTR_CDEV, | |
| 37 | » THERMAL_GENL_ATTR_CDEV_ID, | |
| 38 | » THERMAL_GENL_ATTR_CDEV_CUR_STATE, | |
| 39 | » THERMAL_GENL_ATTR_CDEV_MAX_STATE, | |
| 40 | » THERMAL_GENL_ATTR_CDEV_NAME, | |
| 41 | » THERMAL_GENL_ATTR_GOV_NAME, | |
| 42 | » THERMAL_GENL_ATTR_CPU_CAPABILITY, | |
| 43 | » THERMAL_GENL_ATTR_CPU_CAPABILITY_ID, | |
| 44 | » THERMAL_GENL_ATTR_CPU_CAPABILITY_PERFORMANCE, | |
| 45 | » THERMAL_GENL_ATTR_CPU_CAPABILITY_EFFICIENCY, | |
| 46 | » __THERMAL_GENL_ATTR_MAX, | |
| 47 | }; | 76 | }; |
| 48 | #define·THERMAL_GENL_ATTR_MAX·(__THERMAL_GENL_ATTR_MAX·-·1) | |
| | |
| 49 | enum·thermal_genl_sampling·{ | |
| 50 | » THERMAL_GENL_SAMPLING_TEMP, | |
| 51 | » __THERMAL_GENL_SAMPLING_MAX, | 77 | struct·thermal_zone_device_ops·{ |
| | 78 | » bool·(*should_bind)·(struct·thermal_zone_device·*, |
| | 79 | » » » ·····const·struct·thermal_trip·*, |
| | 80 | » » » ·····struct·thermal_cooling_device·*, |
| | 81 | » » » ·····struct·cooling_spec·*); |
| | 82 | » int·(*get_temp)·(struct·thermal_zone_device·*,·int·*); |
| | 83 | » int·(*set_trips)·(struct·thermal_zone_device·*,·int,·int); |
| | 84 | » int·(*change_mode)·(struct·thermal_zone_device·*, |
| | 85 | » » enum·thermal_device_mode); |
| | 86 | » int·(*set_trip_temp)·(struct·thermal_zone_device·*, |
| | 87 | » » » ······const·struct·thermal_trip·*,·int); |
| | 88 | » int·(*get_crit_temp)·(struct·thermal_zone_device·*,·int·*); |
| | 89 | » int·(*set_emul_temp)·(struct·thermal_zone_device·*,·int); |
| | 90 | » int·(*get_trend)·(struct·thermal_zone_device·*, |
| | 91 | » » » ··const·struct·thermal_trip·*,·enum·thermal_trend·*); |
| | 92 | » void·(*hot)(struct·thermal_zone_device·*); |
| | 93 | » void·(*critical)(struct·thermal_zone_device·*); |
| 52 | }; | 94 | }; |
| 53 | #define·THERMAL_GENL_SAMPLING_MAX·(__THERMAL_GENL_SAMPLING_MAX·-·1) | |
| | |
| | 95 | struct·thermal_cooling_device_ops·{ |
| | 96 | » int·(*get_max_state)·(struct·thermal_cooling_device·*,·unsigned·long·*); |
| | 97 | » int·(*get_cur_state)·(struct·thermal_cooling_device·*,·unsigned·long·*); |
| | 98 | » int·(*set_cur_state)·(struct·thermal_cooling_device·*,·unsigned·long); |
| | 99 | » int·(*get_requested_power)(struct·thermal_cooling_device·*,·u32·*); |
| | 100 | » int·(*state2power)(struct·thermal_cooling_device·*,·unsigned·long,·u32·*); |
| | 101 | » int·(*power2state)(struct·thermal_cooling_device·*,·u32,·unsigned·long·*); |
| 54 | /*·Events·of·thermal_genl_family·*/ | |
| 55 | enum·thermal_genl_event·{ | |
| 56 | » THERMAL_GENL_EVENT_UNSPEC, | |
| 57 | » THERMAL_GENL_EVENT_TZ_CREATE,» » /*·Thermal·zone·creation·*/ | |
| 58 | » THERMAL_GENL_EVENT_TZ_DELETE,» » /*·Thermal·zone·deletion·*/ | |
| 59 | » THERMAL_GENL_EVENT_TZ_DISABLE,» » /*·Thermal·zone·disabled·*/ | |
| 60 | » THERMAL_GENL_EVENT_TZ_ENABLE,» » /*·Thermal·zone·enabled·*/ | |
| 61 | » THERMAL_GENL_EVENT_TZ_TRIP_UP,» » /*·Trip·point·crossed·the·way·up·*/ | |
| 62 | » THERMAL_GENL_EVENT_TZ_TRIP_DOWN,» /*·Trip·point·crossed·the·way·down·*/ | |
| 63 | » THERMAL_GENL_EVENT_TZ_TRIP_CHANGE,» /*·Trip·point·changed·*/ | |
| 64 | » THERMAL_GENL_EVENT_TZ_TRIP_ADD,»»/*·Trip·point·added·*/ | |
| 65 | » THERMAL_GENL_EVENT_TZ_TRIP_DELETE,» /*·Trip·point·deleted·*/ | |
| 66 | » THERMAL_GENL_EVENT_CDEV_ADD,» » /*·Cdev·bound·to·the·thermal·zone·*/ | |
| 67 | » THERMAL_GENL_EVENT_CDEV_DELETE,»»/*·Cdev·unbound·*/ | |
| 68 | » THERMAL_GENL_EVENT_CDEV_STATE_UPDATE,» /*·Cdev·state·updated·*/ | |
| 69 | » THERMAL_GENL_EVENT_TZ_GOV_CHANGE,» /*·Governor·policy·changed··*/ | |
| 70 | » THERMAL_GENL_EVENT_CPU_CAPABILITY_CHANGE,» /*·CPU·capability·changed·*/ | |
| 71 | » __THERMAL_GENL_EVENT_MAX, | |
| 72 | }; | |
| 73 | #define·THERMAL_GENL_EVENT_MAX·(__THERMAL_GENL_EVENT_MAX·-·1) | |
| | |
| 74 | /*·Commands·supported·by·the·thermal_genl_family·*/ | |
| 75 | enum·thermal_genl_cmd·{ | |
| 76 | » THERMAL_GENL_CMD_UNSPEC, | |
| 77 | » THERMAL_GENL_CMD_TZ_GET_ID,» /*·List·of·thermal·zones·id·*/ | |
| 78 | » THERMAL_GENL_CMD_TZ_GET_TRIP,» /*·List·of·thermal·trips·*/ | |
| 79 | » THERMAL_GENL_CMD_TZ_GET_TEMP,» /*·Get·the·thermal·zone·temperature·*/ | |
| 80 | » THERMAL_GENL_CMD_TZ_GET_GOV,» /*·Get·the·thermal·zone·governor·*/ | |
| 81 | » THERMAL_GENL_CMD_TZ_GET_MODE,» /*·Get·the·thermal·zone·mode·*/ | |
| 82 | » THERMAL_GENL_CMD_CDEV_GET,» /*·List·of·cdev·id·*/ | |
| 83 | » __THERMAL_GENL_CMD_MAX, | |
| 84 | }; | 102 | }; |
| 85 | #define·THERMAL_GENL_CMD_MAX·(__THERMAL_GENL_CMD_MAX·-·1) | |
| | |
| | 103 | struct·thermal_cooling_device·{ |
| | 104 | » int·id; |
| | 105 | » const·char·*type; |
| | 106 | » unsigned·long·max_state; |
| | 107 | » struct·device·device; |
| | 108 | » struct·device_node·*np; |
| | 109 | » void·*devdata; |
| | 110 | » void·*stats; |
| | 111 | » const·struct·thermal_cooling_device_ops·*ops; |
| | 112 | » bool·updated;·/*·true·if·the·cooling·device·does·not·need·update·*/ |
| | 113 | » struct·mutex·lock;·/*·protect·thermal_instances·list·*/ |
| | 114 | » struct·list_head·thermal_instances; |
| | 115 | » struct·list_head·node; |
| | 116 | #ifdef·CONFIG_THERMAL_DEBUGFS |
| | 117 | » struct·thermal_debugfs·*debugfs; |
| | 118 | #endif |
| | 119 | }; |
| | |
| | 120 | /*·Structure·to·define·Thermal·Zone·parameters·*/ |
| | 121 | struct·thermal_zone_params·{ |
| | 122 | » const·char·*governor_name; |
| | |
| | 123 | » /* |
| | 124 | » ·*·a·boolean·to·indicate·if·the·thermal·to·hwmon·sysfs·interface |
| | 125 | » ·*·is·required.·when·no_hwmon·==·false,·a·hwmon·sysfs·interface |
| | 126 | » ·*·will·be·created.·when·no_hwmon·==·true,·nothing·will·be·done |
| | 127 | » ·*/ |
| | 128 | » bool·no_hwmon; |
| | |
| | 129 | » /* |
| | 130 | » ·*·Sustainable·power·(heat)·that·this·thermal·zone·can·dissipate·in |
| | 131 | » ·*·mW |
| | 132 | » ·*/ |
| | 133 | » u32·sustainable_power; |
| | |
| | 134 | » /* |
| | 135 | » ·*·Proportional·parameter·of·the·PID·controller·when |
| | 136 | » ·*·overshooting·(i.e.,·when·temperature·is·below·the·target) |
| | 137 | » ·*/ |
| | 138 | » s32·k_po; |
| | |
| | 139 | » /* |
| | 140 | » ·*·Proportional·parameter·of·the·PID·controller·when |
| | 141 | » ·*·undershooting |
| | 142 | » ·*/ |
| | 143 | » s32·k_pu; |
| | |
| | 144 | » /*·Integral·parameter·of·the·PID·controller·*/ |
| | 145 | » s32·k_i; |
| | |
| | 146 | » /*·Derivative·parameter·of·the·PID·controller·*/ |
| | 147 | » s32·k_d; |
| | |
| | 148 | » /*·threshold·below·which·the·error·is·no·longer·accumulated·*/ |
| | 149 | » s32·integral_cutoff; |
| | |
| | 150 | » /* |
| | 151 | » ·*·@slope:» slope·of·a·linear·temperature·adjustment·curve. |
| | 152 | » ·*·» » Used·by·thermal·zone·drivers. |
| | 153 | » ·*/ |
| | 154 | » int·slope; |
| | 155 | » /* |
| | 156 | » ·*·@offset:» offset·of·a·linear·temperature·adjustment·curve. |
| | 157 | » ·*·» » Used·by·thermal·zone·drivers·(default·0). |
| | 158 | » ·*/ |
| | 159 | » int·offset; |
| | 160 | }; |
| | |
| | 161 | /*·Function·declarations·*/ |
| | 162 | #ifdef·CONFIG_THERMAL_OF |
| | 163 | struct·thermal_zone_device·*devm_thermal_of_zone_register(struct·device·*dev,·int·id,·void·*data, |
| | 164 | » » » » » » » ··const·struct·thermal_zone_device_ops·*ops); |
| | |
| | 165 | void·devm_thermal_of_zone_unregister(struct·device·*dev,·struct·thermal_zone_device·*tz); |
| | |
| | 166 | #else |
| | |
| | 167 | static·inline |
| | 168 | struct·thermal_zone_device·*devm_thermal_of_zone_register(struct·device·*dev,·int·id,·void·*data, |
| | 169 | » » » » » » » ··const·struct·thermal_zone_device_ops·*ops) |
| | 170 | { |
| | 171 | » return·ERR_PTR(-ENOTSUPP); |
| | 172 | } |
| | |
| | 173 | static·inline·void·devm_thermal_of_zone_unregister(struct·device·*dev, |
| | 174 | » » » » » » ···struct·thermal_zone_device·*tz) |
| | 175 | { |
| | 176 | } |
| | 177 | #endif |
| | |
| | 178 | int·for_each_thermal_trip(struct·thermal_zone_device·*tz, |
| | 179 | » » » ··int·(*cb)(struct·thermal_trip·*,·void·*), |
| | 180 | » » » ··void·*data); |
| | 181 | int·thermal_zone_for_each_trip(struct·thermal_zone_device·*tz, |
| | 182 | » » » ·······int·(*cb)(struct·thermal_trip·*,·void·*), |
| | 183 | » » » ·······void·*data); |
| | 184 | void·thermal_zone_set_trip_temp(struct·thermal_zone_device·*tz, |
| | 185 | » » » » struct·thermal_trip·*trip,·int·temp); |
| | |
| | 186 | int·thermal_zone_get_crit_temp(struct·thermal_zone_device·*tz,·int·*temp); |
| | |
| | 187 | #ifdef·CONFIG_THERMAL |
| | 188 | struct·thermal_zone_device·*thermal_zone_device_register_with_trips( |
| | 189 | » » » » » const·char·*type, |
| | 190 | » » » » » const·struct·thermal_trip·*trips, |
| | 191 | » » » » » int·num_trips,·void·*devdata, |
| | 192 | » » » » » const·struct·thermal_zone_device_ops·*ops, |
| | 193 | » » » » » const·struct·thermal_zone_params·*tzp, |
| | 194 | » » » » » unsigned·int·passive_delay, |
| | 195 | » » » » » unsigned·int·polling_delay); |
| | |
| | 196 | struct·thermal_zone_device·*thermal_tripless_zone_device_register( |
| | 197 | » » » » » const·char·*type, |
| | 198 | » » » » » void·*devdata, |
| | 199 | » » » » » const·struct·thermal_zone_device_ops·*ops, |
| | 200 | » » » » » const·struct·thermal_zone_params·*tzp); |
| | |
| | 201 | void·thermal_zone_device_unregister(struct·thermal_zone_device·*tz); |
| | |
| | 202 | void·*thermal_zone_device_priv(struct·thermal_zone_device·*tzd); |
| | 203 | const·char·*thermal_zone_device_type(struct·thermal_zone_device·*tzd); |
| | 204 | int·thermal_zone_device_id(struct·thermal_zone_device·*tzd); |
| | 205 | struct·device·*thermal_zone_device(struct·thermal_zone_device·*tzd); |
| | |
| | 206 | void·thermal_zone_device_update(struct·thermal_zone_device·*, |
| | 207 | » » » » enum·thermal_notify_event); |
| | |
| | 208 | struct·thermal_cooling_device·*thermal_cooling_device_register(const·char·*, |
| | 209 | » » void·*,·const·struct·thermal_cooling_device_ops·*); |
| | 210 | struct·thermal_cooling_device·* |
| | 211 | thermal_of_cooling_device_register(struct·device_node·*np,·const·char·*,·void·*, |
| | 212 | » » » » ···const·struct·thermal_cooling_device_ops·*); |
| | 213 | struct·thermal_cooling_device·* |
| | 214 | devm_thermal_of_cooling_device_register(struct·device·*dev, |
| | 215 | » » » » struct·device_node·*np, |
| | 216 | » » » » const·char·*type,·void·*devdata, |
| | 217 | » » » » const·struct·thermal_cooling_device_ops·*ops); |
| | 218 | void·thermal_cooling_device_update(struct·thermal_cooling_device·*); |
| | 219 | void·thermal_cooling_device_unregister(struct·thermal_cooling_device·*); |
| | 220 | struct·thermal_zone_device·*thermal_zone_get_zone_by_name(const·char·*name); |
| | 221 | int·thermal_zone_get_temp(struct·thermal_zone_device·*tz,·int·*temp); |
| | 222 | int·thermal_zone_get_slope(struct·thermal_zone_device·*tz); |
| | 223 | int·thermal_zone_get_offset(struct·thermal_zone_device·*tz); |
| | 224 | bool·thermal_trip_is_bound_to_cdev(struct·thermal_zone_device·*tz, |
| | 225 | » » » » ···const·struct·thermal_trip·*trip, |
| | 226 | » » » » ···struct·thermal_cooling_device·*cdev); |
| | |
| | 227 | int·thermal_zone_device_enable(struct·thermal_zone_device·*tz); |
| | 228 | int·thermal_zone_device_disable(struct·thermal_zone_device·*tz); |
| | 229 | void·thermal_zone_device_critical(struct·thermal_zone_device·*tz); |
| | 230 | #else |
| | 231 | static·inline·struct·thermal_zone_device·*thermal_zone_device_register_with_trips( |
| | 232 | » » » » » const·char·*type, |
| | 233 | » » » » » const·struct·thermal_trip·*trips, |
| | 234 | » » » » » int·num_trips,·void·*devdata, |
| | 235 | » » » » » const·struct·thermal_zone_device_ops·*ops, |
| | 236 | » » » » » const·struct·thermal_zone_params·*tzp, |
| | 237 | » » » » » int·passive_delay,·int·polling_delay) |
| | 238 | {·return·ERR_PTR(-ENODEV);·} |
| | |
| | 239 | static·inline·struct·thermal_zone_device·*thermal_tripless_zone_device_register( |
| | 240 | » » » » » const·char·*type, |
| | 241 | » » » » » void·*devdata, |
| | 242 | » » » » » struct·thermal_zone_device_ops·*ops, |
| | 243 | » » » » » const·struct·thermal_zone_params·*tzp) |
| | 244 | {·return·ERR_PTR(-ENODEV);·} |
| | |
| | 245 | static·inline·void·thermal_zone_device_unregister(struct·thermal_zone_device·*tz) |
| | 246 | {·} |
| | |
| | 247 | static·inline·struct·thermal_cooling_device·* |
| | 248 | thermal_cooling_device_register(const·char·*type,·void·*devdata, |
| | 249 | » const·struct·thermal_cooling_device_ops·*ops) |
| | 250 | {·return·ERR_PTR(-ENODEV);·} |
| | 251 | static·inline·struct·thermal_cooling_device·* |
| | 252 | thermal_of_cooling_device_register(struct·device_node·*np, |
| | 253 | » const·char·*type,·void·*devdata, |
| | 254 | » const·struct·thermal_cooling_device_ops·*ops) |
| | 255 | {·return·ERR_PTR(-ENODEV);·} |
| | 256 | static·inline·struct·thermal_cooling_device·* |
| | 257 | devm_thermal_of_cooling_device_register(struct·device·*dev, |
| | 258 | » » » » struct·device_node·*np, |
| | 259 | » » » » const·char·*type,·void·*devdata, |
| | 260 | » » » » const·struct·thermal_cooling_device_ops·*ops) |
| | 261 | { |
| | 262 | » return·ERR_PTR(-ENODEV); |
| | 263 | } |
| | 264 | static·inline·void·thermal_cooling_device_unregister( |
| | 265 | » struct·thermal_cooling_device·*cdev) |
| | 266 | {·} |
| | 267 | static·inline·struct·thermal_zone_device·*thermal_zone_get_zone_by_name( |
| | 268 | » » const·char·*name) |
| | 269 | {·return·ERR_PTR(-ENODEV);·} |
| | 270 | static·inline·int·thermal_zone_get_temp( |
| | 271 | » » struct·thermal_zone_device·*tz,·int·*temp) |
| | 272 | {·return·-ENODEV;·} |
| | 273 | static·inline·int·thermal_zone_get_slope( |
| | 274 | » » struct·thermal_zone_device·*tz) |
| | 275 | {·return·-ENODEV;·} |
| | 276 | static·inline·int·thermal_zone_get_offset( |
| | 277 | » » struct·thermal_zone_device·*tz) |
| | 278 | {·return·-ENODEV;·} |
| | |
| | 279 | static·inline·void·*thermal_zone_device_priv(struct·thermal_zone_device·*tz) |
| | 280 | { |
| | 281 | » return·NULL; |
| | 282 | } |
| | |
| | 283 | static·inline·const·char·*thermal_zone_device_type(struct·thermal_zone_device·*tzd) |
| | 284 | { |
| | 285 | » return·NULL; |
| | 286 | } |
| | |
| | 287 | static·inline·int·thermal_zone_device_id(struct·thermal_zone_device·*tzd) |
| | 288 | { |
| | 289 | » return·-ENODEV; |
| | 290 | } |
| | |
| | 291 | static·inline·int·thermal_zone_device_enable(struct·thermal_zone_device·*tz) |
| | 292 | {·return·-ENODEV;·} |
| | |
| | 293 | static·inline·int·thermal_zone_device_disable(struct·thermal_zone_device·*tz) |
| | 294 | {·return·-ENODEV;·} |
| | 295 | #endif·/*·CONFIG_THERMAL·*/ |
| | |
| 86 | #endif·/*·_UAPI_LINUX_THERMAL_H·*/ | 296 | #endif·/*·__THERMAL_H__·*/ |