diff options
author | Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> | 2016-01-22 14:15:10 +0530 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:19:15 -0700 |
commit | 41d630980dc9abfb70c41f554133a139fec45e75 (patch) | |
tree | 3c6a8a424435d1c2c9b511c0aedafc6b2b9f1f10 /include/soc | |
parent | 1f7d497b0ace1658c36f631dd594fede4ee3cfbb (diff) |
soc: qcom: sysmon: Enable back MSM_SYSMON_COMM interface support
MSM_SYSMON_GLINK_COMM is currently enabled for all targets which breaks
few existing targets, which do not support GLINK protocol and therefore
are still dependent on MSM_SYSMON_COMM support. Enable back sysmon
communication over SMD interface to preserve backward compatibility
until all targets support GLINK.
Change-Id: I06b6c8cd9c079494998463bbf30e27ad224d7124
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/qcom/hsic_sysmon.h | 57 | ||||
-rw-r--r-- | include/soc/qcom/sysmon.h | 11 |
2 files changed, 64 insertions, 4 deletions
diff --git a/include/soc/qcom/hsic_sysmon.h b/include/soc/qcom/hsic_sysmon.h new file mode 100644 index 000000000000..f6efbe647f00 --- /dev/null +++ b/include/soc/qcom/hsic_sysmon.h @@ -0,0 +1,57 @@ +/* Copyright (c) 2012-2013,2016 The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __HSIC_SYSMON_H__ +#define __HSIC_SYSMON_H__ + +/** + * enum hsic_sysmon_device_id - Supported HSIC subsystem devices + */ +enum hsic_sysmon_device_id { + HSIC_SYSMON_DEV_EXT_MODEM, + HSIC_SYSMON_DEV_EXT_MODEM_2, + NUM_HSIC_SYSMON_DEVS +}; + +#if defined(CONFIG_MSM_HSIC_SYSMON) || defined(CONFIG_MSM_HSIC_SYSMON_MODULE) + +extern int hsic_sysmon_open(enum hsic_sysmon_device_id id); +extern void hsic_sysmon_close(enum hsic_sysmon_device_id id); +extern int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data, + size_t len, size_t *actual_len, int timeout); +extern int hsic_sysmon_write(enum hsic_sysmon_device_id id, const char *data, + size_t len, int timeout); + +#else /* CONFIG_MSM_HSIC_SYSMON || CONFIG_MSM_HSIC_SYSMON_MODULE */ + +static inline int hsic_sysmon_open(enum hsic_sysmon_device_id id) +{ + return -ENODEV; +} + +static inline void hsic_sysmon_close(enum hsic_sysmon_device_id id) { } + +static inline int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data, + size_t len, size_t *actual_len, int timeout) +{ + return -ENODEV; +} + +static inline int hsic_sysmon_write(enum hsic_sysmon_device_id id, + const char *data, size_t len, int timeout) +{ + return -ENODEV; +} + +#endif /* CONFIG_MSM_HSIC_SYSMON || CONFIG_MSM_HSIC_SYSMON_MODULE */ + +#endif /* __HSIC_SYSMON_H__ */ diff --git a/include/soc/qcom/sysmon.h b/include/soc/qcom/sysmon.h index bda973764d8b..9c9500a671de 100644 --- a/include/soc/qcom/sysmon.h +++ b/include/soc/qcom/sysmon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -72,8 +72,6 @@ extern int sysmon_send_shutdown(struct subsys_desc *dest_desc); extern int sysmon_send_shutdown_no_qmi(struct subsys_desc *dest_desc); extern int sysmon_notifier_register(struct subsys_desc *desc); extern void sysmon_notifier_unregister(struct subsys_desc *desc); -extern int sysmon_glink_register(struct subsys_desc *desc); -extern void sysmon_glink_unregister(struct subsys_desc *desc); #else static inline int sysmon_send_event(struct subsys_desc *dest_desc, struct subsys_desc *event_desc, @@ -112,6 +110,12 @@ static inline int sysmon_notifier_register(struct subsys_desc *desc) static inline void sysmon_notifier_unregister(struct subsys_desc *desc) { } +#endif + +#if defined(CONFIG_MSM_SYSMON_GLINK_COMM) +extern int sysmon_glink_register(struct subsys_desc *desc); +extern void sysmon_glink_unregister(struct subsys_desc *desc); +#else static inline int sysmon_glink_register(struct subsys_desc *desc) { return 0; @@ -120,5 +124,4 @@ static inline void sysmon_glink_unregister(struct subsys_desc *desc) { } #endif - #endif |