blob: 48376a7901fa1980596bf3d3282d03ca824f047d [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
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000010#ifndef THERMAL_H
11#define THERMAL_H
Konstantin Porotchkin031fa072018-02-26 16:08:26 +020012
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
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000031#endif /* THERMAL_H */