drivers/thermal/intel/intel_soc_dts_iosf.c
Source file repositories/reference/linux-study-clean/drivers/thermal/intel/intel_soc_dts_iosf.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/thermal/intel/intel_soc_dts_iosf.c- Extension
.c- Size
- 9972 bytes
- Lines
- 394
- Domain
- Driver Families
- Bucket
- drivers/thermal
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/intel_tcc.hlinux/module.hlinux/slab.hlinux/interrupt.hasm/iosf_mbi.hintel_soc_dts_iosf.h
Detected Declarations
function Copyrightfunction sys_set_trip_tempfunction sys_get_curr_tempfunction soc_dts_enablefunction remove_dts_thermal_zonefunction add_dts_thermal_zonefunction intel_soc_dts_iosf_interrupt_handlerfunction dts_trips_resetfunction set_tripfunction intel_soc_dts_iosf_initfunction intel_soc_dts_iosf_exitexport intel_soc_dts_iosf_interrupt_handlerexport intel_soc_dts_iosf_initexport intel_soc_dts_iosf_exit
Annotated Snippet
if (critical_trip) {
temp = sensors->tj_max - crit_offset;
set_trip(&trips[i][1], THERMAL_TRIP_CRITICAL, 0, temp, 1);
} else {
set_trip(&trips[i][1], THERMAL_TRIP_PASSIVE,
THERMAL_TRIP_FLAG_RW_TEMP, 0, 1);
temp = 0;
}
ret = update_trip_temp(sensors, 1, temp);
if (ret)
goto err_reset_trips;
}
for (i = 0; i < SOC_MAX_DTS_SENSORS; ++i) {
ret = add_dts_thermal_zone(i, &sensors->soc_dts[i], trips[i]);
if (ret)
goto err_remove_zone;
}
return sensors;
err_remove_zone:
for (i = 0; i < SOC_MAX_DTS_SENSORS; ++i)
remove_dts_thermal_zone(&sensors->soc_dts[i]);
err_reset_trips:
for (i = 0; i < SOC_MAX_DTS_SENSORS; i++)
dts_trips_reset(sensors, i);
kfree(sensors);
return ERR_PTR(ret);
}
EXPORT_SYMBOL_GPL(intel_soc_dts_iosf_init);
void intel_soc_dts_iosf_exit(struct intel_soc_dts_sensors *sensors)
{
int i;
for (i = 0; i < SOC_MAX_DTS_SENSORS; ++i) {
remove_dts_thermal_zone(&sensors->soc_dts[i]);
dts_trips_reset(sensors, i);
}
kfree(sensors);
}
EXPORT_SYMBOL_GPL(intel_soc_dts_iosf_exit);
MODULE_IMPORT_NS("INTEL_TCC");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("SoC DTS driver using side band interface");
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/intel_tcc.h`, `linux/module.h`, `linux/slab.h`, `linux/interrupt.h`, `asm/iosf_mbi.h`, `intel_soc_dts_iosf.h`.
- Detected declarations: `function Copyright`, `function sys_set_trip_temp`, `function sys_get_curr_temp`, `function soc_dts_enable`, `function remove_dts_thermal_zone`, `function add_dts_thermal_zone`, `function intel_soc_dts_iosf_interrupt_handler`, `function dts_trips_reset`, `function set_trip`, `function intel_soc_dts_iosf_init`.
- Atlas domain: Driver Families / drivers/thermal.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.