blob: 59caf0ea798cbec7e8563321797c44331ed87a50 [file] [log] [blame]
Matt Wagantallf8020902011-08-30 21:19:23 -07001/*
Jack Phamb754b042013-02-13 11:54:14 -08002 * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
Matt Wagantallf8020902011-08-30 21:19:23 -07003 *
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
15#ifndef __MSM_SYSMON_H
16#define __MSM_SYSMON_H
17
Matt Wagantallc3d9a2f2012-04-13 12:39:17 -070018#include <mach/msm_smd.h>
Matt Wagantallf8020902011-08-30 21:19:23 -070019#include <mach/subsystem_notif.h>
20
Matt Wagantall14080c12011-10-19 12:24:00 -070021/**
22 * enum subsys_id - Destination subsystems for events.
23 */
Matt Wagantallf8020902011-08-30 21:19:23 -070024enum subsys_id {
Matt Wagantallc3d9a2f2012-04-13 12:39:17 -070025 /* SMD subsystems */
26 SYSMON_SS_MODEM = SMD_APPS_MODEM,
27 SYSMON_SS_LPASS = SMD_APPS_QDSP,
28 SYSMON_SS_WCNSS = SMD_APPS_WCNSS,
29 SYSMON_SS_DSPS = SMD_APPS_DSPS,
30 SYSMON_SS_Q6FW = SMD_APPS_Q6FW,
31
32 /* Non-SMD subsystems */
33 SYSMON_SS_EXT_MODEM = SMD_NUM_TYPE,
Jack Phamb754b042013-02-13 11:54:14 -080034 SYSMON_SS_EXT_MODEM2,
Matt Wagantallf8020902011-08-30 21:19:23 -070035 SYSMON_NUM_SS
36};
37
Matt Wagantallf8020902011-08-30 21:19:23 -070038#ifdef CONFIG_MSM_SYSMON_COMM
39int sysmon_send_event(enum subsys_id dest_ss, const char *event_ss,
40 enum subsys_notif_type notif);
Matt Wagantalle89b3ac2012-04-30 14:01:39 -070041int sysmon_get_reason(enum subsys_id dest_ss, char *buf, size_t len);
agathon.jungb0c0c6d2012-09-26 11:36:51 -070042int sysmon_send_shutdown(enum subsys_id dest_ss);
Matt Wagantallf8020902011-08-30 21:19:23 -070043#else
44static inline int sysmon_send_event(enum subsys_id dest_ss,
45 const char *event_ss,
46 enum subsys_notif_type notif)
47{
48 return 0;
49}
Matt Wagantalle89b3ac2012-04-30 14:01:39 -070050static inline int sysmon_get_reason(enum subsys_id dest_ss, char *buf,
51 size_t len)
52{
53 return 0;
54}
Ajay Dudani52757612012-09-25 15:06:52 -070055static inline int sysmon_send_shutdown(enum subsys_id dest_ss)
56{
57 return 0;
58}
Matt Wagantallf8020902011-08-30 21:19:23 -070059#endif
60
61#endif