1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  *
4  * (C) Copyright 2014 Freescale Semiconductor, Inc
5  */
6 
7 #ifndef _THERMAL_H_
8 #define _THERMAL_H_
9 
10 struct udevice;
11 
12 int thermal_get_temp(struct udevice *dev, int *temp);
13 
14 /**
15  * struct dm_thermal_ops - Driver model Thermal operations
16  *
17  * The uclass interface is implemented by all Thermal devices which use
18  * driver model.
19  */
20 struct dm_thermal_ops {
21 	/**
22 	 * Get the current temperature
23 	 *
24 	 * This must be called before doing any transfers with a Thermal device.
25 	 * It will enable and initialize any Thermal hardware as necessary.
26 	 *
27 	 * @dev:	The Thermal device
28 	 * @temp:	pointer that returns the measured temperature
29 	 */
30 	int (*get_temp)(struct udevice *dev, int *temp);
31 };
32 
33 #endif	/* _THERMAL_H_ */
34