1*91f16700Schasinglulu /* 2*91f16700Schasinglulu * Copyright (C) 2018 Marvell International Ltd. 3*91f16700Schasinglulu * 4*91f16700Schasinglulu * SPDX-License-Identifier: BSD-3-Clause 5*91f16700Schasinglulu * https://spdx.org/licenses 6*91f16700Schasinglulu */ 7*91f16700Schasinglulu 8*91f16700Schasinglulu /* Driver for thermal unit located in Marvell ARMADA 8K and compatible SoCs */ 9*91f16700Schasinglulu 10*91f16700Schasinglulu #ifndef THERMAL_H 11*91f16700Schasinglulu #define THERMAL_H 12*91f16700Schasinglulu 13*91f16700Schasinglulu struct tsen_config { 14*91f16700Schasinglulu /* thermal temperature parameters */ 15*91f16700Schasinglulu int tsen_offset; 16*91f16700Schasinglulu int tsen_gain; 17*91f16700Schasinglulu int tsen_divisor; 18*91f16700Schasinglulu /* thermal data */ 19*91f16700Schasinglulu int tsen_ready; 20*91f16700Schasinglulu void *regs_base; 21*91f16700Schasinglulu /* thermal functionality */ 22*91f16700Schasinglulu int (*ptr_tsen_probe)(struct tsen_config *cfg); 23*91f16700Schasinglulu int (*ptr_tsen_read)(struct tsen_config *cfg, int *temp); 24*91f16700Schasinglulu }; 25*91f16700Schasinglulu 26*91f16700Schasinglulu /* Thermal driver APIs */ 27*91f16700Schasinglulu int marvell_thermal_init(struct tsen_config *tsen_cfg); 28*91f16700Schasinglulu int marvell_thermal_read(struct tsen_config *tsen_cfg, int *temp); 29*91f16700Schasinglulu struct tsen_config *marvell_thermal_config_get(void); 30*91f16700Schasinglulu 31*91f16700Schasinglulu #endif /* THERMAL_H */ 32