diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/include/thermal.h | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/include/thermal.h')
-rw-r--r-- | roms/u-boot/include/thermal.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/roms/u-boot/include/thermal.h b/roms/u-boot/include/thermal.h new file mode 100644 index 000000000..52a3317fd --- /dev/null +++ b/roms/u-boot/include/thermal.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * + * (C) Copyright 2014 Freescale Semiconductor, Inc + */ + +#ifndef _THERMAL_H_ +#define _THERMAL_H_ + +struct udevice; + +int thermal_get_temp(struct udevice *dev, int *temp); + +/** + * struct dm_thermal_ops - Driver model Thermal operations + * + * The uclass interface is implemented by all Thermal devices which use + * driver model. + */ +struct dm_thermal_ops { + /** + * Get the current temperature + * + * This must be called before doing any transfers with a Thermal device. + * It will enable and initialize any Thermal hardware as necessary. + * + * @dev: The Thermal device + * @temp: pointer that returns the measured temperature + */ + int (*get_temp)(struct udevice *dev, int *temp); +}; + +#endif /* _THERMAL_H_ */ |