diff options
author | Szymon Dziok <b0hoon@o2.pl> | 2010-07-04 12:03:38 +0000 |
---|---|---|
committer | Szymon Dziok <b0hoon@o2.pl> | 2010-07-04 12:03:38 +0000 |
commit | 63c795a3496bc322a9e6118a3b08d0a7029b0b7d (patch) | |
tree | 2503ed6801f54e9caf88a4fbdc59a0b6b0cfeddf | |
parent | 78c9a19e51ffa1b3c949ed76c870a10eee5d095c (diff) | |
download | rockbox-63c795a3496bc322a9e6118a3b08d0a7029b0b7d.tar.gz rockbox-63c795a3496bc322a9e6118a3b08d0a7029b0b7d.zip |
hdd6330: change the synaptics-mep driver in a few places according to the touchpad behavior.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27273 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/synaptics-mep.c | 12 | ||||
-rw-r--r-- | firmware/export/synaptics-mep.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/pbell/vibe500/backlight-vibe500.c | 6 | ||||
-rw-r--r-- | firmware/target/arm/pbell/vibe500/power-vibe500.c | 8 |
4 files changed, 18 insertions, 10 deletions
diff --git a/firmware/drivers/synaptics-mep.c b/firmware/drivers/synaptics-mep.c index d87b828afb..f5b619053b 100644 --- a/firmware/drivers/synaptics-mep.c +++ b/firmware/drivers/synaptics-mep.c | |||
@@ -558,6 +558,10 @@ int touchpad_read_device(char *data, int len) | |||
558 | } | 558 | } |
559 | else if (val == MEP_ABSOLUTE_HEADER) | 559 | else if (val == MEP_ABSOLUTE_HEADER) |
560 | { | 560 | { |
561 | /* for HDD6330 an absolute packet will follow for sensor nr 0 which we ignore */ | ||
562 | #if defined(PHILIPS_HDD6330) | ||
563 | if ((data[3]>>6) == 0) syn_read(tmp, 4); | ||
564 | #endif | ||
561 | logf(" pos %d", val); | 565 | logf(" pos %d", val); |
562 | logf(" z %d", data[3]); | 566 | logf(" z %d", data[3]); |
563 | logf(" finger %d", data[1] & 0x1); | 567 | logf(" finger %d", data[1] & 0x1); |
@@ -583,7 +587,7 @@ int touchpad_read_device(char *data, int len) | |||
583 | return val; | 587 | return val; |
584 | } | 588 | } |
585 | 589 | ||
586 | int touchpad_set_parameter(char par_nr, unsigned int param) | 590 | int touchpad_set_parameter(char mod_nr, char par_nr, unsigned int param) |
587 | { | 591 | { |
588 | char data[4]; | 592 | char data[4]; |
589 | int val=0; | 593 | int val=0; |
@@ -592,7 +596,7 @@ int touchpad_set_parameter(char par_nr, unsigned int param) | |||
592 | { | 596 | { |
593 | syn_enable_int(false); | 597 | syn_enable_int(false); |
594 | 598 | ||
595 | data[0]=0x03; /* header - addr:0,global:0,control:0,len:3 */ | 599 | data[0]=0x03 | (mod_nr << 5); /* header - addr=mod_nr,global:0,ctrl:0,len:3 */ |
596 | data[1]=0x40+par_nr; /* parameter number */ | 600 | data[1]=0x40+par_nr; /* parameter number */ |
597 | data[2]=(param >> 8) & 0xff; /* param_hi */ | 601 | data[2]=(param >> 8) & 0xff; /* param_hi */ |
598 | data[3]=param & 0xff; /* param_lo */ | 602 | data[3]=param & 0xff; /* param_lo */ |
@@ -614,7 +618,11 @@ int touchpad_set_buttonlights(unsigned int led_mask, char brightness) | |||
614 | syn_enable_int(false); | 618 | syn_enable_int(false); |
615 | 619 | ||
616 | /* turn on all touchpad leds */ | 620 | /* turn on all touchpad leds */ |
621 | #if defined(PHILIPS_HDD6330) | ||
622 | data[0] = 0x25; /* HDD6330: second module */ | ||
623 | #else | ||
617 | data[0] = 0x05; | 624 | data[0] = 0x05; |
625 | #endif | ||
618 | data[1] = 0x31; | 626 | data[1] = 0x31; |
619 | data[2] = (brightness & 0xf) << 4; | 627 | data[2] = (brightness & 0xf) << 4; |
620 | data[3] = 0x00; | 628 | data[3] = 0x00; |
diff --git a/firmware/export/synaptics-mep.h b/firmware/export/synaptics-mep.h index aa45e70475..4eb57382a7 100644 --- a/firmware/export/synaptics-mep.h +++ b/firmware/export/synaptics-mep.h | |||
@@ -24,6 +24,6 @@ | |||
24 | int touchpad_init(void); | 24 | int touchpad_init(void); |
25 | int touchpad_read_device(char *data, int len); | 25 | int touchpad_read_device(char *data, int len); |
26 | int touchpad_set_buttonlights(unsigned int led_mask, char brightness); | 26 | int touchpad_set_buttonlights(unsigned int led_mask, char brightness); |
27 | int touchpad_set_parameter(char par_nr, unsigned int param); | 27 | int touchpad_set_parameter(char mod_nr, char par_nr, unsigned int param); |
28 | 28 | ||
29 | #endif | 29 | #endif |
diff --git a/firmware/target/arm/pbell/vibe500/backlight-vibe500.c b/firmware/target/arm/pbell/vibe500/backlight-vibe500.c index 321484cd9a..ab71012bdb 100644 --- a/firmware/target/arm/pbell/vibe500/backlight-vibe500.c +++ b/firmware/target/arm/pbell/vibe500/backlight-vibe500.c | |||
@@ -64,7 +64,7 @@ void _buttonlight_on(void) | |||
64 | { | 64 | { |
65 | if (!buttonlight_status) | 65 | if (!buttonlight_status) |
66 | { | 66 | { |
67 | touchpad_set_parameter(0x22, 0x000f); /* 0x22 - GPO_ENABLE */ | 67 | touchpad_set_parameter(0, 0x22, 0x000f); /* 0x22 - GPO_ENABLE */ |
68 | buttonlight_status = 1; | 68 | buttonlight_status = 1; |
69 | } | 69 | } |
70 | } | 70 | } |
@@ -73,7 +73,7 @@ void _buttonlight_off(void) | |||
73 | { | 73 | { |
74 | if (buttonlight_status) | 74 | if (buttonlight_status) |
75 | { | 75 | { |
76 | touchpad_set_parameter(0x22, 0x0000); /* 0x22 - GPO_ENABLE */ | 76 | touchpad_set_parameter(0, 0x22, 0x0000); /* 0x22 - GPO_ENABLE */ |
77 | buttonlight_status = 0; | 77 | buttonlight_status = 0; |
78 | } | 78 | } |
79 | } | 79 | } |
@@ -82,7 +82,7 @@ void _buttonlight_set_brightness(int brightness) | |||
82 | { | 82 | { |
83 | /* no brightness control, but lights stays on - for compatibility */ | 83 | /* no brightness control, but lights stays on - for compatibility */ |
84 | (void)brightness; | 84 | (void)brightness; |
85 | touchpad_set_parameter(0x22, 0x000f); /* 0x22 - GPO_ENABLE */ | 85 | touchpad_set_parameter(0, 0x22, 0x000f); /* 0x22 - GPO_ENABLE */ |
86 | buttonlight_status = 1; | 86 | buttonlight_status = 1; |
87 | } | 87 | } |
88 | #endif | 88 | #endif |
diff --git a/firmware/target/arm/pbell/vibe500/power-vibe500.c b/firmware/target/arm/pbell/vibe500/power-vibe500.c index b345a9b5d0..a5660d7e73 100644 --- a/firmware/target/arm/pbell/vibe500/power-vibe500.c +++ b/firmware/target/arm/pbell/vibe500/power-vibe500.c | |||
@@ -49,14 +49,14 @@ void power_init(void) | |||
49 | /* Max touch sensivity = 0x77, Rate=80/s,NoFilter=0, | 49 | /* Max touch sensivity = 0x77, Rate=80/s,NoFilter=0, |
50 | KeyMatrix=0,Buttons=1,Relative=0,Absolute=1. | 50 | KeyMatrix=0,Buttons=1,Relative=0,Absolute=1. |
51 | MEP parameter 0x20 - Report Modes */ | 51 | MEP parameter 0x20 - Report Modes */ |
52 | touchpad_set_parameter(0x20,0x7785); | 52 | touchpad_set_parameter(0,0x20,0x7785); |
53 | /* MinAbsReporting=0, NotAllCapButtons=0,SingleCapButton=0, | 53 | /* MinAbsReporting=0, NotAllCapButtons=0,SingleCapButton=0, |
54 | 50msDebounce=0,MotionReporting=1 (reduce transmission overhead), | 54 | 50msDebounce=0,MotionReporting=1 (reduce transmission overhead), |
55 | ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0. | 55 | ClipZifnoFinger=0,DisableDeceleration=0,Dribble=0. |
56 | MEP parameter 0x21 - Enhanced Operating Configuration */ | 56 | MEP parameter 0x21 - Enhanced Operating Configuration */ |
57 | touchpad_set_parameter(0x21,0x0008); | 57 | touchpad_set_parameter(0,0x21,0x0008); |
58 | /* Set the GPO_LEVELS = 0 - for the button lights */ | 58 | /* Set the GPO_LEVELS = 0 - for the button lights */ |
59 | touchpad_set_parameter(0x23,0x0000); | 59 | touchpad_set_parameter(0,0x23,0x0000); |
60 | 60 | ||
61 | /* Sound unmute (on) */ | 61 | /* Sound unmute (on) */ |
62 | GPIO_CLEAR_BITWISE(GPIOL_OUTPUT_VAL, 0x10); | 62 | GPIO_CLEAR_BITWISE(GPIOL_OUTPUT_VAL, 0x10); |
@@ -100,7 +100,7 @@ void power_off(void) | |||
100 | /* shutdown bit */ | 100 | /* shutdown bit */ |
101 | GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x80); | 101 | GPIO_CLEAR_BITWISE(GPIOB_OUTPUT_VAL, 0x80); |
102 | /* button lights off */ | 102 | /* button lights off */ |
103 | touchpad_set_parameter(0x22,0x0000); | 103 | touchpad_set_parameter(0,0x22,0x0000); |
104 | /* ATA power off */ | 104 | /* ATA power off */ |
105 | ide_power_enable(false); | 105 | ide_power_enable(false); |
106 | /* ? - in the OF */ | 106 | /* ? - in the OF */ |