Bug in keyboard driver

Andy Green andy at openmoko.com
Fri Jul 11 11:30:17 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| Am Donnerstag 08 Mai 2008 10:27:16 schrieb Andy Green:
|> Somebody in the thread at some point said:
|> | the KEY_PHONE is backwards. It returns up when pushed and down when
|> | released. The following change fixes it:
|> |
|> | static irqreturn_t neo1973kbd_aux_irq(int irq, void *dev_id)
|> | {
|> |        struct neo1973kbd *neo1973kbd_data = dev_id;
|> |
|> | -       int key_pressed = !gpio_get_value(irq_to_gpio(irq));
|> | +       int key_pressed = !!gpio_get_value(irq_to_gpio(irq));
|> |        input_report_key(neo1973kbd_data->input, KEY_PHONE,
key_pressed);
|> |        input_sync(neo1973kbd_data->input);
|>
|> Thanks for the nice find -- I patchified it, signed it off by you and
|> added it to stable / andy / andy-tracking.
|
| This patch fixes it for GTA02, but inverts it for 01. Just verified with
| 9c058ff0d2641df3c36fc3300acb72078d2c41d4 (stable).
|
| Guess we need a if_machine_is_foo() here?

Wah OK, that'll be how it got "wrong" in the first place then.  Patch
coming in a minute.  Thanks for the report.

- -Andy


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkh3KCIACgkQOjLpvpq7dMqHVACfbh2iuzP39i3Nrn3UQD7ipG66
VDwAnAg+Be6gHSZgS2hB93H4n0fhxJsn
=n7+u
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list