2018-05-07 05:58:06 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2014-11-20 21:14:13 +08:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (C) Copyright 2014 Freescale Semiconductor, Inc
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _THERMAL_H_
|
|
|
|
#define _THERMAL_H_
|
|
|
|
|
|
|
|
#include <dm.h>
|
|
|
|
|
|
|
|
int thermal_get_temp(struct udevice *dev, int *temp);
|
|
|
|
|
|
|
|
/**
|
2015-07-14 09:01:52 +08:00
|
|
|
* struct dm_thermal_ops - Driver model Thermal operations
|
2014-11-20 21:14:13 +08: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 09:01:52 +08: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 21:14:13 +08:00
|
|
|
*
|
|
|
|
* @dev: The Thermal device
|
2015-07-14 09:01:52 +08:00
|
|
|
* @temp: pointer that returns the measured temperature
|
2014-11-20 21:14:13 +08:00
|
|
|
*/
|
|
|
|
int (*get_temp)(struct udevice *dev, int *temp);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _THERMAL_H_ */
|