2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-11-20 13:14:13 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (C) Copyright 2014 Freescale Semiconductor, Inc
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _THERMAL_H_
|
|
|
|
#define _THERMAL_H_
|
|
|
|
|
2020-07-19 16:15:41 +00:00
|
|
|
struct udevice;
|
2014-11-20 13:14:13 +00:00
|
|
|
|
|
|
|
int thermal_get_temp(struct udevice *dev, int *temp);
|
|
|
|
|
|
|
|
/**
|
2015-07-14 01:01:52 +00:00
|
|
|
* struct dm_thermal_ops - Driver model Thermal operations
|
2014-11-20 13:14:13 +00:00
|
|
|
*
|
|
|
|
* The uclass interface is implemented by all Thermal devices which use
|
|
|
|
* driver model.
|
|
|
|
*/
|
|
|
|
struct dm_thermal_ops {
|
|
|
|
/**
|
|
|
|
* Get the current temperature
|
|
|
|
*
|
2015-07-14 01:01:52 +00:00
|
|
|
* This must be called before doing any transfers with a Thermal device.
|
|
|
|
* It will enable and initialize any Thermal hardware as necessary.
|
2014-11-20 13:14:13 +00:00
|
|
|
*
|
|
|
|
* @dev: The Thermal device
|
2015-07-14 01:01:52 +00:00
|
|
|
* @temp: pointer that returns the measured temperature
|
2014-11-20 13:14:13 +00:00
|
|
|
*/
|
|
|
|
int (*get_temp)(struct udevice *dev, int *temp);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _THERMAL_H_ */
|