drivers/thermal/ti-soc-thermal/ti-bandgap.h
Source file repositories/reference/linux-study-clean/drivers/thermal/ti-soc-thermal/ti-bandgap.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/thermal/ti-soc-thermal/ti-bandgap.h- Extension
.h- Size
- 14117 bytes
- Lines
- 379
- Domain
- Driver Families
- Bucket
- drivers/thermal
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/spinlock.hlinux/types.hlinux/err.hlinux/cpu_pm.hlinux/device.hlinux/pm_runtime.hlinux/pm.h
Detected Declarations
struct gpio_descstruct temp_sensor_registersstruct temp_sensor_datastruct ti_bandgap_datastruct temp_sensor_regvalstruct ti_bandgapstruct ti_temp_sensorstruct ti_bandgap_data
Annotated Snippet
struct temp_sensor_registers {
u32 temp_sensor_ctrl;
u32 bgap_tempsoff_mask;
u32 bgap_soc_mask;
u32 bgap_eocz_mask;
u32 bgap_dtemp_mask;
u32 bgap_mask_ctrl;
u32 mask_hot_mask;
u32 mask_cold_mask;
u32 mask_counter_delay_mask;
u32 mask_freeze_mask;
u32 bgap_mode_ctrl;
u32 mode_ctrl_mask;
u32 bgap_counter;
u32 counter_mask;
u32 bgap_threshold;
u32 threshold_thot_mask;
u32 threshold_tcold_mask;
u32 tshut_threshold;
u32 tshut_hot_mask;
u32 tshut_cold_mask;
u32 bgap_status;
u32 status_hot_mask;
u32 status_cold_mask;
u32 ctrl_dtemp_1;
u32 ctrl_dtemp_2;
u32 bgap_efuse;
};
/**
* struct temp_sensor_data - The thresholds and limits for temperature sensors.
* @tshut_hot: temperature to trigger a thermal reset (initial value)
* @tshut_cold: temp to get the plat out of reset due to thermal (init val)
* @t_hot: temperature to trigger a thermal alert (high initial value)
* @t_cold: temperature to trigger a thermal alert (low initial value)
* @min_freq: sensor minimum clock rate
* @max_freq: sensor maximum clock rate
*
* This data structure will hold the required thresholds and temperature limits
* for a specific temperature sensor, like shutdown temperature, alert
* temperature, clock / rate used, ADC conversion limits and update intervals
*/
struct temp_sensor_data {
u32 tshut_hot;
u32 tshut_cold;
u32 t_hot;
u32 t_cold;
u32 min_freq;
u32 max_freq;
};
struct ti_bandgap_data;
/**
* struct temp_sensor_regval - temperature sensor register values and priv data
* @bg_mode_ctrl: temp sensor control register value
* @bg_ctrl: bandgap ctrl register value
* @bg_counter: bandgap counter value
* @bg_threshold: bandgap threshold register value
* @tshut_threshold: bandgap tshut register value
* @data: private data
*
* Data structure to save and restore bandgap register set context. Only
* required registers are shadowed, when needed.
*/
struct temp_sensor_regval {
u32 bg_mode_ctrl;
u32 bg_ctrl;
u32 bg_counter;
u32 bg_threshold;
u32 tshut_threshold;
void *data;
};
/**
* struct ti_bandgap - bandgap device structure
* @dev: struct device pointer
* @base: io memory base address
* @conf: struct with bandgap configuration set (# sensors, conv_table, etc)
* @regval: temperature sensor register values
* @fclock: pointer to functional clock of temperature sensor
* @div_clk: pointer to divider clock of temperature sensor fclk
* @lock: spinlock for ti_bandgap structure
Annotation
- Immediate include surface: `linux/spinlock.h`, `linux/types.h`, `linux/err.h`, `linux/cpu_pm.h`, `linux/device.h`, `linux/pm_runtime.h`, `linux/pm.h`.
- Detected declarations: `struct gpio_desc`, `struct temp_sensor_registers`, `struct temp_sensor_data`, `struct ti_bandgap_data`, `struct temp_sensor_regval`, `struct ti_bandgap`, `struct ti_temp_sensor`, `struct ti_bandgap_data`.
- Atlas domain: Driver Families / drivers/thermal.
- Implementation status: source implementation candidate.
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.