diff options
author | Jeremy Lainé <jeremy.laine@m4x.org> | 2008-12-18 19:22:32 +0100 |
---|---|---|
committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2008-12-18 19:22:32 +0100 |
commit | 779cd577ab23bb96bee289e78dcb697d0120ca4d (patch) | |
tree | cecab6499ccbdd4250573cfa8fc3b7a71cff7218 /packages | |
parent | 561328f0a7755404a73d3b2dcabf51c07f0de9b6 (diff) |
linux-2.6.26: improve keyboard driver for boc01
Diffstat (limited to 'packages')
-rw-r--r-- | packages/linux/linux-2.6.26/boc01/012-081218-cy3218-btns.patch (renamed from packages/linux/linux-2.6.26/boc01/012-081121-cy3218-btns.patch) | 24 | ||||
-rw-r--r-- | packages/linux/linux_2.6.26.bb | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/packages/linux/linux-2.6.26/boc01/012-081121-cy3218-btns.patch b/packages/linux/linux-2.6.26/boc01/012-081218-cy3218-btns.patch index 51d092c528..d5985f3f0a 100644 --- a/packages/linux/linux-2.6.26/boc01/012-081121-cy3218-btns.patch +++ b/packages/linux/linux-2.6.26/boc01/012-081218-cy3218-btns.patch @@ -70,11 +70,11 @@ diff -Nru linux-2.6.26.orig/drivers/input/misc/cy3218-btns.c linux-2.6.26/driver +} + +unsigned short keymap[5] = { -+ KEY_A, -+ KEY_B, -+ KEY_C, -+ KEY_D, -+ KEY_E, ++ KEY_UP, ++ KEY_F1, ++ KEY_ENTER, ++ KEY_DOWN, ++ KEY_BACKSPACE, +}; + +static void handle_buttons(struct input_polled_dev *dev) @@ -89,7 +89,7 @@ diff -Nru linux-2.6.26.orig/drivers/input/misc/cy3218-btns.c linux-2.6.26/driver + if(uValue == MASK0) + { + report_key(idev, keymap[0]); -+ printk("Bouton A\n"); ++ printk("Bouton UP\n"); + } + + uValue = i2c_smbus_read_byte_data(&capsense->client, CAP_STATE_GP0); @@ -97,24 +97,24 @@ diff -Nru linux-2.6.26.orig/drivers/input/misc/cy3218-btns.c linux-2.6.26/driver + if(uValue == MASK0) + { + report_key(idev, keymap[1]); -+ printk("Bouton E\n"); ++ printk("Bouton HELP\n"); + } + + if(uValue == MASK1) + { + report_key(idev, keymap[2]); -+ printk("Bouton B\n"); ++ printk("Bouton OK\n"); + } + + if(uValue == MASK2) + { + report_key(idev, keymap[3]); -+ printk("Bouton C\n"); ++ printk("Bouton DOWN\n"); + } + if(uValue == MASK3) + { + report_key(idev, keymap[4]); -+ printk("Bouton D\n"); ++ printk("Bouton BACK\n"); + } +} + @@ -167,8 +167,8 @@ diff -Nru linux-2.6.26.orig/drivers/input/misc/cy3218-btns.c linux-2.6.26/driver + set_bit(EV_KEY, ipdev->input->evbit); + + -+ for (i = 0; i < 3; i++) -+ set_bit(keymap[i], ipdev->input->keybit); ++ for (i = 0; i < ARRAY_SIZE(keymap); i++) ++ set_bit(keymap[i], ipdev->input->keybit); + + rc = input_register_polled_device(ipdev); + if(rc) diff --git a/packages/linux/linux_2.6.26.bb b/packages/linux/linux_2.6.26.bb index c3fa981292..d15b22098d 100644 --- a/packages/linux/linux_2.6.26.bb +++ b/packages/linux/linux_2.6.26.bb @@ -1,6 +1,6 @@ require linux.inc -PR = "r4" +PR = "r5" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" @@ -23,7 +23,7 @@ SRC_URI_append_boc01 = "\ file://008-081127-spi.patch;patch=1 \ file://010-081105-mii.patch;patch=1 \ file://011-081202-gpio.patch;patch=1 \ - file://012-081121-cy3218-btns.patch;patch=1 \ + file://012-081218-cy3218-btns.patch;patch=1 \ file://013-081212-lcd.patch;patch=1 \ " |