thermal.h 756 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. *
  4. * (C) Copyright 2014 Freescale Semiconductor, Inc
  5. */
  6. #ifndef _THERMAL_H_
  7. #define _THERMAL_H_
  8. struct udevice;
  9. int thermal_get_temp(struct udevice *dev, int *temp);
  10. /**
  11. * struct dm_thermal_ops - Driver model Thermal operations
  12. *
  13. * The uclass interface is implemented by all Thermal devices which use
  14. * driver model.
  15. */
  16. struct dm_thermal_ops {
  17. /**
  18. * Get the current temperature
  19. *
  20. * This must be called before doing any transfers with a Thermal device.
  21. * It will enable and initialize any Thermal hardware as necessary.
  22. *
  23. * @dev: The Thermal device
  24. * @temp: pointer that returns the measured temperature
  25. */
  26. int (*get_temp)(struct udevice *dev, int *temp);
  27. };
  28. #endif /* _THERMAL_H_ */