sysmon.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. */
  14. #ifndef __MSM_SYSMON_H
  15. #define __MSM_SYSMON_H
  16. #include <mach/msm_smd.h>
  17. #include <mach/subsystem_notif.h>
  18. /**
  19. * enum subsys_id - Destination subsystems for events.
  20. */
  21. enum subsys_id {
  22. /* SMD subsystems */
  23. SYSMON_SS_MODEM = SMD_APPS_MODEM,
  24. SYSMON_SS_LPASS = SMD_APPS_QDSP,
  25. SYSMON_SS_WCNSS = SMD_APPS_WCNSS,
  26. SYSMON_SS_DSPS = SMD_APPS_DSPS,
  27. SYSMON_SS_Q6FW = SMD_APPS_Q6FW,
  28. /* Non-SMD subsystems */
  29. SYSMON_SS_EXT_MODEM = SMD_NUM_TYPE,
  30. SYSMON_NUM_SS
  31. };
  32. #ifdef CONFIG_MSM_SYSMON_COMM
  33. int sysmon_send_event(enum subsys_id dest_ss, const char *event_ss,
  34. enum subsys_notif_type notif);
  35. int sysmon_get_reason(enum subsys_id dest_ss, char *buf, size_t len);
  36. int sysmon_send_shutdown(enum subsys_id dest_ss);
  37. #else
  38. static inline int sysmon_send_event(enum subsys_id dest_ss,
  39. const char *event_ss,
  40. enum subsys_notif_type notif)
  41. {
  42. return 0;
  43. }
  44. static inline int sysmon_get_reason(enum subsys_id dest_ss, char *buf,
  45. size_t len)
  46. {
  47. return 0;
  48. }
  49. static inline int sysmon_send_shutdown(enum subsys_id dest_ss)
  50. {
  51. return 0;
  52. }
  53. #endif
  54. #endif