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