blob: 3792cf79bdd97def8920cbf8a4bfe10db12bbb73 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*******************************************************************************
2 * Copyright (C) 2007, ZTE Corporation.
3 *
4 * File Name: Drvs_ret.h
5 * File Mark:
6 * Description: Provide the declaration of return types for HAL
7 * Others:
8 * Version: V0.5
9 * Author: xiongquan
10 * Date: 2008-12-01
11 * History 1:
12 * Date:
13 * Version:
14 * Author:
15 * Modification:
16 * History 2:
17 ********************************************************************************/
18#ifndef _DRVS_RET_H
19#define _DRVS_RET_H
20
21// the type numbers should be between -100 ~ -254
22typedef enum
23{
24 /* 0 ~ -29: commom */
25 DRV_SUCCESS = 0, /* successed */
26 DRV_ERROR = -1, /* failed */
27 DRV_ERR_INVALID_IOCTL_CMD = -2, /* no this control command branch */
28 DRV_ERR_NOT_SUPPORTED = -3, /* this function hasn't been supported */
29 DRV_ERR_INVALID_PARAM = -4, /* the input parameter is invalid */
30 DRV_ERR_MEM_ALLOC = -5, /* failed to malloc memory */
31 DRV_ERR_HISR_CREATE_FAIL = -6, /* failed to create hisr */
32 DRV_ERR_TIMEOUT = -7, /* timeout for a block waitting operation */
33 DRV_ERR_BUSY = -8, /* busy now to do the request operation */
34 DRV_ERR_NOT_OPENED = -9, /* the device to operate hasn't been opened yet */
35 DRV_ERR_OPEN_TIMES = -10, /* try to open a device which has been opened already */
36 DRV_ERR_NOT_STARTED = -11, /* the device to operate hasn't been started yet */
37 DRV_ERR_START_TIMES = -12, /* try to open a device which has been opened already */
38 /* reserved */
39
40 /* -30 ~ -39: for dal */
41 DRV_ERR_DEV_OVERFLOW = -30, /* no free entry to install this device. please change ZDRV_MAX_DEV_NUM in dal_api.h */
42 DRV_ERR_DEV_TABLE = -31, /* the device table has been destroyed */
43 DRV_ERR_FD_OVERFLOW = -32, /* no free entry to open this device. pleas change ZDRV_MAX_DEV_FILE_NUM in dal_api.h */
44 DRV_ERR_FD_TABLE = -33, /* the file descriptor table has been destroyed */
45 DRV_ERR_INSTALLED_TIMES = -34, /* try to install a device which hasn been installed yet */
46 DRV_ERR_NO_THIS_DEVICE = -35, /* try to open a device which hasn't been installed yet */
47 /* reserved */
48
49 /*-40 ~ -59: for sio */
50 DRV_ERR_NO_CHANNEL = -40, /*the used sio no channel*/
51 DRV_ERR_CHAN_CREATE_FAIL = -41, /*the sio creat channel fail*/
52 DRV_ERR_DEV_STATE_WRONG = -42, /*the sio state error*/
53 DRV_ERR_CHAN_DELETE_FAIL = -43, /*the sio delete channel fail*/
54 DRV_ERR_DEV_READ = -44, /*the sio read data error*/
55 DRV_ERR_CHAN_SEM_USED = -45, /*the sio semp has been used r*/
56 DRV_ERR_CHAN_DELETED = -46, /*the sio channel has been deleted */
57 DRV_ERR_DEV_CLOSED = -47, /*the sio has been closed */
58 DRV_ERR_DEV_OPT_NULL = -48, /*the sio device ptr is null*/
59 DRV_ERR_INSTALL_DRIVER_FAIL = -49, /*the sio install faill*/
60 DRV_ERR_BUFFER_NOT_ENOUGH = -50, /*the sio data buffer not enough*/
61 /* reserved */
62
63
64 /* -60 ~ 69: for mux */
65 DRV_ERR_MUX_INVALID_DLCI = -60, /* the dlci is invalid */
66 DRV_ERR_MUX_BUSY = -61, /* busy now, so the required operation has been rejected */
67 DRV_ERR_MUX_NOT_READY = -62, /* the mux or dlci is not ready to do this required operation */
68 DRV_ERR_MUX_FLOW_CONTROLED = -63, /* this dlc is flow-controled by the opposite station, so can't sent data any more */
69 DRV_ERR_MUX_PN_REJECTED = -64, /* the parameter for this dlc establishment is rejected by the opposite station */
70 DRV_ERR_MUX_BUF_IS_FULL = -65, /* the data buffer of this dlc is full, so can't write any more */
71 DRV_ERR_MUX_BUF_IS_EMPTY = -66, /* the data buffer of this dlc is empty, so no data to transfer */
72 DRV_ERR_MUX_FRAME_INVALID = -67, /* the frame data is invalid */
73 DRV_ERR_MUX_FRAME_UNCOMPLETE = -68, /* the frame data is uncomplete */
74
75 DRV_ERROR_EMPTY = -90,
76 DRV_ERROR_FULL = -91,
77 DRV_ERROR_NODEV = -92,
78 DRV_ERROR_SUSPEND = -93,
79 DRV_ERROR_AGAIN = -94,
80 DRV_ERROR_ABORT = -95,
81 DRV_ERROR_NOCONNECT = -96,
82
83 /*-100~-104 for spi*/
84 DRV_ERR_NOCOMPLETE = -100,
85
86 /*-105~-109 for gpio*/
87 DRV_ERR_NOT_WRITE = -105,
88
89 /*-110~-119 for pmic */
90 DRV_ERR_CLIENT_NBOVERFLOW = -110, /*!< The requested operation could not becompleted because there are too many PMIC client requests */
91 DRV_ERR_SPI_READ = -111,
92 DRV_ERR_SPI_WRITE = -112,
93 DRV_ERR_EVENT_NOT_SUBSCRIBED = -113, /*!< Event occur and not subscribed */
94 DRV_ERR_EVENT_CALL_BACK = -114, /*!< Error - bad call back */
95 DRV_ERR_UNSUBSCRIBE = -115, /*!< Error in un-subscribe event */
96
97 /*-120~-129 for sd */
98 DRV_ERR_INTR_TIMEOUT = -120,
99 DRV_ERR_INTR_ERROR = -121,
100 DRV_ERR_CARDSTATE_ERROR = -122,
101 DRV_ERR_CARD_DISCONNECT = -123,
102 DRV_ERR_WRITE_PROTECT = -124,
103 DRV_ERR_PWD_ERR = -125,
104 DRV_ERR_LOCKCARD_ERR = -126,
105 DRV_ERR_FORCEERASE_ERR = -127,
106 DRV_ERR_RESPONSE_ERR = -128,
107 DRV_ERR_HLE_ERROR = -129,
108 DRV_ERR_EIO = -130, /*IO Error*/
109 DRV_ERR_ERANGE = -131, /* Math result not representable */
110 DRV_ERR_EINPROGRESS = -132, /* Operation now in progress */
111 DRV_ERR_ENODEV = -133, /*no such device*/
112 DRV_ERR_BADMSG = -134, /*not a date message*/
113 DRV_ERR_ENOENT = -135, /* No such file or directory */
114 DRV_ERR_ILSEQ = -136, /* Illegal byte sequence */
115
116 /*-137~-140 for i2c */
117 DRV_ERR_ADDR_TRANSFER = -137,
118 DRV_ERR_DATA_TRANSFER = -138,
119 DRV_ERR_AGAIN = -139,
120 DRV_ERR_NOACK = -140,
121
122
123
124 /*-141~-156 for usb */
125 DRV_ERR_NOT_READY = -141,
126 DRV_ERR_STATUS_BUSY = -142,
127 DRV_ERR_STALL = -143,
128 DRV_ERR_END = -144,
129 DRV_ERR_USB_BUF_STATE = -145,
130 DRV_ERR_USB_BUF_FULL = -146,
131 DRV_ERR_USB_BUF_EMPTY = -147,
132 DRV_ERR_USB_QMI_UNDERRUN = -148,
133 DRV_ERR_USB_QMI_OVERRUN = -149,
134 DRV_ERR_USB_QMI_READ0 = -150,
135 DRV_ERR_USB_UNCONNECTED = -151,
136 DRV_ERR_QMI_HEADER_ERR = -152,
137 DRV_ERR_QMI_CTL_ERR = -153,
138 DRV_ERR_QMI_WDS_ERR = -154,
139 DRV_ERR_QMI_DMS_ERR = -155,
140 DRV_ERR_QMI_NAS_ERR = -156,
141
142 /*-160~-180 for nand */
143 DRV_ERR_LEN_ADDRESS = -160, /* ²Ù×÷µØÖ·´íÎó */
144 DRV_ERR_COMMAND = -161, /* ÃüÁîÂë´íÎó */
145 DRV_ERR_PE_ERROR = -162, /* ÉÕд´íÎó */
146 DRV_ERR_NAND_BUSY = -163, /* оƬæ */
147 DRV_ERR_PROTECTED = -164, /* ±£»¤ÇøÓò */
148 DRV_ERR_BANK_ERROR = -165, /* BANK´íÎó */
149 DRV_ERR_UNKNOWN = -166, /* UNKNOWN´íÎó */
150 DRV_ERR_LENGTH = -167,
151
152 /*-150~-154 for backlight */
153 DRV_ERR_INTERNAL_PERIOD = -180,
154 DRV_ERR_INTERNAL_FREQ = -181
155
156
157}T_DRVS_RETURN_TYPE;
158
159#endif
160