thermal_netlink.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) Linaro Ltd 2020
  4. * Author: Daniel Lezcano <daniel.lezcano@linaro.org>
  5. */
  6. /* Netlink notification function */
  7. #ifdef CONFIG_THERMAL_NETLINK
  8. int __init thermal_netlink_init(void);
  9. int thermal_notify_tz_create(int tz_id, const char *name);
  10. int thermal_notify_tz_delete(int tz_id);
  11. int thermal_notify_tz_enable(int tz_id);
  12. int thermal_notify_tz_disable(int tz_id);
  13. int thermal_notify_tz_trip_down(int tz_id, int id);
  14. int thermal_notify_tz_trip_up(int tz_id, int id);
  15. int thermal_notify_tz_trip_delete(int tz_id, int id);
  16. int thermal_notify_tz_trip_add(int tz_id, int id, int type,
  17. int temp, int hyst);
  18. int thermal_notify_tz_trip_change(int tz_id, int id, int type,
  19. int temp, int hyst);
  20. int thermal_notify_cdev_state_update(int cdev_id, int state);
  21. int thermal_notify_cdev_add(int cdev_id, const char *name, int max_state);
  22. int thermal_notify_cdev_delete(int cdev_id);
  23. int thermal_notify_tz_gov_change(int tz_id, const char *name);
  24. int thermal_genl_sampling_temp(int id, int temp);
  25. #else
  26. static inline int thermal_netlink_init(void)
  27. {
  28. return 0;
  29. }
  30. static inline int thermal_notify_tz_create(int tz_id, const char *name)
  31. {
  32. return 0;
  33. }
  34. static inline int thermal_notify_tz_delete(int tz_id)
  35. {
  36. return 0;
  37. }
  38. static inline int thermal_notify_tz_enable(int tz_id)
  39. {
  40. return 0;
  41. }
  42. static inline int thermal_notify_tz_disable(int tz_id)
  43. {
  44. return 0;
  45. }
  46. static inline int thermal_notify_tz_trip_down(int tz_id, int id)
  47. {
  48. return 0;
  49. }
  50. static inline int thermal_notify_tz_trip_up(int tz_id, int id)
  51. {
  52. return 0;
  53. }
  54. static inline int thermal_notify_tz_trip_delete(int tz_id, int id)
  55. {
  56. return 0;
  57. }
  58. static inline int thermal_notify_tz_trip_add(int tz_id, int id, int type,
  59. int temp, int hyst)
  60. {
  61. return 0;
  62. }
  63. static inline int thermal_notify_tz_trip_change(int tz_id, int id, int type,
  64. int temp, int hyst)
  65. {
  66. return 0;
  67. }
  68. static inline int thermal_notify_cdev_state_update(int cdev_id, int state)
  69. {
  70. return 0;
  71. }
  72. static inline int thermal_notify_cdev_add(int cdev_id, const char *name,
  73. int max_state)
  74. {
  75. return 0;
  76. }
  77. static inline int thermal_notify_cdev_delete(int cdev_id)
  78. {
  79. return 0;
  80. }
  81. static inline int thermal_notify_tz_gov_change(int tz_id, const char *name)
  82. {
  83. return 0;
  84. }
  85. static inline int thermal_genl_sampling_temp(int id, int temp)
  86. {
  87. return 0;
  88. }
  89. #endif /* CONFIG_THERMAL_NETLINK */