drivers/thermal/tegra/soctherm.h

Source file repositories/reference/linux-study-clean/drivers/thermal/tegra/soctherm.h

File Facts

System
Linux kernel
Corpus path
drivers/thermal/tegra/soctherm.h
Extension
.h
Size
5083 bytes
Lines
163
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tegra_tsensor_group {
	const char *name;
	u8 id;
	u16 sensor_temp_offset;
	u32 sensor_temp_mask;
	u32 pdiv, pdiv_ate, pdiv_mask;
	u32 pllx_hotspot_diff, pllx_hotspot_mask;
	u32 thermtrip_enable_mask;
	u32 thermtrip_any_en_mask;
	u32 thermtrip_threshold_mask;
	u32 thermctl_isr_mask;
	u16 thermctl_lvl0_offset;
	u32 thermctl_lvl0_up_thresh_mask;
	u32 thermctl_lvl0_dn_thresh_mask;
};

struct tegra_tsensor_configuration {
	u32 tall, tiddq_en, ten_count, pdiv, pdiv_ate, tsample, tsample_ate;
};

struct tegra_tsensor {
	const char *name;
	const u32 base;
	const struct tegra_tsensor_configuration *config;
	const u32 calib_fuse_offset;
	/*
	 * Correction values used to modify values read from
	 * calibration fuses
	 */
	const s32 fuse_corr_alpha, fuse_corr_beta;
	const struct tegra_tsensor_group *group;
};

struct tsensor_group_thermtrips {
	u8 id;
	u32 temp;
};

struct tegra_soctherm_fuse {
	u32 fuse_base_cp_mask, fuse_base_cp_shift;
	u32 fuse_shift_cp_mask, fuse_shift_cp_shift;
	u32 fuse_base_ft_mask, fuse_base_ft_shift;
	u32 fuse_shift_ft_mask, fuse_shift_ft_shift;
	u32 fuse_common_reg, fuse_spare_realignment;
	u32 nominal_calib_ft;
};

struct tsensor_shared_calib {
	u32 base_cp, base_ft;
	u32 actual_temp_cp, actual_temp_ft;
};

struct tegra_soctherm_soc {
	const struct tegra_tsensor *tsensors;
	const unsigned int num_tsensors;
	const struct tegra_tsensor_group **ttgs;
	const unsigned int num_ttgs;
	const struct tegra_soctherm_fuse *tfuse;
	const int thresh_grain;
	const unsigned int bptt;
	const bool use_ccroc;
	struct tsensor_group_thermtrips *thermtrips;
};

int tegra_calc_shared_calib(const struct tegra_soctherm_fuse *tfuse,
			    struct tsensor_shared_calib *shared);
int tegra_calc_tsensor_calib(const struct tegra_tsensor *sensor,
			     const struct tsensor_shared_calib *shared,
			     u32 *calib);

#ifdef CONFIG_ARCH_TEGRA_114_SOC
extern const struct tegra_soctherm_soc tegra114_soctherm;
#endif

#ifdef CONFIG_ARCH_TEGRA_124_SOC
extern const struct tegra_soctherm_soc tegra124_soctherm;
#endif

#ifdef CONFIG_ARCH_TEGRA_132_SOC
extern const struct tegra_soctherm_soc tegra132_soctherm;
#endif

#ifdef CONFIG_ARCH_TEGRA_210_SOC
extern const struct tegra_soctherm_soc tegra210_soctherm;
#endif

#endif

Annotation

Implementation Notes