All times are UTC




Post new topic Reply to topic  [ 103 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sun Dec 27, 2009 7:57 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
Apply the patch below onto linux-hpc branch v2.6.24-hpc. It should give us more info.

diff --git a/drivers/input/keyboard/mp900_kbd.c b/drivers/input/keyboard/mp900_kbd.c
index 337ec3b..b9c52de 100644
--- a/drivers/input/keyboard/mp900_kbd.c
+++ b/drivers/input/keyboard/mp900_kbd.c
@@ -185,12 +185,14 @@ static void mp900_kb_decode(char cur_buffer[], int packet_length)
while (keycount) {
keycount--;
if (keys_buffer[keycount] < 128) {
+ printk(KERN_ERR "reporting keypress %d\n",mp900_keymap[keys_buffer[keycount]]);
input_report_key(dev_kb,
mp900_keymap[keys_buffer[keycount]],
1);
input_sync(dev_kb);
}
else {
+ printk(KERN_ERR "reporting keyrelease %d\n", mp900_keymap[keys_buffer[keycount]]);
input_report_key(dev_kb,
mp900_keymap[keys_buffer[keycount]-128],
0);
@@ -293,6 +295,7 @@ static irqreturn_t mp900_kb_interrupt(int irq,void *dev_id)
if (keydown)
break;
else { /* ? */
+ printk(KERN_ERR "received keypress scheduling delayd work\n");
keydown = 1;
if (exiting == 0) {
schedule_delayed_work(
@@ -310,10 +313,10 @@ static irqreturn_t mp900_kb_interrupt(int irq,void *dev_id)
}
break;

-// case 10:
-// printk(KERN_ERR "btuart : Package size 10\n");
-// printk(KERN_ERR "btuart_log : %s\n", packet_buffer);
-// break;
+ case 10:
+ printk(KERN_ERR "btuart : Package size 10\n");
+ printk(KERN_ERR "btuart_log : %s\n", packet_buffer);
+ break;

case 14:
if (packet_buffer[0] == 0x13) { /* Keyboard poll packet */
@@ -328,10 +331,10 @@ static irqreturn_t mp900_kb_interrupt(int irq,void *dev_id)
}
}
break;
-// case 15:
-// printk(KERN_ERR "btuart : Package size 15\n");
-// printk(KERN_ERR "btuart_log : %s\n", packet_buffer);
-// break;
+ case 15:
+ printk(KERN_ERR "btuart : Package size 15\n");
+ printk(KERN_ERR "btuart_log : %s\n", packet_buffer);
+ break;

default:
/* make sure ts is clear to transmit */


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sun Dec 27, 2009 8:39 pm 
JLime Guru User
JLime Guru User

Joined: Sat Nov 28, 2009 12:52 pm
Posts: 64
Location: Poland
Ok, I'll try tomorrow.

Kristoffer wrote:
You dont got a keyboard. maybe its outputting some other commands for the hw buttons.


Maui has got qwerty keyboard and some other hw keys (power, volume cotrol, dpad, app buttons) and issue with touchscreen doesn't depend which key I press.

Other differences are with battery control and backlight settings - battery is always reported as AC, and backlight control is only two level (bright/dark, wince by default doesn't allow to change it manually, cmonex (as I remember) has written small app for do this - I'll write to her, maybe we'll get some useful code)

[edit]

Quote:
patching file mp900_kbd.c
patch: **** malformed patch at line 6: while (keycount) {


:?


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Mon Dec 28, 2009 9:00 am 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
Apply it manually then. Its basicly alot of printk(KERN_ERR "blablabla\n"); additions.


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Tue Dec 29, 2009 6:02 pm 
JLime Guru User
JLime Guru User

Joined: Sat Nov 28, 2009 12:52 pm
Posts: 64
Location: Poland
Well can You patch this file or explain me in normal way what i must edit in this file? I don't know diff's syntax :?


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Tue Dec 29, 2009 6:19 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
Code:
diff --git a/drivers/input/keyboard/mp900_kbd.c b/drivers/input/keyboard/mp900_kbd.c


tells you that we are talking about this file (everything below belongs to this file).

Code:
+
tells us that patch should add the line after it.
Code:
-
tells us that we should remove those lines.

So if you just open the file with a normal editor, then remove all lines starting with - and add all lines starting with + you are done.


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Fri Jan 01, 2010 9:30 pm 
JLime Guru User
JLime Guru User

Joined: Sat Nov 28, 2009 12:52 pm
Posts: 64
Location: Poland
1st keypress:
Quote:
received keypress scheduling delayd work


2nd keypress:
Quote:
btuart: Package size 10
btuart_log: |!!


where | is vertical line with arrows on it's ends. It's in console, in x11 there's still touchscreen problem after any key press.

Here's photo (huge, ~10mpx, 5mb): LINK


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 4:15 pm 
JLime Guru User
JLime Guru User

Joined: Sat Nov 28, 2009 12:52 pm
Posts: 64
Location: Poland
So what's now?


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 5:44 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
It looks like the keyboard is handled by the same interrupt, and a flood is happening inside the btuart buffer. This is most likely happening from input entering the buffer but we never take it out, leaving the buffer full and unable to accept further input (keyboard/touchscreen).

We really should start creating an own setup for the bsquare since we are adding up changes here.

Start with a fresh repository for 2.6.24-hpc (remove the stuff we added last time, usually by git checkout -f). And add this instead:
diff --git a/drivers/input/keyboard/mp900_kbd.c b/drivers/input/keyboard/mp900_kbd.c
index 337ec3b..079555d 100644
--- a/drivers/input/keyboard/mp900_kbd.c
+++ b/drivers/input/keyboard/mp900_kbd.c
@@ -139,15 +139,16 @@ static int keydown=0;
static void mp900_kb_decode(char cur_buffer[], int packet_length)
{
int i, j, ff, keycount=0;
+ int length=packet_length;
unsigned char keys_buffer[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
static unsigned char last_buffer[32] = {0x13, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0};
-
- if (packet_length == 14) {
+
+ if ((packet_length == 14) || (packet_length == 10)) {
ff = 0;
- for (i=1; i < 14; i++) {
+ for (i=1; i < length; i++) {
keys_buffer[keycount] = cur_buffer[i] ^ last_buffer[i];
if (cur_buffer[i] == 0xff)
ff++;
@@ -177,7 +178,7 @@ static void mp900_kb_decode(char cur_buffer[], int packet_length)
}

if (keycount) {
- for (i=1;i<14;i++) {
+ for (i=1; i<length; i++) {
last_buffer[i] = cur_buffer[i];
}
}
@@ -310,10 +311,19 @@ static irqreturn_t mp900_kb_interrupt(int irq,void *dev_id)
}
break;

-// case 10:
-// printk(KERN_ERR "btuart : Package size 10\n");
-// printk(KERN_ERR "btuart_log : %s\n", packet_buffer);
-// break;
+ case 10:
+ printk(KERN_ERR "btuart : Package size 10\n");
+ printk(KERN_ERR "btuart_log : %s\n", packet_buffer);
+ printk(KERN_ERR "btuart_log : packate_buffer[0]=%d\n", packet_buffer[0]);
+ mp900_kb_decode(packet_buffer, i);
+
+ if (keydown) {
+ if (exiting == 0) {
+ schedule_delayed_work(&mp900_kb_work, 2);
+ }
+ }
+
+ break;

case 14:
if (packet_buffer[0] == 0x13) { /* Keyboard poll packet */


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 6:13 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
Ive added maui support to the 2.6.24-hpc branch. Please disregard what I said in early post and instead download a fresh linux-hpc repository.

Ive created a default config that should compile, please try that kernel and tell me what happens when you press key.


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 9:03 pm 
JLime Guru User
JLime Guru User

Joined: Sat Nov 28, 2009 12:52 pm
Posts: 64
Location: Poland
Well kernel is not booting, also if i use my config file :?


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 9:06 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
Oki, let me bugtrack it some. You did a fresh clone right? and you see my default config?


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 9:08 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
also, you sure that its not just the framebuffer not working? Does the device reset when you restart it?


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sat Jan 02, 2010 9:24 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
perhaps its caused by the keyboard, the code I added earlier. Do this :
diff --git a/drivers/video/s1d13mp900fb.c b/drivers/video/s1d13mp900fb.c
index 3248004..3b5a3f4 100644
--- a/drivers/video/s1d13mp900fb.c
+++ b/drivers/video/s1d13mp900fb.c
@@ -220,8 +220,10 @@ void s1d13mp900fb_init_hardware (void)

int __init s1d13mp900fb_init(void)
{
- if (fb_get_options("s1d13mp900fb", NULL))
- return -ENODEV;
+
+// ??
+// if (fb_get_options("s1d13mp900fb", NULL))
+// return -ENODEV;

printk (KERN_INFO PFX "initing now...\n");

If that doesnt work, do this :
diff --git a/drivers/input/keyboard/mp900_kbd.c b/drivers/input/keyboard/mp900_kbd.c
index 7a71436..9717632 100644
--- a/drivers/input/keyboard/mp900_kbd.c
+++ b/drivers/input/keyboard/mp900_kbd.c
@@ -313,13 +313,13 @@ static irqreturn_t mp900_kb_interrupt(int irq,void *dev_id)

case 10: /* Axim X30 reports its special keys here */
printk(KERN_ERR "btuart : received unsupported packetsize of %d with packet_buffer[0]=%x\n", i, packet_buffer[0]);
- mp900_kb_decode(packet_buffer, i);
-
- if (keydown) {
- if (exiting == 0) {
- schedule_delayed_work(&mp900_kb_work, 2);
- }
- }
+// mp900_kb_decode(packet_buffer, i);
+//
+// if (keydown) {
+// if (exiting == 0) {
+// schedule_delayed_work(&mp900_kb_work, 2);
+// }
+// }

break;


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sun Jan 03, 2010 4:05 pm 
JLime Guru User
JLime Guru User

Joined: Sat Nov 28, 2009 12:52 pm
Posts: 64
Location: Poland
I'll try later - yesterday my hdd failed and I lost all data...


Top
Offline Profile  
 
 Post subject: Re: Kernel for Bsuqare Power Handled (Maui)
PostPosted: Sun Jan 03, 2010 7:43 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
ouchi! Oki, let me know when you got stuff back together. I obviously cannot test any kernels since I lack the hardware.


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 103 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron