mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina:
"The list of changes worth pointing out explicitly:
- We are getting 'UHID', which is a new framework for implementing HID
transport drivers in userspace (this is different from HIDRAW, which
is transport-independent and provides report parsing facilities;
uhid is for the other (transport) part of the pipeline).
It's needed for (and currently being used by) Bluetooth-LowEnergy,
as its specification mandates things we don't want in the kernel.
Written by David Herrmann.
- there have been quite a few bugs in runtime suspend/resume paths
(probably never reported to actually happen in the wild, but still).
Alan Stern fixed those.
- a few other driver updates and fixes and random new device support."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (45 commits)
HID: add ASUS AIO keyboard model AK1D
HID: add support for Cypress barcode scanner 04B4:ED81
HID: Allow drivers to be their own listener
HID: usbhid: fix error paths in suspend
HID: usbhid: check for suspend or reset before restarting
HID: usbhid: replace HID_REPORTED_IDLE with HID_SUSPENDED
HID: usbhid: inline some simple routines
HID: usbhid: fix autosuspend calls
HID: usbhid: fix use-after-free bug
HID: hid-core: optimize in case of hidraw
HID: hidraw: fix list->buffer memleak
HID: uhid: Fix sending events with invalid data
HID: roccat: added sensor sysfs attribute for Savu
HID: Add driver for Holtek based keyboards with broken HID
HID: Add suport for the brightness control keys on HP keyboards
HID: magicmouse: Implement Multi-touch Protocol B (MT-B)
HID: magicmouse: Removing report_touches switch
HID: roccat: rename roccat_common functions to roccat_common2
HID: roccat: fix wrong hid_err usage on struct usb_device
HID: roccat: move functionality to roccat-common
...
This commit is contained in:
commit
e8ff13b0bf
40 changed files with 2983 additions and 554 deletions
|
|
@ -376,6 +376,7 @@ header-y += tty.h
|
|||
header-y += types.h
|
||||
header-y += udf_fs_i.h
|
||||
header-y += udp.h
|
||||
header-y += uhid.h
|
||||
header-y += uinput.h
|
||||
header-y += uio.h
|
||||
header-y += ultrasound.h
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ struct hid_item {
|
|||
#define HID_UP_DIGITIZER 0x000d0000
|
||||
#define HID_UP_PID 0x000f0000
|
||||
#define HID_UP_HPVENDOR 0xff7f0000
|
||||
#define HID_UP_HPVENDOR2 0xff010000
|
||||
#define HID_UP_MSVENDOR 0xff000000
|
||||
#define HID_UP_CUSTOM 0x00ff0000
|
||||
#define HID_UP_LOGIVENDOR 0xffbc0000
|
||||
|
|
|
|||
104
include/linux/uhid.h
Normal file
104
include/linux/uhid.h
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
#ifndef __UHID_H_
|
||||
#define __UHID_H_
|
||||
|
||||
/*
|
||||
* User-space I/O driver support for HID subsystem
|
||||
* Copyright (c) 2012 David Herrmann
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Public header for user-space communication. We try to keep every structure
|
||||
* aligned but to be safe we also use __attribute__((__packed__)). Therefore,
|
||||
* the communication should be ABI compatible even between architectures.
|
||||
*/
|
||||
|
||||
#include <linux/input.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
enum uhid_event_type {
|
||||
UHID_CREATE,
|
||||
UHID_DESTROY,
|
||||
UHID_START,
|
||||
UHID_STOP,
|
||||
UHID_OPEN,
|
||||
UHID_CLOSE,
|
||||
UHID_OUTPUT,
|
||||
UHID_OUTPUT_EV,
|
||||
UHID_INPUT,
|
||||
UHID_FEATURE,
|
||||
UHID_FEATURE_ANSWER,
|
||||
};
|
||||
|
||||
struct uhid_create_req {
|
||||
__u8 name[128];
|
||||
__u8 phys[64];
|
||||
__u8 uniq[64];
|
||||
__u8 __user *rd_data;
|
||||
__u16 rd_size;
|
||||
|
||||
__u16 bus;
|
||||
__u32 vendor;
|
||||
__u32 product;
|
||||
__u32 version;
|
||||
__u32 country;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
#define UHID_DATA_MAX 4096
|
||||
|
||||
enum uhid_report_type {
|
||||
UHID_FEATURE_REPORT,
|
||||
UHID_OUTPUT_REPORT,
|
||||
UHID_INPUT_REPORT,
|
||||
};
|
||||
|
||||
struct uhid_input_req {
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
__u16 size;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_output_req {
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
__u16 size;
|
||||
__u8 rtype;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_output_ev_req {
|
||||
__u16 type;
|
||||
__u16 code;
|
||||
__s32 value;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_feature_req {
|
||||
__u32 id;
|
||||
__u8 rnum;
|
||||
__u8 rtype;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
struct uhid_feature_answer_req {
|
||||
__u32 id;
|
||||
__u16 err;
|
||||
__u16 size;
|
||||
__u8 data[UHID_DATA_MAX];
|
||||
};
|
||||
|
||||
struct uhid_event {
|
||||
__u32 type;
|
||||
|
||||
union {
|
||||
struct uhid_create_req create;
|
||||
struct uhid_input_req input;
|
||||
struct uhid_output_req output;
|
||||
struct uhid_output_ev_req output_ev;
|
||||
struct uhid_feature_req feature;
|
||||
struct uhid_feature_answer_req feature_answer;
|
||||
} u;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
#endif /* __UHID_H_ */
|
||||
Loading…
Reference in a new issue