pwr: Handle phone reset message
authorPaul Kocialkowski <contact@paulk.fr>
Thu, 7 Mar 2013 20:33:36 +0000 (21:33 +0100)
committerPaul Kocialkowski <contact@paulk.fr>
Thu, 7 Mar 2013 20:33:36 +0000 (21:33 +0100)
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
pwr.c
samsung-ril.c
samsung-ril.h

diff --git a/pwr.c b/pwr.c
index 2d1718f..09241fa 100644 (file)
--- a/pwr.c
+++ b/pwr.c
@@ -38,6 +38,12 @@ void ipc_pwr_phone_pwr_up(void)
        RIL_START_UNLOCK();
 }
 
+void ipc_pwr_phone_reset(void)
+{
+       ril_data.state.radio_state = RADIO_STATE_OFF;
+       ril_request_unsolicited(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, NULL, 0);
+}
+
 /**
  * In: IPC_PWR_PHONE_STATE
  *   Noti from the modem giving current power mode (LPM or NORMAL)
index f79022a..1757f21 100644 (file)
@@ -288,6 +288,9 @@ void ipc_fmt_dispatch(struct ipc_message_info *info)
                case IPC_PWR_PHONE_PWR_UP:
                        ipc_pwr_phone_pwr_up();
                        break;
+               case IPC_PWR_PHONE_RESET:
+                       ipc_pwr_phone_reset();
+                       break;
                case IPC_PWR_PHONE_STATE:
                        ipc_pwr_phone_state(info);
                        break;
index 25f7539..5cbc54a 100644 (file)
@@ -239,6 +239,7 @@ void ipc_gen_phone_res(struct ipc_message_info *info);
 /* PWR */
 
 void ipc_pwr_phone_pwr_up(void);
+void ipc_pwr_phone_reset(void);
 void ipc_pwr_phone_state(struct ipc_message_info *info);
 void ril_request_radio_power(RIL_Token t, void *data, size_t datalen);