]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/thermal.h
bootstage: Record the time taken to set up driver model
[people/ms/u-boot.git] / include / thermal.h
CommitLineData
e3568d2e
YL
1/*
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/**
6918f974 16 * struct dm_thermal_ops - Driver model Thermal operations
e3568d2e
YL
17 *
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 *
6918f974
FE
25 * This must be called before doing any transfers with a Thermal device.
26 * It will enable and initialize any Thermal hardware as necessary.
e3568d2e
YL
27 *
28 * @dev: The Thermal device
6918f974 29 * @temp: pointer that returns the measured temperature
e3568d2e
YL
30 */
31 int (*get_temp)(struct udevice *dev, int *temp);
32};
33
34#endif /* _THERMAL_H_ */