blob: cc6e0cf79b1a1658b23491d8f336ff405326a692 [file] [log] [blame]
Shalabh Jain1c99e4c2012-03-26 18:47:59 -07001/* 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
17extern unsigned int dci_max_reg;
18extern unsigned int dci_max_clients;
19struct 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
30enum {
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
40int diag_dci_init(void);
41void diag_dci_exit(void);
42void diag_read_smd_dci_work_fn(struct work_struct *);
43int diag_process_dci_client(unsigned char *buf, int len);
44int diag_send_dci_pkt(struct diag_master_table entry, unsigned char *buf,
45 int len, int index);
46#endif