Shalabh Jain | 1c99e4c | 2012-03-26 18:47:59 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2012, Code Aurora Forum. All rights reserved. |
| 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 | #ifndef DIAG_DCI_H |
| 13 | #define DIAG_DCI_H |
| 14 | #define MAX_DCI_CLIENT 10 |
| 15 | #define DCI_CMD_CODE 0x93 |
| 16 | |
| 17 | extern unsigned int dci_max_reg; |
| 18 | extern unsigned int dci_max_clients; |
| 19 | struct diag_dci_tbl { |
| 20 | int pid; |
| 21 | int uid; |
| 22 | int tag; |
| 23 | }; |
| 24 | |
| 25 | #define DIAG_CON_APSS (0x0001) /* Bit mask for APSS */ |
| 26 | #define DIAG_CON_MPSS (0x0002) /* Bit mask for MPSS */ |
| 27 | #define DIAG_CON_LPASS (0x0004) /* Bit mask for LPASS */ |
| 28 | #define DIAG_CON_WCNSS (0x0008) /* Bit mask for WCNSS */ |
| 29 | |
| 30 | enum { |
| 31 | DIAG_DCI_NO_ERROR = 1001, /* No error */ |
| 32 | DIAG_DCI_NO_REG, /* Could not register */ |
| 33 | DIAG_DCI_NO_MEM, /* Failed memory allocation */ |
| 34 | DIAG_DCI_NOT_SUPPORTED, /* This particular client is not supported */ |
| 35 | DIAG_DCI_HUGE_PACKET, /* Request/Response Packet too huge */ |
| 36 | DIAG_DCI_SEND_DATA_FAIL,/* writing to kernel or peripheral fails */ |
| 37 | DIAG_DCI_TABLE_ERR /* Error dealing with registration tables */ |
| 38 | }; |
| 39 | |
| 40 | int diag_dci_init(void); |
| 41 | void diag_dci_exit(void); |
| 42 | void diag_read_smd_dci_work_fn(struct work_struct *); |
| 43 | int diag_process_dci_client(unsigned char *buf, int len); |
| 44 | int diag_send_dci_pkt(struct diag_master_table entry, unsigned char *buf, |
| 45 | int len, int index); |
| 46 | #endif |