blob: 191f97bab695bdb63aec9eba79cda50c9144b527 [file] [log] [blame]
Konstantin Porotchkin031fa072018-02-26 16:08:26 +02001/*
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
13struct 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 */
27int marvell_thermal_init(struct tsen_config *tsen_cfg);
28int marvell_thermal_read(struct tsen_config *tsen_cfg, int *temp);
29struct tsen_config *marvell_thermal_config_get(void);
30
31#endif /* _THERMAL_H */