request reset modem
case RIL_REQUEST_RESET_RADIO:
LOGD("got request RIL_REQUEST_RESET_RADIO");
#ifdef MODEM_RESET
int type = ((int *)data)[0];
LOGD("======Reset type = %d, data[0]=%d========", type, ((int *)data)[0]);
ATReset(type);
#endif
RIL_onRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
break;
ATReset():
/* Called on command or reader thread *
* AT reset function:
* resetType: 0 means normal reset
* 1 means reset when AP sleep, this time just need colse tty nodes ,
* and reopen them, and kernel has created noded success.
*/
static void ATReset(int resetType)
{
int fd = -1;
ssize_t written;
static int reset_num = 0;
static int sleep_reset_num = 0;
s_resetType = resetType;
if(resetType == 0){