xref: /kernel/linux/linux-5.10/drivers/thermal/intel/intel_soc_dts_iosf.h (revision 8c2ecf20)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/drivers/thermal/intel/
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * intel_soc_dts_iosf.h
4 * Copyright (c) 2015, Intel Corporation.
5 */
6
7#ifndef _INTEL_SOC_DTS_IOSF_CORE_H
8#define _INTEL_SOC_DTS_IOSF_CORE_H
9
10#include <linux/thermal.h>
11
12/* DTS0 and DTS 1 */
13#define SOC_MAX_DTS_SENSORS	2
14
15enum intel_soc_dts_interrupt_type {
16	INTEL_SOC_DTS_INTERRUPT_NONE,
17	INTEL_SOC_DTS_INTERRUPT_APIC,
18	INTEL_SOC_DTS_INTERRUPT_MSI,
19	INTEL_SOC_DTS_INTERRUPT_SCI,
20	INTEL_SOC_DTS_INTERRUPT_SMI,
21};
22
23struct intel_soc_dts_sensors;
24
25struct intel_soc_dts_sensor_entry {
26	int id;
27	u32 store_status;
28	u32 trip_mask;
29	u32 trip_count;
30	enum thermal_trip_type trip_types[2];
31	struct thermal_zone_device *tzone;
32	struct intel_soc_dts_sensors *sensors;
33};
34
35struct intel_soc_dts_sensors {
36	u32 tj_max;
37	spinlock_t intr_notify_lock;
38	struct mutex dts_update_lock;
39	enum intel_soc_dts_interrupt_type intr_type;
40	struct intel_soc_dts_sensor_entry soc_dts[SOC_MAX_DTS_SENSORS];
41};
42
43struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(
44	enum intel_soc_dts_interrupt_type intr_type, int trip_count,
45	int read_only_trip_count);
46void intel_soc_dts_iosf_exit(struct intel_soc_dts_sensors *sensors);
47void intel_soc_dts_iosf_interrupt_handler(
48				struct intel_soc_dts_sensors *sensors);
49int intel_soc_dts_iosf_add_read_only_critical_trip(
50	struct intel_soc_dts_sensors *sensors, int critical_offset);
51#endif
52

Indexes created Thu Nov 07 10:32:03 CST 2024