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