Jack Pham | 71b35a9 | 2013-02-13 11:53:08 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. |
Jack Pham | ccbbfab | 2012-04-09 19:50:20 -0700 | [diff] [blame] | 2 | * |
| 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 | */ |
| 19 | enum hsic_sysmon_device_id { |
| 20 | HSIC_SYSMON_DEV_EXT_MODEM, |
Jack Pham | 71b35a9 | 2013-02-13 11:53:08 -0800 | [diff] [blame] | 21 | HSIC_SYSMON_DEV_EXT_MODEM_2, |
Jack Pham | ccbbfab | 2012-04-09 19:50:20 -0700 | [diff] [blame] | 22 | NUM_HSIC_SYSMON_DEVS |
| 23 | }; |
| 24 | |
| 25 | #if defined(CONFIG_MSM_HSIC_SYSMON) || defined(CONFIG_MSM_HSIC_SYSMON_MODULE) |
| 26 | |
| 27 | extern int hsic_sysmon_open(enum hsic_sysmon_device_id id); |
| 28 | extern void hsic_sysmon_close(enum hsic_sysmon_device_id id); |
| 29 | extern int hsic_sysmon_read(enum hsic_sysmon_device_id id, char *data, |
| 30 | size_t len, size_t *actual_len, int timeout); |
| 31 | extern 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 | |
| 36 | static inline int hsic_sysmon_open(enum hsic_sysmon_device_id id) |
| 37 | { |
| 38 | return -ENODEV; |
| 39 | } |
| 40 | |
| 41 | static inline void hsic_sysmon_close(enum hsic_sysmon_device_id id) { } |
| 42 | |
| 43 | static 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 | |
| 49 | static 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__ */ |