drivers/thermal/st/st_thermal.h
Source file repositories/reference/linux-study-clean/drivers/thermal/st/st_thermal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/thermal/st/st_thermal.h- Extension
.h- Size
- 3046 bytes
- Lines
- 101
- 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/interrupt.hlinux/platform_device.hlinux/regmap.hlinux/thermal.h
Detected Declarations
struct st_thermal_sensorstruct st_thermal_sensor_opsstruct st_thermal_compat_datastruct st_thermal_sensorenum st_thermal_regfield_idsenum st_thermal_power_state
Annotated Snippet
struct st_thermal_sensor_ops {
int (*power_ctrl)(struct st_thermal_sensor *, enum st_thermal_power_state);
int (*alloc_regfields)(struct st_thermal_sensor *);
int (*regmap_init)(struct st_thermal_sensor *);
int (*register_enable_irq)(struct st_thermal_sensor *);
int (*enable_irq)(struct st_thermal_sensor *);
};
/**
* Description of thermal driver compatible data.
*
* @reg_fields: Pointer to the regfields array for a sensor.
* @sys_compat: Pointer to the syscon node compatible string.
* @ops: Pointer to private thermal ops for a sensor.
* @calibration_val: Default calibration value to be written to the DCORRECT
* register field for a sensor.
* @temp_adjust_val: Value to be added/subtracted from the data read from
* the sensor. If value needs to be added please provide a
* positive value and if it is to be subtracted please
* provide a negative value.
* @crit_temp: The temperature beyond which the SoC should be shutdown
* to prevent damage.
*/
struct st_thermal_compat_data {
char *sys_compat;
const struct reg_field *reg_fields;
const struct st_thermal_sensor_ops *ops;
unsigned int calibration_val;
int temp_adjust_val;
int crit_temp;
};
struct st_thermal_sensor {
struct device *dev;
struct thermal_zone_device *thermal_dev;
const struct st_thermal_sensor_ops *ops;
const struct st_thermal_compat_data *cdata;
struct clk *clk;
struct regmap *regmap;
struct regmap_field *pwr;
struct regmap_field *dcorrect;
struct regmap_field *overflow;
struct regmap_field *temp_data;
struct regmap_field *int_thresh_hi;
struct regmap_field *int_enable;
int irq;
void __iomem *mmio_base;
};
extern int st_thermal_register(struct platform_device *pdev,
const struct of_device_id *st_thermal_of_match);
extern void st_thermal_unregister(struct platform_device *pdev);
extern const struct dev_pm_ops st_thermal_pm_ops;
#endif /* __STI_RESET_SYSCFG_H */
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/platform_device.h`, `linux/regmap.h`, `linux/thermal.h`.
- Detected declarations: `struct st_thermal_sensor`, `struct st_thermal_sensor_ops`, `struct st_thermal_compat_data`, `struct st_thermal_sensor`, `enum st_thermal_regfield_ids`, `enum st_thermal_power_state`.
- 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.