drivers/net/wireless/ath/ath12k/thermal.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath12k/thermal.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/ath/ath12k/thermal.h
Extension
.h
Size
1971 bytes
Lines
76
Domain
Driver Families
Bucket
drivers/net
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ath12k_thermal {
	struct completion wmi_sync;

	/* temperature value in Celsius degree protected by data_lock. */
	int temperature;
	struct device *hwmon_dev;
	const struct ath12k_wmi_tt_level_config_param *tt_level_configs;
	struct thermal_cooling_device *cdev;
	/* Serialize thermal operations and hwmon reads */
	struct mutex lock;
	u32 throttle_state;
};

#if IS_REACHABLE(CONFIG_THERMAL)
int ath12k_thermal_register(struct ath12k_base *ab);
void ath12k_thermal_unregister(struct ath12k_base *ab);
void ath12k_thermal_event_temperature(struct ath12k *ar, int temperature);
int ath12k_thermal_throttling_config_default(struct ath12k *ar);
void ath12k_thermal_init_configs(struct ath12k *ar);
int ath12k_thermal_set_throttling(struct ath12k *ar, u32 throttle_state);
#else
static inline int ath12k_thermal_register(struct ath12k_base *ab)
{
	return 0;
}

static inline void ath12k_thermal_unregister(struct ath12k_base *ab)
{
}

static inline void ath12k_thermal_event_temperature(struct ath12k *ar,
						    int temperature)
{
}

static inline int ath12k_thermal_throttling_config_default(struct ath12k *ar)
{
	return 0;
}

static inline void ath12k_thermal_init_configs(struct ath12k *ar)
{
}

static inline int ath12k_thermal_set_throttling(struct ath12k *ar,
						u32 throttle_state)
{
	return 0;
}
#endif
#endif /* _ATH12K_THERMAL_ */

Annotation

Implementation Notes