blob: 9655dc030b06833acb7cf8d915f7bcdec6f3ca89 [file] [log] [blame]
Jack Pham71b35a92013-02-13 11:53:08 -08001/* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
Jack Phamccbbfab2012-04-09 19:50:20 -07002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __HSIC_SYSMON_H__
14#define __HSIC_SYSMON_H__
15
16/**
17 * enum hsic_sysmon_device_id - Supported HSIC subsystem devices
18 */
19enum hsic_sysmon_device_id {
20 HSIC_SYSMON_DEV_EXT_MODEM,
Jack Pham71b35a92013-02-13 11:53:08 -080021 HSIC_SYSMON_DEV_EXT_MODEM_2,
Jack Phamccbbfab2012-04-09 19:50:20 -070022 NUM_HSIC_SYSMON_DEVS
23};
24
25#if defined(CONFIG_MSM_HSIC_SYSMON) || defined(CONFIG_MSM_HSIC_SYSMON_MODULE)
26
27extern int hsic_sysmon_open(enum hsic_sysmon_device_id id);
28extern void hsic_sysmon_close(enum hsic_sysmon_device_id id);
29extern int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data,
30 size_t len, size_t *actual_len, int timeout);
31extern int hsic_sysmon_write(enum hsic_sysmon_device_id id, const char *data,
32 size_t len, int timeout);
33
34#else /* CONFIG_MSM_HSIC_SYSMON || CONFIG_MSM_HSIC_SYSMON_MODULE */
35
36static inline int hsic_sysmon_open(enum hsic_sysmon_device_id id)
37{
38 return -ENODEV;
39}
40
41static inline void hsic_sysmon_close(enum hsic_sysmon_device_id id) { }
42
43static inline int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data,
44 size_t len, size_t *actual_len, int timeout)
45{
46 return -ENODEV;
47}
48
49static inline int hsic_sysmon_write(enum hsic_sysmon_device_id id,
50 const char *data, size_t len, int timeout)
51{
52 return -ENODEV;
53}
54
55#endif /* CONFIG_MSM_HSIC_SYSMON || CONFIG_MSM_HSIC_SYSMON_MODULE */
56
57#endif /* __HSIC_SYSMON_H__ */