thermal.h 782 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (C) 2018 Marvell International Ltd.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. * https://spdx.org/licenses
  6. */
  7. /* Driver for thermal unit located in Marvell ARMADA 8K and compatible SoCs */
  8. #ifndef THERMAL_H
  9. #define THERMAL_H
  10. struct tsen_config {
  11. /* thermal temperature parameters */
  12. int tsen_offset;
  13. int tsen_gain;
  14. int tsen_divisor;
  15. /* thermal data */
  16. int tsen_ready;
  17. void *regs_base;
  18. /* thermal functionality */
  19. int (*ptr_tsen_probe)(struct tsen_config *cfg);
  20. int (*ptr_tsen_read)(struct tsen_config *cfg, int *temp);
  21. };
  22. /* Thermal driver APIs */
  23. int marvell_thermal_init(struct tsen_config *tsen_cfg);
  24. int marvell_thermal_read(struct tsen_config *tsen_cfg, int *temp);
  25. struct tsen_config *marvell_thermal_config_get(void);
  26. #endif /* THERMAL_H */