[oe-commits] Sebastian Krzyszkowiak : mokomaze: fix accelerometers on gta02 with 2.6. 34 kernel

git version control git at git.openembedded.org
Sat Oct 30 17:19:50 UTC 2010


Module: openembedded.git
Branch: master
Commit: a505f567b1b36c6f59b61d96fb0780b9cf3c148f
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a505f567b1b36c6f59b61d96fb0780b9cf3c148f

Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date:   Sat Oct 30 15:55:44 2010 +0000

mokomaze: fix accelerometers on gta02 with 2.6.34 kernel

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 ...01-Fix-accelerometers-with-2.6.34-kernels.patch |   38 ++++++++++++++++++++
 recipes/mokomaze/mokomaze_0.5.5.bb                 |    3 +-
 2 files changed, 40 insertions(+), 1 deletions(-)

diff --git a/recipes/mokomaze/files/0001-Fix-accelerometers-with-2.6.34-kernels.patch b/recipes/mokomaze/files/0001-Fix-accelerometers-with-2.6.34-kernels.patch
new file mode 100644
index 0000000..ffe9f78
--- /dev/null
+++ b/recipes/mokomaze/files/0001-Fix-accelerometers-with-2.6.34-kernels.patch
@@ -0,0 +1,38 @@
+From 1075e429b7905ee5a3ecef4315697d057b1e0208 Mon Sep 17 00:00:00 2001
+From: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
+Date: Sat, 30 Oct 2010 17:33:40 +0200
+Subject: [PATCH] Fix accelerometers with 2.6.34+ kernels
+
+---
+ src/accelerometers.c |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/src/accelerometers.c b/src/accelerometers.c
+index 8dc0b9b..b704077 100644
+--- a/src/accelerometers.c
++++ b/src/accelerometers.c
+@@ -117,6 +117,12 @@ static FILE *accelerometer_freerunner_open_threshold(const char *mode)
+ 		return fh;
+ 	}
+ 
++	/* Try 2.6.34+ method */
++	fh = fopen("/sys/devices/platform/spi_s3c24xx_gpio.0/spi3.1/threshold", mode);
++	if ( fh != NULL ) {
++		return fh;
++	}
++
+         return NULL;
+ }
+ 
+@@ -270,7 +276,7 @@ AccelHandle *accelerometer_open()
+ 
+         if ( !((arguments.accel_set) && (arguments.accel != ACCEL_FREERUNNER)) )
+         {
+-            #define FREERUNNER_FILE "/dev/input/event3"
++            #define FREERUNNER_FILE "/dev/input/event4"
+             if (stat(FREERUNNER_FILE, &st) == 0)
+             {
+                 accel->fd = open(FREERUNNER_FILE, O_RDONLY, O_NONBLOCK); //, O_RDONLY, 0);
+-- 
+1.7.2.3
+
diff --git a/recipes/mokomaze/mokomaze_0.5.5.bb b/recipes/mokomaze/mokomaze_0.5.5.bb
index 89ada2b..8421752 100644
--- a/recipes/mokomaze/mokomaze_0.5.5.bb
+++ b/recipes/mokomaze/mokomaze_0.5.5.bb
@@ -7,10 +7,11 @@ DEPENDS = "libsdl-ttf libsdl-image ode"
 RDEPENDS_${PN} = "ttf-liberation-mono libpng"
 RDEPENDS_${PN}_shr = "ttf-liberation-mono libpng fsoraw"
 PV = "0.5.5+git8"
-PR = "r4"
+PR = "r5"
 
 SRC_URI = "http://mokomaze.projects.openmoko.org/files/${PN}-${PV}.tar.gz"
 SRC_URI_append_shr = " file://fsoraw.patch"
+SRC_URI_append_shr = " file://0001-Fix-accelerometers-with-2.6.34-kernels.patch"
 SRC_URI[md5sum] = "f4e1dbd444b4049c361f9c1c3d40d32b"
 SRC_URI[sha256sum] = "515d842b79a2c34f5789fa10110bc9d7b15c65a7b1fa623131a1e03599fe7362"
 





More information about the Openembedded-commits mailing list