diff options
| author | Christopher Kenna <cjk@cs.unc.edu> | 2012-09-28 13:46:28 -0400 |
|---|---|---|
| committer | Christopher Kenna <cjk@cs.unc.edu> | 2012-09-28 14:50:15 -0400 |
| commit | daa22703f14c007e93b464c45fa60019a36f546d (patch) | |
| tree | a1a130b6e128dc9d57c35c026977e1b4953105e1 /drivers/hid | |
| parent | 5aa287dcf1b5879aa0150b0511833c52885f5b4c (diff) | |
Apply k4412 kernel from HardKernel for ODROID-X.
Diffstat (limited to 'drivers/hid')
| -rw-r--r-- | drivers/hid/hid-debug.c | 5 | ||||
| -rw-r--r-- | drivers/hid/hid-input.c | 7 | ||||
| -rw-r--r-- | drivers/hid/hid-magicmouse.c | 13 | ||||
| -rw-r--r-- | drivers/hid/hid-multitouch.c | 10 |
4 files changed, 28 insertions, 7 deletions
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index bae48745bb4..9a243ca96e6 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
| @@ -450,6 +450,11 @@ void hid_dump_field(struct hid_field *field, int n, struct seq_file *f) { | |||
| 450 | seq_printf(f, "Logical("); | 450 | seq_printf(f, "Logical("); |
| 451 | hid_resolv_usage(field->logical, f); seq_printf(f, ")\n"); | 451 | hid_resolv_usage(field->logical, f); seq_printf(f, ")\n"); |
| 452 | } | 452 | } |
| 453 | if (field->application) { | ||
| 454 | tab(n, f); | ||
| 455 | seq_printf(f, "Application("); | ||
| 456 | hid_resolv_usage(field->application, f); seq_printf(f, ")\n"); | ||
| 457 | } | ||
| 453 | tab(n, f); seq_printf(f, "Usage(%d)\n", field->maxusage); | 458 | tab(n, f); seq_printf(f, "Usage(%d)\n", field->maxusage); |
| 454 | for (j = 0; j < field->maxusage; j++) { | 459 | for (j = 0; j < field->maxusage; j++) { |
| 455 | tab(n+2, f); hid_resolv_usage(field->usage[j].hid, f); seq_printf(f, "\n"); | 460 | tab(n+2, f); hid_resolv_usage(field->usage[j].hid, f); seq_printf(f, "\n"); |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 6559e2e3364..1483c8296d5 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
| @@ -971,6 +971,9 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
| 971 | * UGCI) cram a lot of unrelated inputs into the | 971 | * UGCI) cram a lot of unrelated inputs into the |
| 972 | * same interface. */ | 972 | * same interface. */ |
| 973 | hidinput->report = report; | 973 | hidinput->report = report; |
| 974 | if (hid->driver->input_register && | ||
| 975 | hid->driver->input_register(hid, hidinput)) | ||
| 976 | goto out_cleanup; | ||
| 974 | if (input_register_device(hidinput->input)) | 977 | if (input_register_device(hidinput->input)) |
| 975 | goto out_cleanup; | 978 | goto out_cleanup; |
| 976 | hidinput = NULL; | 979 | hidinput = NULL; |
| @@ -978,6 +981,10 @@ int hidinput_connect(struct hid_device *hid, unsigned int force) | |||
| 978 | } | 981 | } |
| 979 | } | 982 | } |
| 980 | 983 | ||
| 984 | if (hidinput && hid->driver->input_register && | ||
| 985 | hid->driver->input_register(hid, hidinput)) | ||
| 986 | goto out_cleanup; | ||
| 987 | |||
| 981 | if (hidinput && input_register_device(hidinput->input)) | 988 | if (hidinput && input_register_device(hidinput->input)) |
| 982 | goto out_cleanup; | 989 | goto out_cleanup; |
| 983 | 990 | ||
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 56d0539f2a3..c696f7f20e4 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
| @@ -365,8 +365,10 @@ static int magicmouse_raw_event(struct hid_device *hdev, | |||
| 365 | return 1; | 365 | return 1; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | static void magicmouse_setup_input(struct input_dev *input, struct hid_device *hdev) | 368 | static int magicmouse_setup_input(struct hid_device *hdev, struct hid_input *hi) |
| 369 | { | 369 | { |
| 370 | struct input_dev *input = hi->input; | ||
| 371 | |||
| 370 | __set_bit(EV_KEY, input->evbit); | 372 | __set_bit(EV_KEY, input->evbit); |
| 371 | 373 | ||
| 372 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) { | 374 | if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) { |
| @@ -426,6 +428,8 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h | |||
| 426 | __set_bit(EV_MSC, input->evbit); | 428 | __set_bit(EV_MSC, input->evbit); |
| 427 | __set_bit(MSC_RAW, input->mscbit); | 429 | __set_bit(MSC_RAW, input->mscbit); |
| 428 | } | 430 | } |
| 431 | |||
| 432 | return 0; | ||
| 429 | } | 433 | } |
| 430 | 434 | ||
| 431 | static int magicmouse_input_mapping(struct hid_device *hdev, | 435 | static int magicmouse_input_mapping(struct hid_device *hdev, |
| @@ -478,12 +482,6 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
| 478 | goto err_free; | 482 | goto err_free; |
| 479 | } | 483 | } |
| 480 | 484 | ||
| 481 | /* We do this after hid-input is done parsing reports so that | ||
| 482 | * hid-input uses the most natural button and axis IDs. | ||
| 483 | */ | ||
| 484 | if (msc->input) | ||
| 485 | magicmouse_setup_input(msc->input, hdev); | ||
| 486 | |||
| 487 | if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE) | 485 | if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE) |
| 488 | report = hid_register_report(hdev, HID_INPUT_REPORT, | 486 | report = hid_register_report(hdev, HID_INPUT_REPORT, |
| 489 | MOUSE_REPORT_ID); | 487 | MOUSE_REPORT_ID); |
| @@ -548,6 +546,7 @@ static struct hid_driver magicmouse_driver = { | |||
| 548 | .remove = magicmouse_remove, | 546 | .remove = magicmouse_remove, |
| 549 | .raw_event = magicmouse_raw_event, | 547 | .raw_event = magicmouse_raw_event, |
| 550 | .input_mapping = magicmouse_input_mapping, | 548 | .input_mapping = magicmouse_input_mapping, |
| 549 | .input_register = magicmouse_setup_input, | ||
| 551 | }; | 550 | }; |
| 552 | 551 | ||
| 553 | static int __init magicmouse_init(void) | 552 | static int __init magicmouse_init(void) |
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 1308703afdb..91319f90a16 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c | |||
| @@ -213,6 +213,16 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |||
| 213 | struct mt_class *cls = td->mtclass; | 213 | struct mt_class *cls = td->mtclass; |
| 214 | __s32 quirks = cls->quirks; | 214 | __s32 quirks = cls->quirks; |
| 215 | 215 | ||
| 216 | /* Only map fields from TouchScreen or TouchPad collections. | ||
| 217 | * We need to ignore fields that belong to other collections | ||
| 218 | * such as Mouse that might have the same GenericDesktop usages. */ | ||
| 219 | if (field->application == HID_DG_TOUCHSCREEN) | ||
| 220 | set_bit(INPUT_PROP_DIRECT, hi->input->propbit); | ||
| 221 | else if (field->application == HID_DG_TOUCHPAD) | ||
| 222 | set_bit(INPUT_PROP_POINTER, hi->input->propbit); | ||
| 223 | else | ||
| 224 | return 0; | ||
| 225 | |||
| 216 | switch (usage->hid & HID_USAGE_PAGE) { | 226 | switch (usage->hid & HID_USAGE_PAGE) { |
| 217 | 227 | ||
| 218 | case HID_UP_GENDESK: | 228 | case HID_UP_GENDESK: |
