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. r3707 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
2. r3708 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
3. r3709 - in
trunk/src/target/OM-2007.2/applications/openmoko-messages2: . src
([EMAIL PROTECTED])
4. r3710 - in
trunk/src/target/OM-2007.2/applications/openmoko-messages2: . src
([EMAIL PROTECTED])
5. r3711 - branches/src/target/kernel/2.6.24.x/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: laforge
Date: 2007-12-20 16:05:27 +0100 (Thu, 20 Dec 2007)
New Revision: 3707
Modified:
branches/src/target/kernel/2.6.24.x/patches/lis302dl.patch
Log:
move LIS302DL driver to input/misc directory
Modified: branches/src/target/kernel/2.6.24.x/patches/lis302dl.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/lis302dl.patch 2007-12-20
14:49:59 UTC (rev 3706)
+++ branches/src/target/kernel/2.6.24.x/patches/lis302dl.patch 2007-12-20
15:05:27 UTC (rev 3707)
@@ -80,10 +80,10 @@
/* Only GTA02v1 has a SD_DETECT GPIO. Since the slot is not
* hot-pluggable, this is not required anyway */
-Index: linux-2.6/drivers/spi/lis302dl.c
+Index: linux-2.6/drivers/input/misc/lis302dl.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/spi/lis302dl.c
++++ linux-2.6/drivers/input/misc/lis302dl.c
@@ -0,0 +1,633 @@
+/* Linux kernel driver for the ST LIS302D 3-axis accelerometer
+ *
@@ -718,38 +718,33 @@
+
+module_init(lis302dl_init);
+module_exit(lis302dl_exit);
-Index: linux-2.6/drivers/spi/Kconfig
+Index: linux-2.6/drivers/input/misc/Kconfig
===================================================================
---- linux-2.6.orig/drivers/spi/Kconfig
-+++ linux-2.6/drivers/spi/Kconfig
-@@ -242,6 +242,15 @@
- The control interface is required for display operation, as it
- controls power management, display timing and gamma calibration.
+--- linux-2.6.orig/drivers/input/misc/Kconfig
++++ linux-2.6/drivers/input/misc/Kconfig
+@@ -183,4 +183,13 @@
+ Say Y here if you want to support the built-in real time clock
+ of the HP SDC controller.
-+config SPI_LIS302DL
++config INPUT_LIS302DL
+ tristate "STmicro LIS302DL 3-axis accelerometer"
-+ depends on SPI_MASTER && MACH_NEO1973_GTA02
++ depends on SPI_MASTER
+ help
+ SPI driver for the STmicro LIS302DL 3-axis accelerometer.
+
+ The userspece interface is a 3-axis (X/Y/Z) relative movement
+ Linux input device, reporting REL_[XYZ] events.
+
- #
- # Add new SPI protocol masters in alphabetical order above this line
- #
-Index: linux-2.6/drivers/spi/Makefile
+ endif
+Index: linux-2.6/drivers/input/misc/Makefile
===================================================================
---- linux-2.6.orig/drivers/spi/Makefile
-+++ linux-2.6/drivers/spi/Makefile
-@@ -34,6 +34,7 @@
- obj-$(CONFIG_SPI_SPIDEV) += spidev.o
- obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
- obj-$(CONFIG_SPI_JBT6K74) += jbt6k74.o
-+obj-$(CONFIG_SPI_LIS302DL) += lis302dl.o
- # ... add above this line ...
-
- # SPI slave controller drivers (upstream link)
+--- linux-2.6.orig/drivers/input/misc/Makefile
++++ linux-2.6/drivers/input/misc/Makefile
+@@ -18,3 +18,4 @@
+ obj-$(CONFIG_INPUT_YEALINK) += yealink.o
+ obj-$(CONFIG_HP_SDC_RTC) += hp_sdc_rtc.o
+ obj-$(CONFIG_INPUT_UINPUT) += uinput.o
++obj-$(CONFIG_INPUT_LIS302DL) += lis302dl.o
Index: linux-2.6/include/linux/lis302dl.h
===================================================================
--- /dev/null
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-12-20 16:05:52 +0100 (Thu, 20 Dec 2007)
New Revision: 3708
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta01-jbt6k74.patch
Log:
move jbt6k74 driver to drivers/video/display/ directory
Modified: branches/src/target/kernel/2.6.24.x/patches/gta01-jbt6k74.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta01-jbt6k74.patch
2007-12-20 15:05:27 UTC (rev 3707)
+++ branches/src/target/kernel/2.6.24.x/patches/gta01-jbt6k74.patch
2007-12-20 15:05:52 UTC (rev 3708)
@@ -6,15 +6,15 @@
Signed-off-by: Harald Welte <[EMAIL PROTECTED]>
-Index: linux-2.6/drivers/spi/Kconfig
+Index: linux-2.6/drivers/video/display/Kconfig
===================================================================
---- linux-2.6.orig/drivers/spi/Kconfig
-+++ linux-2.6/drivers/spi/Kconfig
-@@ -231,6 +231,17 @@
- sysfs interface, with each line presented as a kind of GPIO
- exposing both switch control and diagnostic feedback.
+--- linux-2.6.orig/drivers/video/display/Kconfig
++++ linux-2.6/drivers/video/display/Kconfig
+@@ -21,4 +21,15 @@
+ comment "Display hardware drivers"
+ depends on DISPLAY_SUPPORT
-+config SPI_JBT6K74
++config DISPLAY_JBT6K74
+ tristate "TPO JBT6K74-AS TFT display ASIC control interface"
+ depends on SPI_MASTER && SYSFS
+ help
@@ -25,25 +25,21 @@
+ The control interface is required for display operation, as it
+ controls power management, display timing and gamma calibration.
+
- #
- # Add new SPI protocol masters in alphabetical order above this line
- #
-Index: linux-2.6/drivers/spi/Makefile
+ endmenu
+Index: linux-2.6/drivers/video/display/Makefile
===================================================================
---- linux-2.6.orig/drivers/spi/Makefile
-+++ linux-2.6/drivers/spi/Makefile
-@@ -33,6 +33,7 @@
- obj-$(CONFIG_SPI_AT25) += at25.o
- obj-$(CONFIG_SPI_SPIDEV) += spidev.o
- obj-$(CONFIG_SPI_TLE62X0) += tle62x0.o
-+obj-$(CONFIG_SPI_JBT6K74) += jbt6k74.o
- # ... add above this line ...
+--- linux-2.6.orig/drivers/video/display/Makefile
++++ linux-2.6/drivers/video/display/Makefile
+@@ -3,4 +3,5 @@
+ display-objs := display-sysfs.o
- # SPI slave controller drivers (upstream link)
-Index: linux-2.6/drivers/spi/jbt6k74.c
+ obj-$(CONFIG_DISPLAY_SUPPORT) += display.o
++obj-$(CONFIG_DISPLAY_JBT6K74) += jbt6k74.o
+
+Index: linux-2.6/drivers/video/display/jbt6k74.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/spi/jbt6k74.c
++++ linux-2.6/drivers/video/display/jbt6k74.c
@@ -0,0 +1,673 @@
+/* Linux kernel driver for the tpo JBT6K74-AS LCM ASIC
+ *
@@ -726,7 +722,7 @@
config MACH_QT2410
bool "QT2410"
select CPU_S3C2410
-+ select SPI_JBT6K74
++ select DISPLAY_JBT6K74
help
Say Y here if you are using the Armzone QT2410
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-12-20 16:53:50 +0100 (Thu, 20 Dec 2007)
New Revision: 3709
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
Log:
* src/sms-notes.c: (note_changed_cb), (page_shown),
(sms_notes_data_func), (global_note_added_cb),
(notes_visible_func):
Only add messages once to the global note store, use Sent category to
decide whether to index on author/recipient (fixes incorrect unknown
messages count, bug #1144, #1142), fix avatar display, improve
sent/received filter.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
2007-12-20 15:05:52 UTC (rev 3708)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
2007-12-20 15:53:50 UTC (rev 3709)
@@ -1,5 +1,15 @@
2007-12-20 Chris Lord <[EMAIL PROTECTED]>
+ * src/sms-notes.c: (note_changed_cb), (page_shown),
+ (sms_notes_data_func), (global_note_added_cb),
+ (notes_visible_func):
+ Only add messages once to the global note store, use Sent category to
+ decide whether to index on author/recipient (fixes incorrect unknown
+ messages count, bug #1144, #1142), fix avatar display, improve
+ sent/received filter.
+
+2007-12-20 Chris Lord <[EMAIL PROTECTED]>
+
* src/sms-notes.c: (note_changed_cb), (page_shown):
Fix avatars not appearing when viewing messages from unknown contacts
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
2007-12-20 15:05:52 UTC (rev 3708)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
2007-12-20 15:53:50 UTC (rev 3709)
@@ -70,6 +70,8 @@
if (!e_book_get_contact (data->ebook, uid, &contact, &error)) {
/* TODO: Unknown contact, probably */
} else {
+ if (data->recipient_icon)
+ g_object_unref (data->recipient_icon);
data->recipient_icon =
sms_contact_load_photo (contact);
g_object_unref (contact);
@@ -80,9 +82,6 @@
note_changed_cb_end:
/* Remove handlers */
if (data->recipient_number) {
- if ((!data->recipient_icon) && (data->no_photo))
- data->recipient_icon =
- g_object_ref (data->no_photo);
g_signal_handlers_disconnect_by_func (
store_view, note_changed_cb, data);
}
@@ -159,17 +158,18 @@
g_signal_connect (vadjust, "value-changed",
G_CALLBACK (scroll_changed_cb), data);
+ /* Assign the recipient photo to the generic avatar icon, in case we
+ * can't find it later.
+ */
+ if (data->no_photo)
+ data->recipient_icon = g_object_ref (data->no_photo);
+
if (!(contact = sms_get_selected_contact (data))) {
GList *u, *components = NULL;
/* Assume the 'unknown' contact was selected */
if (data->no_photo) {
data->author_icon = g_object_ref (data->no_photo);
-
- /* Without the author UID, we won't be able to
- * identify the recipient - so set their photo here
- */
- data->recipient_icon = g_object_ref (data->no_photo);
}
/* Manually feed the notes in - this is a bit naughty as if
@@ -300,7 +300,7 @@
GtkTreeIter *iter,
SmsData *data)
{
- gchar *author, *recipient, *body;
+ gchar *author, *recipient, *body, **categories;
JanaTime *created, *modified;
gboolean outgoing;
@@ -310,13 +310,21 @@
JANA_GTK_NOTE_STORE_COL_BODY, &body,
JANA_GTK_NOTE_STORE_COL_CREATED, &created,
JANA_GTK_NOTE_STORE_COL_MODIFIED, &modified,
+ JANA_GTK_NOTE_STORE_COL_CATEGORIES, &categories,
-1);
- if (recipient && data->recipient_number &&
- (strcmp (recipient, data->recipient_number) == 0))
- outgoing = TRUE;
- else
- outgoing = FALSE;
+ outgoing = FALSE;
+ if (categories) {
+ gint i;
+ for (i = 0; categories[i]; i++) {
+ if ((strcmp (categories[i], "Sent") == 0) ||
+ (strcmp (categories[i], "Sending") == 0)) {
+ outgoing = TRUE;
+ break;
+ }
+ }
+ g_strfreev (categories);
+ }
g_object_set (cell,
"author", author,
@@ -325,9 +333,9 @@
"created", created,
"modified", modified,
"justify", outgoing ?
- GTK_JUSTIFY_RIGHT : GTK_JUSTIFY_LEFT,
+ GTK_JUSTIFY_LEFT : GTK_JUSTIFY_RIGHT,
"icon", outgoing ?
- data->author_icon : data->recipient_icon,
+ data->recipient_icon : data->author_icon,
NULL);
g_free (author);
@@ -344,38 +352,43 @@
for (; components; components = components->next) {
SmsNoteCountData *ncdata;
JanaNote *note;
- gint i;
+ gchar *uid;
+ gchar *key;
if (!JANA_IS_NOTE (components->data)) continue;
note = JANA_NOTE (components->data);
- for (i = 0; i < 2; i++) {
- gchar *uid;
- gchar *key = i ? jana_note_get_author (note) :
- jana_note_get_recipient (note);
- if (!key) continue;
- ncdata = g_hash_table_lookup (data->note_count, key);
-
- if (!ncdata) {
- ncdata = g_slice_new0 (SmsNoteCountData);
- g_hash_table_insert (
- data->note_count, key, ncdata);
- } else {
- g_free (key);
- }
-
- uid = jana_component_get_uid (
- JANA_COMPONENT (note));
- if (jana_utils_component_has_category (
- JANA_COMPONENT (note), "Read")) {
- ncdata->read = g_list_prepend (
- ncdata->read, uid);
- } else {
- ncdata->unread = g_list_prepend (
- ncdata->unread, uid);
- }
+ if (jana_utils_component_has_category (
+ (JanaComponent *)note, "Sent") ||
+ jana_utils_component_has_category (
+ (JanaComponent *)note, "Sending"))
+ key = jana_note_get_recipient (note);
+ else
+ key = jana_note_get_author (note);
+
+ if (!key) continue;
+
+ ncdata = g_hash_table_lookup (data->note_count, key);
+
+ if (!ncdata) {
+ ncdata = g_slice_new0 (SmsNoteCountData);
+ g_hash_table_insert (
+ data->note_count, key, ncdata);
+ } else {
+ g_free (key);
}
+
+ uid = jana_component_get_uid (
+ JANA_COMPONENT (note));
+ if (jana_utils_component_has_category (
+ JANA_COMPONENT (note), "Read")) {
+ ncdata->read = g_list_prepend (
+ ncdata->read, uid);
+ } else {
+ ncdata->unread = g_list_prepend (
+ ncdata->unread, uid);
+ }
}
if (!data->note_count_idle) data->note_count_idle =
@@ -607,8 +620,9 @@
return result;
} else {
- gchar *author_uid;
+ gchar **categories;
gboolean result;
+ gint i;
/* Filter on selected category */
gint type = gtk_combo_box_get_active (
@@ -618,16 +632,17 @@
if ((type <= ALL_NOTES) || (!data->author_uid)) return TRUE;
gtk_tree_model_get (model, iter,
- JANA_GTK_NOTE_STORE_COL_UID, &author_uid, -1);
- if (!author_uid) return FALSE;
+ JANA_GTK_NOTE_STORE_COL_CATEGORIES, &categories, -1);
+ result = (type == SENT_NOTES) ? FALSE : TRUE;
+ for (i = 0; categories && categories[i]; i++) {
+ if ((strcmp (categories[i], "Sent") == 0) ||
+ (strcmp (categories[i], "Sending") == 0)) {
+ result = !result;
+ break;
+ }
+ }
+ if (categories) g_strfreev (categories);
- if (strcmp (author_uid, data->author_uid) == 0)
- result = (type == SENT_NOTES) ? TRUE : FALSE;
- else
- result = (type == SENT_NOTES) ? FALSE : TRUE;
-
- g_free (author_uid);
-
return result;
}
}
--- End Message ---
--- Begin Message ---
Author: chris
Date: 2007-12-20 17:28:19 +0100 (Thu, 20 Dec 2007)
New Revision: 3710
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
Log:
* src/sms-notes.c: (sms_notes_data_func):
Display contact names instead of phone numbers (fixes bug #1143)
Modified: trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
2007-12-20 15:53:50 UTC (rev 3709)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/ChangeLog
2007-12-20 16:28:19 UTC (rev 3710)
@@ -1,5 +1,10 @@
2007-12-20 Chris Lord <[EMAIL PROTECTED]>
+ * src/sms-notes.c: (sms_notes_data_func):
+ Display contact names instead of phone numbers (fixes bug #1143)
+
+2007-12-20 Chris Lord <[EMAIL PROTECTED]>
+
* src/sms-notes.c: (note_changed_cb), (page_shown),
(sms_notes_data_func), (global_note_added_cb),
(notes_visible_func):
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
2007-12-20 15:53:50 UTC (rev 3709)
+++ trunk/src/target/OM-2007.2/applications/openmoko-messages2/src/sms-notes.c
2007-12-20 16:28:19 UTC (rev 3710)
@@ -22,6 +22,7 @@
#endif
#include "sms-notes.h"
+#include "sms-contacts.h"
#include "sms-utils.h"
#include <libjana/jana.h>
#include <libjana-ecal/jana-ecal.h>
@@ -303,6 +304,7 @@
gchar *author, *recipient, *body, **categories;
JanaTime *created, *modified;
gboolean outgoing;
+ gint i;
gtk_tree_model_get (model, iter,
JANA_GTK_NOTE_STORE_COL_AUTHOR, &author,
@@ -315,7 +317,6 @@
outgoing = FALSE;
if (categories) {
- gint i;
for (i = 0; categories[i]; i++) {
if ((strcmp (categories[i], "Sent") == 0) ||
(strcmp (categories[i], "Sending") == 0)) {
@@ -326,6 +327,30 @@
g_strfreev (categories);
}
+ /* Replace numbers with contact names */
+ for (i = 0; i < 2; i++) {
+ const gchar *uid;
+ GtkTreeIter *iter;
+ gchar *number = i ? author : recipient;
+ gchar *name;
+
+ if (!number) continue;
+
+ uid = g_hash_table_lookup (data->numbers, number);
+ if (!uid) continue;
+
+ iter = g_hash_table_lookup (data->contacts, uid);
+ if (!iter) continue;
+
+ gtk_tree_model_get (data->contacts_store, iter,
+ COL_NAME, &name, -1);
+ if (name) {
+ g_free (number);
+ if (i) author = name;
+ else recipient = name;
+ }
+ }
+
g_object_set (cell,
"author", author,
"recipient", recipient,
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-12-20 18:24:47 +0100 (Thu, 20 Dec 2007)
New Revision: 3711
Modified:
branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
branches/src/target/kernel/2.6.24.x/patches/smedia-glamo.patch
Log:
smedia-glamo:
* move from drivers/video to drivers/mfd/
* cosmetic updates found by checkpatch.pl
* move 'GTA02 IRQ storm' workaround from glamo-core.c to mach-gta02.c
* add some more GPIO related #defines
Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
2007-12-20 16:28:19 UTC (rev 3710)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
2007-12-20 17:24:47 UTC (rev 3711)
@@ -2,7 +2,7 @@
===================================================================
--- /dev/null
+++ linux-2.6/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -0,0 +1,667 @@
+@@ -0,0 +1,679 @@
+/*
+ * linux/arch/arm/mach-s3c2440/mach-gta02.c
+ *
@@ -583,6 +583,18 @@
+ gta02_glamo_resources[2].end = GTA02_GPIO_3D_RESET;
+ break;
+ }
++
++ switch (system_rev) {
++ case GTA02v1_SYSTEM_REV:
++ case GTA02v2_SYSTEM_REV:
++ case GTA02v3_SYSTEM_REV:
++ case GTA02v4_SYSTEM_REV:
++ /* The hardware is missing a pull-up resistor and thus can't
++ * support the Smedia Glamo IRQ */
++ gta02_glamo_resources[1].start = 0;
++ gta02_glamo_resources[1].end = 0;
++ break;
++ }
+}
+
+static void __init gta02_map_io(void)
Modified: branches/src/target/kernel/2.6.24.x/patches/smedia-glamo.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/smedia-glamo.patch
2007-12-20 16:28:19 UTC (rev 3710)
+++ branches/src/target/kernel/2.6.24.x/patches/smedia-glamo.patch
2007-12-20 17:24:47 UTC (rev 3711)
@@ -1,78 +1,41 @@
-Index: linux-2.6/drivers/video/Kconfig
+This is a Linux kernel driver for the Smedia Glamo336x / Glamo337x
+multi-function peripheral device.
+
+Signedo-off-by: Harald Welte <[EMAIL PROTECTED]>
+
+Index: linux-2.6/drivers/mfd/Kconfig
===================================================================
---- linux-2.6.orig/drivers/video/Kconfig
-+++ linux-2.6/drivers/video/Kconfig
-@@ -1880,6 +1880,38 @@
- framebuffer. ML300 carries a 640*480 LCD display on the board,
- ML403 uses a standard DB15 VGA connector.
+--- linux-2.6.orig/drivers/mfd/Kconfig
++++ linux-2.6/drivers/mfd/Kconfig
+@@ -15,6 +15,8 @@
+ interface. The device may be connected by PCI or local bus with
+ varying functions enabled.
-+config GLAMO
-+ bool
++source "drivers/mfd/glamo/Kconfig"
+
-+config FB_GLAMO
-+ tristate "Smedia Glamo 336x/337x framebuffer support"
-+ depends on FB
-+ select GLAMO
-+ help
-+ Frame buffer driver for the LCD controller in the Smedia Glamo
-+ 336x/337x.
-+
-+ This driver is also available as a module ( = code which can be
-+ inserted and removed from the running kernel whenever you want). The
-+ module will be called glamofb. If you want to compile it as a module,
-+ say M here and read <file:Documentation/modules.txt>.
-+
-+ If unsure, say N.
-+
-+config GLAMO_SPI_GPIO
-+ bool "Glamo GPIO SPI bitbang support"
-+ depends on GLAMO
-+ help
-+ Enable a bitbanging SPI adapter driver for the Smedia Glamo.
-+
-+config FB_GLAMO_SPI
-+ bool "Glamo LCM control channel SPI support"
-+ depends on FB_GLAMO
-+ help
-+ Enable a bitbanging SPI adapter driver for the Smedia Glamo LCM
-+ control channel. This SPI interface is frequently used to
-+ interconnect the LCM control interface.
-+
- config FB_VIRTUAL
- tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)"
- depends on FB
-Index: linux-2.6/drivers/video/Makefile
-===================================================================
---- linux-2.6.orig/drivers/video/Makefile
-+++ linux-2.6/drivers/video/Makefile
-@@ -113,6 +113,7 @@
- obj-$(CONFIG_FB_SM501) += sm501fb.o
- obj-$(CONFIG_FB_XILINX) += xilinxfb.o
- obj-$(CONFIG_FB_OMAP) += omap/
-+obj-$(CONFIG_GLAMO) += glamo/
+ endmenu
- # Platform or fallback drivers go here
- obj-$(CONFIG_FB_UVESA) += uvesafb.o
-Index: linux-2.6/drivers/video/glamo/Makefile
+ menu "Multimedia Capabilities Port drivers"
+Index: linux-2.6/drivers/mfd/glamo/Makefile
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/Makefile
++++ linux-2.6/drivers/mfd/glamo/Makefile
@@ -0,0 +1,11 @@
+#
+# Makefile for the Smedia Glamo framebuffer driver
+#
+
-+obj-$(CONFIG_GLAMO) += glamo-core.o glamo-gpio.o
-+obj-$(CONFIG_GLAMO_SPI) += glamo-spi.o
-+obj-$(CONFIG_GLAMO_SPI_GPIO) += glamo-spi-gpio.o
++obj-$(CONFIG_MFD_GLAMO) += glamo-core.o glamo-gpio.o
++obj-$(CONFIG_MFD_GLAMO_SPI) += glamo-spi.o
++obj-$(CONFIG_MFD_GLAMO_SPI_GPIO) += glamo-spi-gpio.o
+
-+obj-$(CONFIG_FB_GLAMO) += glamo-fb.o
-+obj-$(CONFIG_FB_GLAMO_SPI) += glamo-lcm-spi.o
++obj-$(CONFIG_MFD_GLAMO_FB) += glamo-fb.o
++obj-$(CONFIG_MFD_GLAMO_SPI_FB) += glamo-lcm-spi.o
+
-Index: linux-2.6/drivers/video/glamo/glamo-regs.h
+Index: linux-2.6/drivers/mfd/glamo/glamo-regs.h
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-regs.h
++++ linux-2.6/drivers/mfd/glamo/glamo-regs.h
@@ -0,0 +1,467 @@
+#ifndef _GLAMO_REGS_H
+#define _GLAMO_REGS_H
@@ -541,11 +504,11 @@
+};
+
+#endif /* _GLAMO_REGS_H */
-Index: linux-2.6/drivers/video/glamo/glamo-core.c
+Index: linux-2.6/drivers/mfd/glamo/glamo-core.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-core.c
-@@ -0,0 +1,1067 @@
++++ linux-2.6/drivers/mfd/glamo/glamo-core.c
+@@ -0,0 +1,1072 @@
+/* Smedia Glamo 336x/337x driver
+ *
+ * (C) 2007 by OpenMoko, Inc.
@@ -793,7 +756,7 @@
+
+/* we only allocate the minimum possible size for the framebuffer to make
+ * sure we have sufficient memory for other functions of the chip */
-+//#define GLAMO_FB_SIZE (640*480*4) /* == 0x12c000 */
++/*#define GLAMO_FB_SIZE (640*480*4)*/ /* == 0x12c000 */
+#define GLAMO_FB_SIZE 0x800000
+
+static struct resource glamo_fb_resources[] = {
@@ -1119,7 +1082,8 @@
+ * script support
+ ***********************************************************************/
+
-+int glamo_run_script(struct glamo_core *glamo, struct glamo_script *script,
int len)
++int glamo_run_script(struct glamo_core *glamo, struct glamo_script *script,
++ int len)
+{
+ int i;
+
@@ -1442,8 +1406,8 @@
+ glamo->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ glamo->irq = platform_get_irq(pdev, 0);
+ glamo->pdata = pdev->dev.platform_data;
-+ if (!glamo->irq || !glamo->mem || !glamo->pdata) {
-+ dev_err(&pdev->dev, "platform device with no IRQ/MEM ?\n");
++ if (!glamo->mem || !glamo->pdata) {
++ dev_err(&pdev->dev, "platform device with no MEM/PDATA ?\n");
+ rc = -ENOENT;
+ goto out_free;
+ }
@@ -1518,7 +1482,7 @@
+
+ platform_set_drvdata(pdev, glamo);
+
-+ printk("running init script\n");
++ dev_dbg(&glamo->pdev->dev, "running init script\n");
+ glamo_run_script(glamo, glamo_init_script,
ARRAY_SIZE(glamo_init_script));
+
+ dev_info(&glamo->pdev->dev, "Glamo core now %uHz CPU / %uHz Memory)\n",
@@ -1526,19 +1490,23 @@
+ glamo_pll_rate(glamo, GLAMO_PLL2));
+
+ /* FIXME: do we need to request_irq() it ? */
-+ printk("interrupts\n");
++
++ dev_dbg(&glamo->pdev->dev, "interrupts\n");
+ for (irq = IRQ_GLAMO(0); irq <= IRQ_GLAMO(8); irq++) {
+ set_irq_chip(irq, &glamo_irq_chip);
+ set_irq_handler(irq, handle_level_irq);
+ set_irq_flags(irq, IRQF_VALID);
+ }
-+#if 0 /* temporarily disabled since it creates endless loop on GTA02v2 */
-+ printk("chained\n");
-+ set_irq_chained_handler(glamo->irq, glamo_irq_demux_handler);
-+ printk("type\n");
-+ set_irq_type(glamo->irq, IRQT_FALLING);
-+#endif
+
++ if (!glamo->irq)
++ dev_warn(&glamo->pdev->dev, "No IRQ support on this
hardware!\n");
++ else {
++ dev_dbg(&glamo->pdev->dev, "chained\n");
++ set_irq_chained_handler(glamo->irq, glamo_irq_demux_handler);
++ dev_dbg(&glamo->pdev->dev, "type\n");
++ set_irq_type(glamo->irq, IRQT_FALLING);
++ }
++
+ return 0;
+
+out_free:
@@ -1657,10 +1625,10 @@
+#define IRQ_GLAMO_RISC IRQ_GLAMO(8)
+
#endif /* __ASM_ARCH_IRQ_H */
-Index: linux-2.6/drivers/video/glamo/glamo-fb.c
+Index: linux-2.6/drivers/mfd/glamo/glamo-fb.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-fb.c
++++ linux-2.6/drivers/mfd/glamo/glamo-fb.c
@@ -0,0 +1,658 @@
+/* Smedia Glamo 336x/337x driver
+ *
@@ -2385,16 +2353,16 @@
+ unsigned int pin_cs;
+
+ unsigned int board_size;
-+ struct spi_board_info* board_info;
++ struct spi_board_info *board_info;
+ struct glamo_core *glamo;
+};
+
+
+#endif
-Index: linux-2.6/drivers/video/glamo/glamo-core.h
+Index: linux-2.6/drivers/mfd/glamo/glamo-core.h
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-core.h
++++ linux-2.6/drivers/mfd/glamo/glamo-core.h
@@ -0,0 +1,53 @@
+#ifndef __GLAMO_CORE_H
+#define __GLAMO_CORE_H
@@ -2449,10 +2417,10 @@
+ enum glamo_engine engine, int ps);
+
+#endif /* __GLAMO_CORE_H */
-Index: linux-2.6/drivers/video/glamo/glamo-gpio.c
+Index: linux-2.6/drivers/mfd/glamo/glamo-gpio.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-gpio.c
++++ linux-2.6/drivers/mfd/glamo/glamo-gpio.c
@@ -0,0 +1,62 @@
+
+#include <linux/kernel.h>
@@ -2516,10 +2484,10 @@
+}
+EXPORT_SYMBOL(glamo_gpio_cfgpin);
+
-Index: linux-2.6/drivers/video/glamo/glamo-lcm-spi.c
+Index: linux-2.6/drivers/mfd/glamo/glamo-lcm-spi.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-lcm-spi.c
++++ linux-2.6/drivers/mfd/glamo/glamo-lcm-spi.c
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2007 OpenMoko, Inc.
@@ -2737,23 +2705,23 @@
+
+static struct platform_driver glamo_spi_drv = {
+ .probe = glamo_spi_probe,
-+ .remove = glamo_spi_remove,
-+ .suspend = glamo_spi_suspend,
-+ .resume = glamo_spi_resume,
-+ .driver = {
++ .remove = glamo_spi_remove,
++ .suspend = glamo_spi_suspend,
++ .resume = glamo_spi_resume,
++ .driver = {
+ .name = "glamo-lcm-spi",
+ .owner = THIS_MODULE,
-+ },
++ },
+};
+
+static int __init glamo_spi_init(void)
+{
-+ return platform_driver_register(&glamo_spi_drv);
++ return platform_driver_register(&glamo_spi_drv);
+}
+
+static void __exit glamo_spi_exit(void)
+{
-+ platform_driver_unregister(&glamo_spi_drv);
++ platform_driver_unregister(&glamo_spi_drv);
+}
+
+module_init(glamo_spi_init);
@@ -2762,11 +2730,11 @@
+MODULE_DESCRIPTION("Smedia Glamo 336x/337x LCM serial command SPI Driver");
+MODULE_AUTHOR("Harald Welte <[EMAIL PROTECTED]>")
+MODULE_LICENSE("GPL");
-Index: linux-2.6/drivers/video/glamo/glamo-spi-gpio.c
+Index: linux-2.6/drivers/mfd/glamo/glamo-spi-gpio.c
===================================================================
--- /dev/null
-+++ linux-2.6/drivers/video/glamo/glamo-spi-gpio.c
-@@ -0,0 +1,251 @@
++++ linux-2.6/drivers/mfd/glamo/glamo-spi-gpio.c
+@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2007 OpenMoko, Inc.
+ * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -2809,7 +2777,6 @@
+ struct spi_master *master;
+ struct glamo_spigpio_info *info;
+ struct glamo_core *glamo;
-+ //struct device *dev;
+};
+
+static inline struct glamo_spigpio *to_sg(struct spi_device *spi)
@@ -2869,7 +2836,8 @@
+
+
+#if 0
-+static int glamo_spigpio_setupxfer(struct spi_device *spi, struct
spi_transfer *t)
++static int glamo_spigpio_setupxfer(struct spi_device *spi,
++ struct spi_transfer *t)
+{
+ struct glamo_spi *gs = to_sg(spi);
+ unsigned int bpw;
@@ -2920,7 +2888,6 @@
+ }
+
+
-+ //memset(sp, 0, sizeof(struct glamo_spigpio));
+ master->bus_num = 2; /* FIXME: use dynamic number */
+
+ sp->master = spi_master_get(master);
@@ -2993,23 +2960,23 @@
+
+static struct platform_driver glamo_spi_drv = {
+ .probe = glamo_spigpio_probe,
-+ .remove = glamo_spigpio_remove,
-+ .suspend = glamo_spigpio_suspend,
-+ .resume = glamo_spigpio_resume,
-+ .driver = {
++ .remove = glamo_spigpio_remove,
++ .suspend = glamo_spigpio_suspend,
++ .resume = glamo_spigpio_resume,
++ .driver = {
+ .name = "glamo-spi-gpio",
+ .owner = THIS_MODULE,
-+ },
++ },
+};
+
+static int __init glamo_spi_init(void)
+{
-+ return platform_driver_register(&glamo_spi_drv);
++ return platform_driver_register(&glamo_spi_drv);
+}
+
+static void __exit glamo_spi_exit(void)
+{
-+ platform_driver_unregister(&glamo_spi_drv);
++ platform_driver_unregister(&glamo_spi_drv);
+}
+
+module_init(glamo_spi_init);
@@ -3022,7 +2989,7 @@
===================================================================
--- /dev/null
+++ linux-2.6/include/linux/glamo-gpio.h
-@@ -0,0 +1,98 @@
+@@ -0,0 +1,99 @@
+#ifndef __GLAMO_GPIO_H
+#define __GLAMO_GPIO_H
+
@@ -3070,24 +3037,24 @@
+#define GLAMO_GPIO5_nLCS1 (GLAMO_GPIO5 | GLAMO_GPIO_F_FUNC)
+
+#define GLAMO_GPIO6 GLAMO_GPIONO(GLAMO_GPIO_BANKB, 2)
-+#define GLAMO_GPIO6_INPUT
-+#define GLAMO_GPIO6_OUTPUT
-+#define GLAMO_GPIO6_LDCLK
++#define GLAMO_GPIO6_INPUT (GLAMO_GPIO6 | GLAMO_GPIO_F_IN)
++#define GLAMO_GPIO6_OUTPUT (GLAMO_GPIO6 | GLAMO_GPIO_F_OUT)
++#define GLAMO_GPIO6_LDCLK (GLAMO_GPIO6 | GLAMO_GPIO_F_FUNC)
+
+#define GLAMO_GPIO7 GLAMO_GPIONO(GLAMO_GPIO_BANKB, 3)
-+#define GLAMO_GPIO7_INPUT
-+#define GLAMO_GPIO7_OUTPUT
-+#define GLAMO_GPIO7_nLDE
++#define GLAMO_GPIO7_INPUT (GLAMO_GPIO7 | GLAMO_GPIO_F_IN)
++#define GLAMO_GPIO7_OUTPUT (GLAMO_GPIO7 | GLAMO_GPIO_F_OUT)
++#define GLAMO_GPIO7_nLDE (GLAMO_GPIO7 | GLAMO_GPIO_F_FUNC)
+
+#define GLAMO_GPIO8 GLAMO_GPIONO(GLAMO_GPIO_BANKC, 0)
-+#define GLAMO_GPIO8_INPUT
-+#define GLAMO_GPIO8_OUTPUT
-+#define GLAMO_GPIO8_LD16
++#define GLAMO_GPIO8_INPUT (GLAMO_GPIO8 | GLAMO_GPIO_F_IN)
++#define GLAMO_GPIO8_OUTPUT (GLAMO_GPIO8 | GLAMO_GPIO_F_OUT)
++#define GLAMO_GPIO8_LD16 (GLAMO_GPIO8 | GLAMO_GPIO_F_FUNC)
+
+#define GLAMO_GPIO9 GLAMO_GPIONO(GLAMO_GPIO_BANKC, 1)
-+#define GLAMO_GPIO9_INPUT
-+#define GLAMO_GPIO9_OUTPUT
-+#define GLAMO_GPIO9_LD17
++#define GLAMO_GPIO9_INPUT (GLAMO_GPIO9 | GLAMO_GPIO_F_IN)
++#define GLAMO_GPIO9_OUTPUT (GLAMO_GPIO9 | GLAMO_GPIO_F_OUT)
++#define GLAMO_GPIO9_LD17 (GLAMO_GPIO9 | GLAMO_GPIO_F_FUNC)
+
+#define GLAMO_GPIO10 GLAMO_GPIONO(GLAMO_GPIO_BANKC, 2)
+#define GLAMO_GPIO10_INPUT (GLAMO_GPIO10 | GLAMO_GPIO_F_IN)
@@ -3105,7 +3072,8 @@
+#define GLAMO_GPIO12_LSA0 (GLAMO_GPIO12 | GLAMO_GPIO_F_FUNC)
+
+
-+#define REG_OF_GPIO(gpio) (((gpio & 0xf000) >> 12)*2 +
GLAMO_REG_GPIO_GEN1)
++#define REG_OF_GPIO(gpio) (((gpio & 0xf000) >> 12)*2 \
++ + GLAMO_REG_GPIO_GEN1)
+#define NUM_OF_GPIO(gpio) ((gpio & 0x0f00) >> 8)
+#define GPIO_OUT_BIT(gpio) (1 << (NUM_OF_GPIO(gpio) + 0))
+#define OUTPUT_BIT(gpio) (1 << (NUM_OF_GPIO(gpio) + 4))
@@ -3121,3 +3089,55 @@
+
+
+#endif /* _GLAMO_GPIO */
+Index: linux-2.6/drivers/mfd/glamo/Kconfig
+===================================================================
+--- /dev/null
++++ linux-2.6/drivers/mfd/glamo/Kconfig
+@@ -0,0 +1,35 @@
++config MFD_GLAMO
++ bool "Smedia Glamo 336x/337x support"
++ help
++ This enables the core driver for the Smedia Glamo 336x/337x
++ multi-function device. It includes irq_chip demultiplex as
++ well as clock / power management and GPIO support.
++
++config MFD_GLAMO_FB
++ tristate "Smedia Glamo 336x/337x framebuffer support"
++ depends on FB && MFD_GLAMO
++ help
++ Frame buffer driver for the LCD controller in the Smedia Glamo
++ 336x/337x.
++
++ This driver is also available as a module ( = code which can be
++ inserted and removed from the running kernel whenever you want). The
++ module will be called glamofb. If you want to compile it as a module,
++ say M here and read <file:Documentation/modules.txt>.
++
++ If unsure, say N.
++
++config MFD_GLAMO_SPI_GPIO
++ tristate "Glamo GPIO SPI bitbang support"
++ depends on MFD_GLAMO
++ help
++ Enable a bitbanging SPI adapter driver for the Smedia Glamo.
++
++config MFD_GLAMO_SPI_FB
++ tristate "Glamo LCM control channel SPI support"
++ depends on MFD_GLAMO_FB
++ help
++ Enable a bitbanging SPI adapter driver for the Smedia Glamo LCM
++ control channel. This SPI interface is frequently used to
++ interconnect the LCM control interface.
++
+Index: linux-2.6/drivers/mfd/Makefile
+===================================================================
+--- linux-2.6.orig/drivers/mfd/Makefile
++++ linux-2.6/drivers/mfd/Makefile
+@@ -3,6 +3,7 @@
+ #
+
+ obj-$(CONFIG_MFD_SM501) += sm501.o
++obj-$(CONFIG_MFD_GLAMO) += glamo/
+
+ obj-$(CONFIG_MCP) += mcp-core.o
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog