Lines Matching refs:dts
78 struct intel_soc_dts_sensor_entry *dts; in sys_get_trip_temp() local
81 dts = tzd->devdata; in sys_get_trip_temp()
82 sensors = dts->sensors; in sys_get_trip_temp()
99 static int update_trip_temp(struct intel_soc_dts_sensor_entry *dts, in update_trip_temp() argument
111 struct intel_soc_dts_sensors *sensors = dts->sensors; in update_trip_temp()
172 dts->trip_types[thres_index] = trip_type; in update_trip_temp()
192 struct intel_soc_dts_sensor_entry *dts = tzd->devdata; in sys_set_trip_temp() local
193 struct intel_soc_dts_sensors *sensors = dts->sensors; in sys_set_trip_temp()
201 dts->trip_types[trip]); in sys_set_trip_temp()
210 struct intel_soc_dts_sensor_entry *dts; in sys_get_trip_type() local
212 dts = tzd->devdata; in sys_get_trip_type()
214 *type = dts->trip_types[trip]; in sys_get_trip_type()
224 struct intel_soc_dts_sensor_entry *dts; in sys_get_curr_temp() local
227 dts = tzd->devdata; in sys_get_curr_temp()
228 sensors = dts->sensors; in sys_get_curr_temp()
234 out = (out & dts->temp_mask) >> dts->temp_shift; in sys_get_curr_temp()
269 static void remove_dts_thermal_zone(struct intel_soc_dts_sensor_entry *dts) in remove_dts_thermal_zone() argument
271 if (dts) { in remove_dts_thermal_zone()
273 SOC_DTS_OFFSET_ENABLE, dts->store_status); in remove_dts_thermal_zone()
274 thermal_zone_device_unregister(dts->tzone); in remove_dts_thermal_zone()
278 static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts, in add_dts_thermal_zone() argument
291 SOC_DTS_OFFSET_ENABLE, &dts->store_status); in add_dts_thermal_zone()
295 dts->id = id; in add_dts_thermal_zone()
296 dts->temp_mask = 0x00FF << (id * 8); in add_dts_thermal_zone()
297 dts->temp_shift = id * 8; in add_dts_thermal_zone()
315 dts->trip_mask = trip_mask; in add_dts_thermal_zone()
316 dts->trip_count = trip_count; in add_dts_thermal_zone()
318 dts->tzone = thermal_zone_device_register(name, in add_dts_thermal_zone()
321 dts, &tzone_ops, in add_dts_thermal_zone()
323 if (IS_ERR(dts->tzone)) { in add_dts_thermal_zone()
324 ret = PTR_ERR(dts->tzone); in add_dts_thermal_zone()
334 thermal_zone_device_unregister(dts->tzone); in add_dts_thermal_zone()