blob: b197c0aaa77851b5e7e02ad2396347934d631309 [file] [log] [blame]
Ye.Lie3568d22014-11-20 21:14:13 +08001/*
2 *
3 * (C) Copyright 2014 Freescale Semiconductor, Inc
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#ifndef _THERMAL_H_
9#define _THERMAL_H_
10
11#include <dm.h>
12
13int thermal_get_temp(struct udevice *dev, int *temp);
14
15/**
Fabio Estevam6918f972015-07-13 22:01:52 -030016 * struct dm_thermal_ops - Driver model Thermal operations
Ye.Lie3568d22014-11-20 21:14:13 +080017 *
18 * The uclass interface is implemented by all Thermal devices which use
19 * driver model.
20 */
21struct dm_thermal_ops {
22 /**
23 * Get the current temperature
24 *
Fabio Estevam6918f972015-07-13 22:01:52 -030025 * This must be called before doing any transfers with a Thermal device.
26 * It will enable and initialize any Thermal hardware as necessary.
Ye.Lie3568d22014-11-20 21:14:13 +080027 *
28 * @dev: The Thermal device
Fabio Estevam6918f972015-07-13 22:01:52 -030029 * @temp: pointer that returns the measured temperature
Ye.Lie3568d22014-11-20 21:14:13 +080030 */
31 int (*get_temp)(struct udevice *dev, int *temp);
32};
33
34#endif /* _THERMAL_H_ */