thermal.h 756 B

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