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