thermal_netlink.h 2.7 KB

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