diff options
Diffstat (limited to 'recipes/openmoko2/openmoko-dialer2')
3 files changed, 145 insertions, 0 deletions
diff --git a/recipes/openmoko2/openmoko-dialer2/om-gta01/kernel-2.6.24.patch b/recipes/openmoko2/openmoko-dialer2/om-gta01/kernel-2.6.24.patch new file mode 100644 index 0000000000..c6f34f4131 --- /dev/null +++ b/recipes/openmoko2/openmoko-dialer2/om-gta01/kernel-2.6.24.patch @@ -0,0 +1,13 @@ +Index: openmoko-dialer2/src/phone-kit/moko-notify.c +=================================================================== +--- openmoko-dialer2/src/phone-kit/moko-notify.c.orig 2008-02-14 17:47:23.000000000 +0800 ++++ openmoko-dialer2/src/phone-kit/moko-notify.c 2008-02-14 17:48:19.000000000 +0800 +@@ -38,7 +38,7 @@ + + #define DEFAULT_RINGTONE "/default_ringtone.ogg" + #define SYS_BRIGHTNESS "/sys/class/backlight/gta01-bl" +-#define SYS_VIBRATE "/sys/class/leds/gta01:vibrator" ++#define SYS_VIBRATE "/sys/class/leds/neo1973:vibrator" + + struct _MokoNotifyPrivate + { diff --git a/recipes/openmoko2/openmoko-dialer2/om-gta02/kernel-2.6.24.patch b/recipes/openmoko2/openmoko-dialer2/om-gta02/kernel-2.6.24.patch new file mode 100644 index 0000000000..72c516f5d6 --- /dev/null +++ b/recipes/openmoko2/openmoko-dialer2/om-gta02/kernel-2.6.24.patch @@ -0,0 +1,15 @@ +Index: openmoko-dialer2/src/phone-kit/moko-notify.c +=================================================================== +--- openmoko-dialer2/src/phone-kit/moko-notify.c (revision 4051) ++++ openmoko-dialer2/src/phone-kit/moko-notify.c (working copy) +@@ -37,8 +37,8 @@ + MOKO_TYPE_NOTIFY, MokoNotifyPrivate)) + + #define DEFAULT_RINGTONE "/default_ringtone.ogg" +-#define SYS_BRIGHTNESS "/sys/class/backlight/gta01-bl" +-#define SYS_VIBRATE "/sys/class/leds/gta01:vibrator" ++#define SYS_BRIGHTNESS "/sys/class/backlight/pcf50633-bl" ++#define SYS_VIBRATE "/sys/class/leds/neo1973:vibrator" + + struct _MokoNotifyPrivate + { diff --git a/recipes/openmoko2/openmoko-dialer2/openmoko-dialer.patch b/recipes/openmoko2/openmoko-dialer2/openmoko-dialer.patch new file mode 100644 index 0000000000..5969726857 --- /dev/null +++ b/recipes/openmoko2/openmoko-dialer2/openmoko-dialer.patch @@ -0,0 +1,117 @@ +--- openmoko-dialer2/src/moko-dialer.c~ 2007-08-27 20:02:37.000000000 +0930 ++++ openmoko-dialer2/src/moko-dialer.c 2007-08-27 18:59:37.000000000 +0930 +@@ -69,8 +69,7 @@ + + /* Registration variables */ + guint reg_timeout; +- gboolean reg_request; +- gboolean registered; ++ MokoGsmdConnectionNetregType registered; + }; + + enum +@@ -292,8 +291,7 @@ + + moko_keypad_set_pin_mode (MOKO_KEYPAD (priv->keypad), FALSE); + +- priv->reg_request = TRUE; +- priv->registered = FALSE; ++ priv->registered = MOKO_GSMD_CONNECTION_NETREG_NONE; + priv->reg_timeout = g_timeout_add (GSM_REGISTER_TIMEOUT, + (GSourceFunc)register_network_cb, + dialer); +@@ -424,14 +422,14 @@ + g_return_if_fail (MOKO_IS_DIALER (dialer)); + priv = dialer->priv; + ++ g_warning ("on_network_registered: type is %d\n", type); ++ + switch (type) + { + case MOKO_GSMD_CONNECTION_NETREG_NONE: + case MOKO_GSMD_CONNECTION_NETREG_SEARCHING: + /* Do nothing */ + g_print ("NetReg: Searching for network\n"); +- g_source_remove (priv->reg_timeout); +- priv->registered = TRUE; + break; + case MOKO_GSMD_CONNECTION_NETREG_DENIED: + /* This may be a pin issue*/ +@@ -441,11 +439,12 @@ + g_print ("NetReg: Network registered\n"); + g_print("\tLocationAreaCode = %x\n\tCellID = %x\n", lac, cell); + g_source_remove (priv->reg_timeout); +- priv->registered = TRUE; + break; + default: + g_warning ("Unhandled register event type = %d\n", type); + }; ++ ++ priv->registered = type; + } + + static void +@@ -619,28 +618,32 @@ + g_return_val_if_fail (MOKO_DIALER (dialer), TRUE); + priv = MOKO_DIALER_GET_PRIVATE (dialer); + +- if (!priv->reg_request) ++ /* We check whether we've been registered yet, otherwise keep poking ++ * gsmd ++ */ ++ switch (priv->registered) + { +- /* We have yet to request registration, so lets do it */ +- /* FIXME: do the pin stuff */ +- g_print ("Requesting registration\n"); +- moko_gsmd_connection_network_register (priv->connection); +- } +- else +- { +- /* We check whether we've been registered yet, otherwise keep poking +- * gsmd +- */ +- if (priv->registered) +- { +- g_print ("Network Registered\n"); +- return FALSE; +- } +- else +- { ++ case MOKO_GSMD_CONNECTION_NETREG_NONE: ++ /* We have yet to request registration, so lets do it */ ++ /* FIXME: do the pin stuff */ + g_print ("Requesting registration\n"); + moko_gsmd_connection_network_register (priv->connection); +- } ++ priv->registered = MOKO_GSMD_CONNECTION_NETREG_SEARCHING; ++ break; ++ case MOKO_GSMD_CONNECTION_NETREG_SEARCHING: ++ g_print ("Waiting for registration\n"); ++ break; ++ case MOKO_GSMD_CONNECTION_NETREG_DENIED: ++ g_print ("Registration denied, retrying\n"); ++ moko_gsmd_connection_network_register (priv->connection); ++ priv->registered = MOKO_GSMD_CONNECTION_NETREG_SEARCHING; ++ break; ++ case MOKO_GSMD_CONNECTION_NETREG_HOME: ++ case MOKO_GSMD_CONNECTION_NETREG_ROAMING: ++ g_print ("Network Registered\n"); ++ return FALSE; ++ default: ++ g_warning ("Unhandled register event type = %d\n", priv->registered); + } + + return TRUE; +@@ -754,9 +757,8 @@ + + /* Handle network registration a few seconds after powering up the + * antenna*/ +- priv->reg_request = TRUE; +- priv->registered = FALSE; +- priv->reg_timeout = g_timeout_add (GSM_REGISTER_TIMEOUT, ++ priv->registered = MOKO_GSMD_CONNECTION_NETREG_NONE; ++ priv->reg_timeout = g_timeout_add (GSM_REGISTER_TIMEOUT * 2, + (GSourceFunc)register_network_cb, + dialer); + |