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