Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r3171 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
2. r3172 - trunk/src/host/usbpath ([EMAIL PROTECTED])
3. r3173 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
4. r3174 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
5. r3175 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
6. r3176 - trunk/src/host/devirginator ([EMAIL PROTECTED])
7. r3177 - in trunk/src/target/OM-2007.2/libraries/libmokoui2: .
libmokoui ([EMAIL PROTECTED])
8. r3178 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
9. r3179 - trunk/src/target/kernel/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: laforge
Date: 2007-10-15 12:54:10 +0200 (Mon, 15 Oct 2007)
New Revision: 3171
Modified:
trunk/src/target/kernel/patches/gta01-vibrator.patch
trunk/src/target/kernel/patches/s3c2410-pwm.patch
Log:
S3c24xx timer4 doesn't have PWM support, so don't even try to use it for that.
Also, refuse to reconfigure the prescaler 1 (shared between timer 2,3,4), since
that would modify the kernel timer clock tick.
Modified: trunk/src/target/kernel/patches/gta01-vibrator.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-vibrator.patch 2007-10-15
09:54:48 UTC (rev 3170)
+++ trunk/src/target/kernel/patches/gta01-vibrator.patch 2007-10-15
10:54:10 UTC (rev 3171)
@@ -6,7 +6,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/drivers/leds/leds-gta01.c
-@@ -0,0 +1,187 @@
+@@ -0,0 +1,188 @@
+/*
+ * LED driver for the FIC GTA01 (Neo1973) GSM Phone Vibrator
+ *
@@ -100,8 +100,9 @@
+ struct gta01_vib_priv *vp = pdev_to_vpriv(pdev);
+
+ vp->pwm->timerid= PWM3;
-+ vp->pwm->prescaler = 0x0000;
-+ vp->pwm->divider = S3C2410_TCFG1_MUX3_DIV8;
++ /* use same prescaler as arch/arm/plat-s3c24xx/time.c */
++ vp->pwm->prescaler = (6 - 1) / 2;
++ vp->pwm->divider = S3C2410_TCFG1_MUX3_DIV16;
+ vp->pwm->counter = COUNTER;
+ vp->pwm->comparer = COUNTER;
+
Modified: trunk/src/target/kernel/patches/s3c2410-pwm.patch
===================================================================
--- trunk/src/target/kernel/patches/s3c2410-pwm.patch 2007-10-15 09:54:48 UTC
(rev 3170)
+++ trunk/src/target/kernel/patches/s3c2410-pwm.patch 2007-10-15 10:54:10 UTC
(rev 3171)
@@ -38,7 +38,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/arch/arm/mach-s3c2410/pwm.c
-@@ -0,0 +1,222 @@
+@@ -0,0 +1,234 @@
+/*
+ * arch/arm/mach-s3c2410/3c2410-pwm.c
+ *
@@ -118,7 +118,7 @@
+ tcfg0 = __raw_readl(S3C2410_TCFG0);
+
+ /* divider & scaler slection */
-+ switch(s3c2410_pwm->timerid) {
++ switch (s3c2410_pwm->timerid) {
+ case PWM0:
+ tcfg1 &= ~S3C2410_TCFG1_MUX0_MASK;
+ tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;
@@ -136,8 +136,7 @@
+ tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
+ break;
+ case PWM4:
-+ tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK;
-+ tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK;
++ /* timer four is not capable of doing PWM */
+ break;
+ default:
+ return -1;
@@ -145,11 +144,23 @@
+
+ /* divider & scaler values */
+ tcfg1 |= s3c2410_pwm->divider;
-+ tcfg0 |= s3c2410_pwm->prescaler;
-+
+ __raw_writel(tcfg1, S3C2410_TCFG1);
-+ __raw_writel(tcfg0, S3C2410_TCFG0);
+
++ switch (s3c2410_pwm->timerid) {
++ case PWM0:
++ case PWM1:
++ tcfg0 |= s3c2410_pwm->prescaler;
++ __raw_writel(tcfg0, S3C2410_TCFG0);
++ break;
++ default:
++ if ((tcfg0 | s3c2410_pwm->prescaler) != tcfg0) {
++ printk(KERN_WARNING "not changing prescaler of PWM %u,"
++ " since it's shared with timer4 (clock tick)\n",
++ s3c2410_pwm->timerid);
++ }
++ break;
++ }
++
+ /* timer count and compare buffer initial values */
+ tcnt = s3c2410_pwm->counter;
+ tcmp = s3c2410_pwm->comparer;
@@ -189,8 +200,9 @@
+ tcon &= ~S3C2410_TCON_T3MANUALUPD;
+ break;
+ case PWM4:
-+ tcon |= S3C2410_TCON_T4START;
-+ tcon &= ~S3C2410_TCON_T4MANUALUPD;
++ /* timer four is not capable of doing PWM */
++ default:
++ return -1;
+ }
+
+ __raw_writel(tcon, S3C2410_TCON);
@@ -228,9 +240,9 @@
+ tcon |= S3C2410_TCON_T3MANUALUPD;
+ break;
+ case PWM4:
-+ tcon &= ~0x00080000;
-+ tcon |= S3C2410_TCON_T4RELOAD;
-+ tcon |= S3C2410_TCON_T3MANUALUPD;
++ /* timer four is not capable of doing PWM */
++ default:
++ return -1;
+ }
+
+ __raw_writel(tcon, S3C2410_TCON);
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-10-15 14:13:46 +0200 (Mon, 15 Oct 2007)
New Revision: 3172
Modified:
trunk/src/host/usbpath/Makefile.am
Log:
Makefile.am: also install lsusbpath
Modified: trunk/src/host/usbpath/Makefile.am
===================================================================
--- trunk/src/host/usbpath/Makefile.am 2007-10-15 10:54:10 UTC (rev 3171)
+++ trunk/src/host/usbpath/Makefile.am 2007-10-15 12:13:46 UTC (rev 3172)
@@ -2,6 +2,7 @@
lib_LIBRARIES = libusbpath.a
bin_PROGRAMS = usbpath
+dist_bin_SCRIPTS = lsusbpath
include_HEADERS = usbpath.h
libusbpath_a_SOURCES = path2devnum.c devnum2path.c portinfo.c usbpath.h
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-15 14:49:23 +0200 (Mon, 15 Oct 2007)
New Revision: 3173
Modified:
trunk/src/target/kernel/patches/gta01-vibrator.patch
Log:
increase vibrator PWM frequency to 257kHz (66MHz / 2 / 2 / 64) to be outside
the human-audible range. It's a vibrator, not a 4kHz beeper!
Modified: trunk/src/target/kernel/patches/gta01-vibrator.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-vibrator.patch 2007-10-15
12:13:46 UTC (rev 3172)
+++ trunk/src/target/kernel/patches/gta01-vibrator.patch 2007-10-15
12:49:23 UTC (rev 3173)
@@ -31,7 +31,7 @@
+#include <asm/arch/pwm.h>
+#include <asm/arch/gta01.h>
+
-+#define COUNTER 256
++#define COUNTER 64
+
+struct gta01_vib_priv
+{
@@ -64,7 +64,7 @@
+ */
+ mutex_lock(&vp->mutex);
+ if (vp->has_pwm) {
-+ s3c2410_pwm_duty_cycle(value, vp->pwm);
++ s3c2410_pwm_duty_cycle(value/4, vp->pwm);
+ s3c2410_gpio_cfgpin(vp->gpio, S3C2410_GPB3_TOUT3);
+ } else {
+ if (value)
@@ -102,7 +102,7 @@
+ vp->pwm->timerid= PWM3;
+ /* use same prescaler as arch/arm/plat-s3c24xx/time.c */
+ vp->pwm->prescaler = (6 - 1) / 2;
-+ vp->pwm->divider = S3C2410_TCFG1_MUX3_DIV16;
++ vp->pwm->divider = S3C2410_TCFG1_MUX3_DIV2;
+ vp->pwm->counter = COUNTER;
+ vp->pwm->comparer = COUNTER;
+
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-15 14:50:15 +0200 (Mon, 15 Oct 2007)
New Revision: 3174
Modified:
trunk/src/target/kernel/patches/smedia-glamo.patch
Log:
the spi bus is number 2 (0+1 are s3c24xx internal spi0 and spi1)
Modified: trunk/src/target/kernel/patches/smedia-glamo.patch
===================================================================
--- trunk/src/target/kernel/patches/smedia-glamo.patch 2007-10-15 12:49:23 UTC
(rev 3173)
+++ trunk/src/target/kernel/patches/smedia-glamo.patch 2007-10-15 12:50:15 UTC
(rev 3174)
@@ -2682,7 +2682,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/drivers/video/glamo/glamo-spi-gpio.c
-@@ -0,0 +1,250 @@
+@@ -0,0 +1,251 @@
+/*
+ * Copyright (C) 2007 OpenMoko, Inc.
+ * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -2837,6 +2837,7 @@
+
+
+ //memset(sp, 0, sizeof(struct glamo_spigpio));
++ master->bus_num = 2; /* FIXME: use dynamic number */
+
+ sp->master = spi_master_get(master);
+ sp->glamo = sp->info->glamo;
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-10-15 15:33:58 +0200 (Mon, 15 Oct 2007)
New Revision: 3175
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
Log:
* src/moko-dialer-panel.c: (moko_dialer_panel_init),
(moko_dialer_panel_pressed):
Don't use -1 as a char value
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-10-15 12:50:15 UTC (rev 3174)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-10-15 13:33:58 UTC (rev 3175)
@@ -1,5 +1,12 @@
2007-10-15 Thomas Wood <[EMAIL PROTECTED]>
+ * src/moko-dialer-panel.c: (moko_dialer_panel_init),
+ (moko_dialer_panel_pressed):
+
+ Don't use -1 as a char value
+
+2007-10-15 Thomas Wood <[EMAIL PROTECTED]>
+
* configure.ac:
* src/Makefile.am:
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
2007-10-15 12:50:15 UTC (rev 3174)
+++
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer-panel.c
2007-10-15 13:33:58 UTC (rev 3175)
@@ -20,13 +20,16 @@
#include "moko-digit-button.h"
G_DEFINE_TYPE (MokoDialerPanel, moko_dialer_panel, GTK_TYPE_VBOX)
- enum
- {
- CLICKED_SIGNAL,
- HOLD_SIGNAL,
- LAST_SIGNAL
- };
+#define NOVALUE '\0'
+
+enum
+{
+ CLICKED_SIGNAL,
+ HOLD_SIGNAL,
+ LAST_SIGNAL
+};
+
//forward definition
static gboolean moko_dialer_panel_pressed (MokoDigitButton * button,
GdkEventButton * event,
@@ -102,9 +105,9 @@
};
gchar rightchar[4][3] = {
- {-1, -1, -1},
- {-1, -1, -1},
- {-1, -1, -1},
+ {NOVALUE, NOVALUE, NOVALUE},
+ {NOVALUE, NOVALUE, NOVALUE},
+ {NOVALUE, NOVALUE, NOVALUE},
{'+', 'p', 'w'}
};
@@ -165,7 +168,7 @@
if (event->type == GDK_BUTTON_PRESS)
{
HoldTimeoutData *timeout_data;
- gchar value = -1;
+ gchar value = NOVALUE;
/* Normal 'clicked' event */
value = moko_digit_button_get_left (button);
@@ -175,7 +178,7 @@
value = moko_digit_button_get_right (button);
/* this button doesn't have a "hold" value */
- if (value == -1)
+ if (value == NOVALUE)
return FALSE;
timeout_data = g_new0 (HoldTimeoutData, 1);
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-10-15 16:22:30 +0200 (Mon, 15 Oct 2007)
New Revision: 3176
Modified:
trunk/src/host/devirginator/envedit.pl
Log:
envedit.pl: added option "-s size" to set environment size in bytes (for large
page NAND)
envedit.pl: added option "-I dir" to add a path name element to @INC, to allow
envedit.pl to be run from other directories than "."
envedit.pl: if there's a path in $0, automatically add it to @INC
Modified: trunk/src/host/devirginator/envedit.pl
===================================================================
--- trunk/src/host/devirginator/envedit.pl 2007-10-15 13:33:58 UTC (rev
3175)
+++ trunk/src/host/devirginator/envedit.pl 2007-10-15 14:22:30 UTC (rev
3176)
@@ -22,26 +22,38 @@
#
-do 'crc32.pl';
-
-
$ENV_SIZE = 0x4000;
sub usage
{
print STDERR
-"usage: $0 [-i file] [-o file|-p] [-f env_file] [var=[value] ...]\n".
+"usage: $0 [-I dir] [-s size] [-i file] [-o file|-p] [-f env_file]\n".
+" [var=[value] ...]\n".
" -i file read environment from file (default: use empty environment)\n".
" -o file write environment to file (default: write to stdout)\n".
" -p print environment in human-readable form to stdout\n".
+" -s bytes environment size in bytes (default: 16384)\n".
" -f env_file read changes from env_file\n".
+" -I dir add directory to INC path (to find crc32.pl)\n".
" var= remove the specified variable\n".
-" var=value set the specified variable\n";
+" var=value set the specified variable\n".
+"The options -I and -s, if present, must precede all other options.\n";
exit(1);
}
+
+sub do_crc32
+{
+ if (!defined $have_crc) {
+ do 'crc32.pl';
+ $have_crc = 1;
+ }
+ return &crc32(@_);
+}
+
+
sub readenv
{
local ($file) = @_;
@@ -62,7 +74,7 @@
$env .= '\000' x ($ENV_SIZE-length $env);
}
($crc, $env) = unpack("Va*", $env);
- $want = &crc32($env);
+ $want = &do_crc32($env);
if ($crc != $want) {
print STDERR sprintf("CRC error: expected 0x%08x, got 0x%08x\n",
$want, $crc);
@@ -113,6 +125,10 @@
}
+if ($0 =~ m#/[^/]*$#) {
+ push(@INC, $`);
+}
+
while (@ARGV) {
if ($ARGV[0] eq "-i") {
&usage unless defined $ARGV[1];
@@ -131,6 +147,18 @@
$printenv = 1;
shift(@ARGV);
}
+ elsif ($ARGV[0] eq "-s") {
+ &usage if $have_crc;
+ &usage unless defined $ARGV[1];
+ shift(@ARGV);
+ $ENV_SIZE = eval shift(@ARGV);
+ }
+ elsif ($ARGV[0] eq "-I") {
+ &usage if $have_crc;
+ &usage unless defined $ARGV[1];
+ shift(@ARGV);
+ push(@INC, shift @ARGV);
+ }
elsif ($ARGV[0] eq "-f") {
&usage unless defined $ARGV[1];
shift(@ARGV);
@@ -182,7 +210,7 @@
exit(1);
}
$env .= "\000" x ($ENV_SIZE-4-length $env);
- $crc = &crc32($env);
+ $crc = &do_crc32($env);
$env = pack("V", $crc).$env;
if (defined $outfile) {
open(FILE, ">$outfile") || die "$outfile: $!";
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-10-15 17:03:50 +0200 (Mon, 15 Oct 2007)
New Revision: 3177
Modified:
trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c
Log:
* libmokoui/moko-finger-scroll.c:
(moko_finger_scroll_button_press_cb),
(moko_finger_scroll_motion_notify_cb),
(moko_finger_scroll_button_release_cb):
Don't alter event struct, fixes weird event flooding bug
Modified: trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog 2007-10-15
14:22:30 UTC (rev 3176)
+++ trunk/src/target/OM-2007.2/libraries/libmokoui2/ChangeLog 2007-10-15
15:03:50 UTC (rev 3177)
@@ -1,3 +1,11 @@
+2007-10-15 Chris Lord <[EMAIL PROTECTED]>
+
+ * libmokoui/moko-finger-scroll.c:
+ (moko_finger_scroll_button_press_cb),
+ (moko_finger_scroll_motion_notify_cb),
+ (moko_finger_scroll_button_release_cb):
+ Don't alter event struct, fixes weird event flooding bug
+
2007-10-12 Chris Lord <[EMAIL PROTECTED]>
* libmokoui/moko-finger-scroll.c:
Modified:
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c
===================================================================
---
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c
2007-10-15 14:22:30 UTC (rev 3176)
+++
trunk/src/target/OM-2007.2/libraries/libmokoui2/libmokoui/moko-finger-scroll.c
2007-10-15 15:03:50 UTC (rev 3177)
@@ -241,6 +241,7 @@
g_object_add_weak_pointer ((GObject *)priv->child,
&priv->child);
+ event = (GdkEventButton *)gdk_event_copy ((GdkEvent *)event);
event->x = x;
event->y = y;
priv->cx = x;
@@ -252,6 +253,7 @@
/* Send synthetic click (button press/release) event */
((GdkEventAny *)event)->window = g_object_ref (priv->child);
gdk_event_put ((GdkEvent *)event);
+ gdk_event_free ((GdkEvent *)event);
} else
priv->child = NULL;
@@ -472,10 +474,12 @@
/* Send motion notify to child */
priv->last_type = event->type;
priv->last_time = event->time;
+ event = (GdkEventMotion *)gdk_event_copy ((GdkEvent *)event);
event->x = priv->cx + (event->x - priv->ix);
event->y = priv->cy + (event->y - priv->iy);
event->window = g_object_ref (priv->child);
gdk_event_put ((GdkEvent *)event);
+ gdk_event_free ((GdkEvent *)event);
}
gdk_window_get_pointer (GTK_WIDGET (scroll)->window, NULL, NULL, 0);
@@ -508,14 +512,15 @@
GTK_BIN (priv->align)->child->window,
event->x, event->y, &x, &y);
- event->x = x;
- event->y = y;
-
if (!priv->child) {
priv->moved = FALSE;
return TRUE;
}
+ event = (GdkEventButton *)gdk_event_copy ((GdkEvent *)event);
+ event->x = x;
+ event->y = y;
+
/* Leave the widget if we've moved - This doesn't break selection,
* but stops buttons from being clicked.
*/
@@ -538,6 +543,7 @@
&priv->child);
priv->moved = FALSE;
+ gdk_event_free ((GdkEvent *)event);
return TRUE;
}
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-10-15 18:29:45 +0200 (Mon, 15 Oct 2007)
New Revision: 3178
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
Log:
Based on patch by: Roman Moravcik <[EMAIL PROTECTED]>
* src/moko-dialer.c: (on_keypad_dial_clicked):Show dialed history when
dialing empty number.
* src/moko-history.c: (on_filter_changed): Select first item in history
list after filter was changed.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-10-15 15:03:50 UTC (rev 3177)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-10-15 16:29:45 UTC (rev 3178)
@@ -1,5 +1,14 @@
2007-10-15 Thomas Wood <[EMAIL PROTECTED]>
+ Based on patch by: Roman Moravcik <[EMAIL PROTECTED]>
+
+ * src/moko-dialer.c: (on_keypad_dial_clicked):Show dialed history when
+ dialing empty number.
+ * src/moko-history.c: (on_filter_changed): Select first item in history
+ list after filter was changed.
+
+2007-10-15 Thomas Wood <[EMAIL PROTECTED]>
+
* src/moko-dialer-panel.c: (moko_dialer_panel_init),
(moko_dialer_panel_pressed):
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
2007-10-15 15:03:50 UTC (rev 3177)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
2007-10-15 16:29:45 UTC (rev 3178)
@@ -236,6 +236,11 @@
g_return_if_fail (MOKO_IS_DIALER (dialer));
priv = dialer->priv;
+ if (!number) {
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), 1);
+ moko_history_set_filter (MOKO_HISTORY (priv->history),
HISTORY_FILTER_DIALED);
+ return;
+ }
/* check current dialer state */
if (0 || priv->status != DIALER_STATUS_NORMAL)
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
2007-10-15 15:03:50 UTC (rev 3177)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
2007-10-15 16:29:45 UTC (rev 3178)
@@ -342,11 +342,26 @@
on_filter_changed (GtkWidget *combo, MokoHistory *history)
{
MokoHistoryPrivate *priv;
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ GtkTreePath *path;
g_return_if_fail (MOKO_IS_HISTORY (history));
priv = history->priv;
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (priv->filter_model));
+
+
+ treeview = GTK_TREE_VIEW (priv->treeview);
+ model = gtk_tree_view_get_model (treeview);
+
+ if (!gtk_tree_model_get_iter_first (model, &iter))
+ return;
+ path = gtk_tree_model_get_path (model, &iter);
+ gtk_tree_view_set_cursor (treeview, path, NULL, FALSE);
+ gtk_tree_path_free (path);
+
}
static gint
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-10-15 18:44:08 +0200 (Mon, 15 Oct 2007)
New Revision: 3179
Modified:
trunk/src/target/kernel/patches/gta01-backlight.patch
trunk/src/target/kernel/patches/gta01-vibrator.patch
trunk/src/target/kernel/patches/s3c2410-pwm.patch
Log:
s3c2410_pwm:
* change structure name into one without _t suffix (it's not a typedef, thank
god)
* don't allocate the pwm structure within s3c2410_pwm code, but rather embed it
into other structures
* rename s3c2410_pwm variables into just 'pwm'
gta01-vibrator:
* adopt s3c2410_pwm api changes
* set gpio pwm mode at startup, not at every update
gta01-backlight:
* adopt s3c2410_pwm api changes
Modified: trunk/src/target/kernel/patches/gta01-backlight.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-backlight.patch 2007-10-15
16:29:45 UTC (rev 3178)
+++ trunk/src/target/kernel/patches/gta01-backlight.patch 2007-10-15
16:44:08 UTC (rev 3179)
@@ -35,7 +35,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/drivers/video/backlight/gta01_bl.c
-@@ -0,0 +1,249 @@
+@@ -0,0 +1,253 @@
+/*
+ * Backlight Driver for FIC GTA01 (Neo1973) GSM Phone
+ *
@@ -88,7 +88,7 @@
+ int intensity;
+ struct mutex mutex;
+ struct clk *clk;
-+ struct s3c2410_pwm_t *pwm;
++ struct s3c2410_pwm pwm;
+};
+
+static struct gta01bl_data gta01bl;
@@ -129,7 +129,7 @@
+ s3c2410_gpio_setpin(GTA01_GPIO_BACKLIGHT, 1);
+ s3c2410_gpio_cfgpin(GTA01_GPIO_BACKLIGHT, S3C2410_GPIO_OUTPUT);
+ } else {
-+ s3c2410_pwm_duty_cycle(intensity & 0xffff, gta01bl.pwm);
++ s3c2410_pwm_duty_cycle(intensity & 0xffff, >a01bl.pwm);
+ s3c2410_gpio_cfgpin(GTA01_GPIO_BACKLIGHT, S3C2410_GPB0_TOUT0);
+ }
+#endif
@@ -139,18 +139,25 @@
+ return 0;
+}
+
-+static void gta01bl_init_hw(void)
++static int gta01bl_init_hw(void)
+{
-+ gta01bl.pwm->timerid = PWM0;
-+ gta01bl.pwm->prescaler = (4 - 1);
-+ gta01bl.pwm->divider = S3C2410_TCFG1_MUX0_DIV8;
-+ gta01bl.pwm->counter = (((gta01bl.pwm->pclk_rate) / 32) / GTA01BL_FREQ)
-1;
-+ gta01bl.pwm->comparer = gta01bl.pwm->counter;
++ int rc;
+
-+ s3c2410_pwm_enable(gta01bl.pwm);
-+ s3c2410_pwm_start(gta01bl.pwm);
++ gta01bl.pwm.timerid = PWM0;
++ gta01bl.pwm.prescaler = (4 - 1);
++ gta01bl.pwm.divider = S3C2410_TCFG1_MUX0_DIV8;
++ gta01bl.pwm.counter = (((gta01bl.pwm.pclk_rate) / 32) / GTA01BL_FREQ)
-1;
++ gta01bl.pwm.comparer = gta01bl.pwm.counter;
+
-+ gta01bl_prop.max_brightness = gta01bl.pwm->counter;
++ rc = s3c2410_pwm_enable(>a01bl.pwm);
++ if (rc)
++ return rc;
++
++ s3c2410_pwm_start(>a01bl.pwm);
++
++ gta01bl_prop.max_brightness = gta01bl.pwm.counter;
++
++ return 0;
+}
+
+#ifdef CONFIG_PM
@@ -210,16 +217,15 @@
+static int __init gta01bl_probe(struct platform_device *pdev)
+{
+ struct gta01bl_machinfo *machinfo = pdev->dev.platform_data;
++ int rc;
+
+#ifdef GTA01_BACKLIGHT_ONOFF_ONLY
+ s3c2410_gpio_cfgpin(GTA01_GPIO_BACKLIGHT, S3C2410_GPIO_OUTPUT);
+ gta01bl_prop.max_brightness = 1;
+#else
-+ /* use s3c_device_timer0 for PWM */
-+ if (!(gta01bl.pwm = s3c2410_pwm_alloc()))
-+ return -ENOMEM;
-+
-+ gta01bl_init_hw();
++ rc = gta01bl_init_hw();
++ if (rc < 0)
++ return rc;
+#endif
+ mutex_init(>a01bl.mutex);
+
@@ -245,9 +251,7 @@
+static int gta01bl_remove(struct platform_device *dev)
+{
+#ifndef GTA01_BACKLIGHT_ONOFF_ONLY
-+
-+ s3c2410_pwm_disable(gta01bl.pwm);
-+
++ s3c2410_pwm_disable(>a01bl.pwm);
+#endif
+ backlight_device_unregister(gta01_backlight_device);
+ mutex_destroy(>a01bl.mutex);
Modified: trunk/src/target/kernel/patches/gta01-vibrator.patch
===================================================================
--- trunk/src/target/kernel/patches/gta01-vibrator.patch 2007-10-15
16:29:45 UTC (rev 3178)
+++ trunk/src/target/kernel/patches/gta01-vibrator.patch 2007-10-15
16:44:08 UTC (rev 3179)
@@ -6,7 +6,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/drivers/leds/leds-gta01.c
-@@ -0,0 +1,188 @@
+@@ -0,0 +1,189 @@
+/*
+ * LED driver for the FIC GTA01 (Neo1973) GSM Phone Vibrator
+ *
@@ -39,7 +39,7 @@
+ unsigned int gpio;
+ struct mutex mutex;
+ unsigned int has_pwm;
-+ struct s3c2410_pwm_t *pwm;
++ struct s3c2410_pwm pwm;
+};
+
+static inline struct gta01_vib_priv *pdev_to_vpriv(struct platform_device
*dev)
@@ -64,8 +64,7 @@
+ */
+ mutex_lock(&vp->mutex);
+ if (vp->has_pwm) {
-+ s3c2410_pwm_duty_cycle(value/4, vp->pwm);
-+ s3c2410_gpio_cfgpin(vp->gpio, S3C2410_GPB3_TOUT3);
++ s3c2410_pwm_duty_cycle(value/4, &vp->pwm);
+ } else {
+ if (value)
+ s3c2410_gpio_setpin(vp->gpio, 1);
@@ -95,21 +94,24 @@
+}
+#endif
+
-+static void gta01vib_init_hw(struct platform_device *pdev)
++static int gta01vib_init_hw(struct gta01_vib_priv *vp)
+{
-+ struct gta01_vib_priv *vp = pdev_to_vpriv(pdev);
++ int rc;
+
-+ vp->pwm->timerid= PWM3;
++ vp->pwm.timerid= PWM3;
+ /* use same prescaler as arch/arm/plat-s3c24xx/time.c */
-+ vp->pwm->prescaler = (6 - 1) / 2;
-+ vp->pwm->divider = S3C2410_TCFG1_MUX3_DIV2;
-+ vp->pwm->counter = COUNTER;
-+ vp->pwm->comparer = COUNTER;
++ vp->pwm.prescaler = (6 - 1) / 2;
++ vp->pwm.divider = S3C2410_TCFG1_MUX3_DIV2;
++ vp->pwm.counter = COUNTER;
++ vp->pwm.comparer = COUNTER;
+
-+ s3c2410_pwm_enable(vp->pwm);
-+ s3c2410_pwm_start(vp->pwm);
++ rc = s3c2410_pwm_enable(&vp->pwm);
++ if (rc)
++ return rc;
+
-+ return;
++ s3c2410_pwm_start(&vp->pwm);
++
++ return 0;
+}
+
+static int __init gta01vib_probe(struct platform_device *pdev)
@@ -128,25 +130,24 @@
+ if (!vp)
+ return -ENOMEM;
+
-+ platform_set_drvdata(pdev, vp);
-+
+ vp->gpio = r->start;
+
+ /* TOUT3 */
+ if (vp->gpio == S3C2410_GPB3) {
-+ vp->has_pwm = 1;
++ int rc;
+
-+ vp->pwm = s3c2410_pwm_alloc();
-+ if (!vp->pwm) {
-+ dev_err(&pdev->dev, "PWM allocation failed\n");
++ rc = gta01vib_init_hw(vp);
++ if (rc) {
+ kfree(vp);
-+ return -ENOMEM;
++ return rc;
+ }
+
-+ gta01vib_init_hw(pdev);
++ s3c2410_gpio_cfgpin(vp->gpio, S3C2410_GPB3_TOUT3);
++ vp->has_pwm = 1;
+ }
+
+ mutex_init(&vp->mutex);
++ platform_set_drvdata(pdev, vp);
+
+ return led_classdev_register(&pdev->dev, >a01_vib_led);
+}
@@ -156,7 +157,7 @@
+ struct gta01_vib_priv *vp = pdev_to_vpriv(pdev);
+
+ if (vp->has_pwm)
-+ s3c2410_pwm_disable(vp->pwm);
++ s3c2410_pwm_disable(&vp->pwm);
+
+ led_classdev_unregister(>a01_vib_led);
+ platform_set_drvdata(pdev, NULL);
Modified: trunk/src/target/kernel/patches/s3c2410-pwm.patch
===================================================================
--- trunk/src/target/kernel/patches/s3c2410-pwm.patch 2007-10-15 16:29:45 UTC
(rev 3178)
+++ trunk/src/target/kernel/patches/s3c2410-pwm.patch 2007-10-15 16:44:08 UTC
(rev 3179)
@@ -38,7 +38,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/arch/arm/mach-s3c2410/pwm.c
-@@ -0,0 +1,234 @@
+@@ -0,0 +1,210 @@
+/*
+ * arch/arm/mach-s3c2410/3c2410-pwm.c
+ *
@@ -65,34 +65,8 @@
+#include <asm/arch/regs-timer.h>
+#include <asm/arch/pwm.h>
+
-+struct s3c2410_pwm_t *s3c2410_pwm_alloc(void)
++int s3c2410_pwm_disable(struct s3c2410_pwm *pwm)
+{
-+ struct s3c2410_pwm_t *s3c2410_pwm;
-+
-+ s3c2410_pwm = kzalloc(sizeof(*s3c2410_pwm), GFP_KERNEL);
-+ if (!s3c2410_pwm)
-+ /*return -ENOMEM;*/
-+ return NULL;
-+
-+ s3c2410_pwm->pclk = clk_get(NULL, "timers");
-+
-+ if (IS_ERR(s3c2410_pwm->pclk)) {
-+ /*return PTR_ERR(clk);*/
-+ kfree(s3c2410_pwm);
-+ return NULL;
-+ }
-+
-+ clk_enable(s3c2410_pwm->pclk);
-+
-+ s3c2410_pwm->pclk_rate = clk_get_rate(s3c2410_pwm->pclk);
-+
-+ return s3c2410_pwm;
-+}
-+
-+EXPORT_SYMBOL_GPL(s3c2410_pwm_alloc);
-+
-+int s3c2410_pwm_disable(struct s3c2410_pwm_t *s3c2410_pwm)
-+{
+ unsigned long tcon;
+
+ /* stop timer */
@@ -100,25 +74,31 @@
+ tcon &= 0xffffff00;
+ __raw_writel(tcon, S3C2410_TCON);
+
-+ clk_disable(s3c2410_pwm->pclk);
-+ clk_put(s3c2410_pwm->pclk);
++ clk_disable(pwm->pclk);
++ clk_put(pwm->pclk);
+
-+ kfree(s3c2410_pwm);
++ kfree(pwm);
+ return 0;
+}
-+
+EXPORT_SYMBOL_GPL(s3c2410_pwm_disable);
+
-+int s3c2410_pwm_enable(struct s3c2410_pwm_t *s3c2410_pwm)
++int s3c2410_pwm_enable(struct s3c2410_pwm *pwm)
+{
+ unsigned long tcfg0, tcfg1, tcnt, tcmp;
+
++ pwm->pclk = clk_get(NULL, "timers");
++ if (IS_ERR(pwm->pclk))
++ return PTR_ERR(pwm->pclk);
++
++ clk_enable(pwm->pclk);
++ pwm->pclk_rate = clk_get_rate(pwm->pclk);
++
+ /* control registers bits */
+ tcfg1 = __raw_readl(S3C2410_TCFG1);
+ tcfg0 = __raw_readl(S3C2410_TCFG0);
+
+ /* divider & scaler slection */
-+ switch (s3c2410_pwm->timerid) {
++ switch (pwm->timerid) {
+ case PWM0:
+ tcfg1 &= ~S3C2410_TCFG1_MUX0_MASK;
+ tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;
@@ -139,50 +119,51 @@
+ /* timer four is not capable of doing PWM */
+ break;
+ default:
++ clk_disable(pwm->pclk);
++ clk_put(pwm->pclk);
+ return -1;
+ }
+
+ /* divider & scaler values */
-+ tcfg1 |= s3c2410_pwm->divider;
++ tcfg1 |= pwm->divider;
+ __raw_writel(tcfg1, S3C2410_TCFG1);
+
-+ switch (s3c2410_pwm->timerid) {
++ switch (pwm->timerid) {
+ case PWM0:
+ case PWM1:
-+ tcfg0 |= s3c2410_pwm->prescaler;
++ tcfg0 |= pwm->prescaler;
+ __raw_writel(tcfg0, S3C2410_TCFG0);
+ break;
+ default:
-+ if ((tcfg0 | s3c2410_pwm->prescaler) != tcfg0) {
++ if ((tcfg0 | pwm->prescaler) != tcfg0) {
+ printk(KERN_WARNING "not changing prescaler of PWM %u,"
+ " since it's shared with timer4 (clock tick)\n",
-+ s3c2410_pwm->timerid);
++ pwm->timerid);
+ }
+ break;
+ }
+
+ /* timer count and compare buffer initial values */
-+ tcnt = s3c2410_pwm->counter;
-+ tcmp = s3c2410_pwm->comparer;
++ tcnt = pwm->counter;
++ tcmp = pwm->comparer;
+
-+ __raw_writel(tcnt, S3C2410_TCNTB(s3c2410_pwm->timerid));
-+ __raw_writel(tcmp, S3C2410_TCMPB(s3c2410_pwm->timerid));
++ __raw_writel(tcnt, S3C2410_TCNTB(pwm->timerid));
++ __raw_writel(tcmp, S3C2410_TCMPB(pwm->timerid));
+
+ /* ensure timer is stopped */
-+ s3c2410_pwm_stop(s3c2410_pwm);
++ s3c2410_pwm_stop(pwm);
+
+ return 0;
+}
-+
+EXPORT_SYMBOL_GPL(s3c2410_pwm_enable);
+
-+int s3c2410_pwm_start(struct s3c2410_pwm_t *s3c2410_pwm)
++int s3c2410_pwm_start(struct s3c2410_pwm *pwm)
+{
+ unsigned long tcon;
+
+ tcon = __raw_readl(S3C2410_TCON);
+
-+ switch (s3c2410_pwm->timerid) {
++ switch (pwm->timerid) {
+ case PWM0:
+ tcon |= S3C2410_TCON_T0START;
+ tcon &= ~S3C2410_TCON_T0MANUALUPD;
@@ -202,23 +183,22 @@
+ case PWM4:
+ /* timer four is not capable of doing PWM */
+ default:
-+ return -1;
++ return -ENODEV;
+ }
+
+ __raw_writel(tcon, S3C2410_TCON);
+
+ return 0;
+}
-+
+EXPORT_SYMBOL_GPL(s3c2410_pwm_start);
+
-+int s3c2410_pwm_stop(struct s3c2410_pwm_t *s3c2410_pwm)
++int s3c2410_pwm_stop(struct s3c2410_pwm *pwm)
+{
+ unsigned long tcon;
+
+ tcon = __raw_readl(S3C2410_TCON);
+
-+ switch (s3c2410_pwm->timerid) {
++ switch (pwm->timerid) {
+ case PWM0:
+ tcon &= ~0x00000000;
+ tcon |= S3C2410_TCON_T0RELOAD;
@@ -242,23 +222,21 @@
+ case PWM4:
+ /* timer four is not capable of doing PWM */
+ default:
-+ return -1;
++ return -ENODEV;
+ }
+
+ __raw_writel(tcon, S3C2410_TCON);
+
+ return 0;
+}
-+
+EXPORT_SYMBOL_GPL(s3c2410_pwm_stop);
+
-+int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm_t *s3c2410_pwm)
++int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm *pwm)
+{
-+ __raw_writel(reg_value, S3C2410_TCMPB(s3c2410_pwm->timerid));
++ __raw_writel(reg_value, S3C2410_TCMPB(pwm->timerid));
+
+ return 0;
+}
-+
+EXPORT_SYMBOL_GPL(s3c2410_pwm_duty_cycle);
+
+int s3c2410_pwm_dumpregs(void)
@@ -270,14 +248,12 @@
+
+ return 0;
+}
-+
+EXPORT_SYMBOL_GPL(s3c2410_pwm_dumpregs);
-+
Index: linux-2.6.22.5-moko/include/asm-arm/arch-s3c2410/pwm.h
===================================================================
--- /dev/null
+++ linux-2.6.22.5-moko/include/asm-arm/arch-s3c2410/pwm.h
-@@ -0,0 +1,40 @@
+@@ -0,0 +1,39 @@
+#ifndef __S3C2410_PWM_H
+#define __S3C2410_PWM_H
+
@@ -299,7 +275,7 @@
+ PWM4
+};
+
-+struct s3c2410_pwm_t {
++struct s3c2410_pwm {
+ enum pwm_timer timerid;
+ struct clk *pclk;
+ unsigned long pclk_rate;
@@ -309,12 +285,11 @@
+ unsigned long comparer;
+};
+
-+struct s3c2410_pwm_t *s3c2410_pwm_alloc(void);
-+int s3c2410_pwm_enable(struct s3c2410_pwm_t *s3c2410_pwm);
-+int s3c2410_pwm_disable(struct s3c2410_pwm_t *s3c2410_pwm);
-+int s3c2410_pwm_start(struct s3c2410_pwm_t *s3c2410_pwm);
-+int s3c2410_pwm_stop(struct s3c2410_pwm_t *s3c2410_pwm);
-+int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm_t *s3c2410_pwm);
++int s3c2410_pwm_enable(struct s3c2410_pwm *s3c2410_pwm);
++int s3c2410_pwm_disable(struct s3c2410_pwm *s3c2410_pwm);
++int s3c2410_pwm_start(struct s3c2410_pwm *s3c2410_pwm);
++int s3c2410_pwm_stop(struct s3c2410_pwm *s3c2410_pwm);
++int s3c2410_pwm_duty_cycle(int reg_value, struct s3c2410_pwm *s3c2410_pwm);
+int s3c2410_pwm_dumpregs(void);
+
+#endif /* __S3C2410_PWM_H */
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog