You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: remove compat stuff HID: constify arrays of struct apple_key_translation HID: add support for Kye/Genius Ergo 525V HID: Support Apple mini aluminum keyboard HID: support for Kensington slimblade device HID: DragonRise game controller force feedback driver HID: add support for another version of 0e8f:0003 device in hid-pl HID: fix race between usb_register_dev() and hiddev_open() HID: bring back possibility to specify vid/pid ignore on module load HID: make HID_DEBUG defaults consistent HID: autosuspend -- fix lockup of hid on reset HID: hid_reset_resume() needs to be defined only when CONFIG_PM is set HID: fix USB HID devices after STD with autosuspend HID: do not try to compile PM code with CONFIG_PM unset HID: autosuspend support for USB HID
This commit is contained in:
@@ -283,13 +283,6 @@ Who: Glauber Costa <gcosta@redhat.com>
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
What: remove HID compat support
|
|
||||||
When: 2.6.29
|
|
||||||
Why: needed only as a temporary solution until distros fix themselves up
|
|
||||||
Who: Jiri Slaby <jirislaby@gmail.com>
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
What: print_fn_descriptor_symbol()
|
What: print_fn_descriptor_symbol()
|
||||||
When: October 2009
|
When: October 2009
|
||||||
Why: The %pF vsprintf format provides the same functionality in a
|
Why: The %pF vsprintf format provides the same functionality in a
|
||||||
|
|||||||
+25
-15
@@ -29,11 +29,11 @@ config HID
|
|||||||
|
|
||||||
For docs and specs, see http://www.usb.org/developers/hidpage/
|
For docs and specs, see http://www.usb.org/developers/hidpage/
|
||||||
|
|
||||||
If unsure, say Y
|
If unsure, say Y.
|
||||||
|
|
||||||
config HID_DEBUG
|
config HID_DEBUG
|
||||||
bool "HID debugging support"
|
bool "HID debugging support"
|
||||||
default y if !EMBEDDED
|
default y
|
||||||
depends on HID
|
depends on HID
|
||||||
---help---
|
---help---
|
||||||
This option lets the HID layer output diagnostics about its internal
|
This option lets the HID layer output diagnostics about its internal
|
||||||
@@ -44,7 +44,7 @@ config HID_DEBUG
|
|||||||
This feature is useful for those who are either debugging the HID parser
|
This feature is useful for those who are either debugging the HID parser
|
||||||
or any HID hardware device.
|
or any HID hardware device.
|
||||||
|
|
||||||
If unsure, say N
|
If unsure, say Y.
|
||||||
|
|
||||||
config HIDRAW
|
config HIDRAW
|
||||||
bool "/dev/hidraw raw HID device support"
|
bool "/dev/hidraw raw HID device support"
|
||||||
@@ -70,18 +70,6 @@ source "drivers/hid/usbhid/Kconfig"
|
|||||||
menu "Special HID drivers"
|
menu "Special HID drivers"
|
||||||
depends on HID
|
depends on HID
|
||||||
|
|
||||||
config HID_COMPAT
|
|
||||||
bool "Load all HID drivers on hid core load"
|
|
||||||
default y
|
|
||||||
---help---
|
|
||||||
Compatible option for older userspace. If you have system without udev
|
|
||||||
support of module loading through aliases and also old
|
|
||||||
module-init-tools which can't handle hid bus, choose Y here. Otherwise
|
|
||||||
say N. If you say N and your userspace is old enough, the only
|
|
||||||
functionality you lose is modules autoloading.
|
|
||||||
|
|
||||||
If unsure, say Y.
|
|
||||||
|
|
||||||
config HID_A4TECH
|
config HID_A4TECH
|
||||||
tristate "A4 tech" if EMBEDDED
|
tristate "A4 tech" if EMBEDDED
|
||||||
depends on USB_HID
|
depends on USB_HID
|
||||||
@@ -128,6 +116,14 @@ config HID_CYPRESS
|
|||||||
---help---
|
---help---
|
||||||
Support for cypress mouse and barcode readers.
|
Support for cypress mouse and barcode readers.
|
||||||
|
|
||||||
|
config DRAGONRISE_FF
|
||||||
|
tristate "DragonRise Inc. force feedback support"
|
||||||
|
depends on USB_HID
|
||||||
|
select INPUT_FF_MEMLESS
|
||||||
|
---help---
|
||||||
|
Say Y here if you want to enable force feedback support for DragonRise Inc.
|
||||||
|
game controllers.
|
||||||
|
|
||||||
config HID_EZKEY
|
config HID_EZKEY
|
||||||
tristate "Ezkey" if EMBEDDED
|
tristate "Ezkey" if EMBEDDED
|
||||||
depends on USB_HID
|
depends on USB_HID
|
||||||
@@ -135,6 +131,13 @@ config HID_EZKEY
|
|||||||
---help---
|
---help---
|
||||||
Support for Ezkey BTC 8193 keyboard.
|
Support for Ezkey BTC 8193 keyboard.
|
||||||
|
|
||||||
|
config HID_KYE
|
||||||
|
tristate "Kye" if EMBEDDED
|
||||||
|
depends on USB_HID
|
||||||
|
default !EMBEDDED
|
||||||
|
---help---
|
||||||
|
Support for Kye/Genius Ergo Mouse.
|
||||||
|
|
||||||
config HID_GYRATION
|
config HID_GYRATION
|
||||||
tristate "Gyration" if EMBEDDED
|
tristate "Gyration" if EMBEDDED
|
||||||
depends on USB_HID
|
depends on USB_HID
|
||||||
@@ -142,6 +145,13 @@ config HID_GYRATION
|
|||||||
---help---
|
---help---
|
||||||
Support for Gyration remote control.
|
Support for Gyration remote control.
|
||||||
|
|
||||||
|
config HID_KENSINGTON
|
||||||
|
tristate "Kensington" if EMBEDDED
|
||||||
|
depends on USB_HID
|
||||||
|
default !EMBEDDED
|
||||||
|
---help---
|
||||||
|
Support for Kensington Slimblade Trackball.
|
||||||
|
|
||||||
config HID_LOGITECH
|
config HID_LOGITECH
|
||||||
tristate "Logitech" if EMBEDDED
|
tristate "Logitech" if EMBEDDED
|
||||||
depends on USB_HID
|
depends on USB_HID
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ obj-$(CONFIG_HID) += hid.o
|
|||||||
hid-$(CONFIG_HID_DEBUG) += hid-debug.o
|
hid-$(CONFIG_HID_DEBUG) += hid-debug.o
|
||||||
hid-$(CONFIG_HIDRAW) += hidraw.o
|
hid-$(CONFIG_HIDRAW) += hidraw.o
|
||||||
|
|
||||||
ifdef CONFIG_HID_COMPAT
|
|
||||||
obj-m += hid-dummy.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
hid-logitech-objs := hid-lg.o
|
hid-logitech-objs := hid-lg.o
|
||||||
ifdef CONFIG_LOGITECH_FF
|
ifdef CONFIG_LOGITECH_FF
|
||||||
hid-logitech-objs += hid-lgff.o
|
hid-logitech-objs += hid-lgff.o
|
||||||
@@ -26,8 +22,11 @@ obj-$(CONFIG_HID_BELKIN) += hid-belkin.o
|
|||||||
obj-$(CONFIG_HID_CHERRY) += hid-cherry.o
|
obj-$(CONFIG_HID_CHERRY) += hid-cherry.o
|
||||||
obj-$(CONFIG_HID_CHICONY) += hid-chicony.o
|
obj-$(CONFIG_HID_CHICONY) += hid-chicony.o
|
||||||
obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
|
obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o
|
||||||
|
obj-$(CONFIG_DRAGONRISE_FF) += hid-drff.o
|
||||||
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
|
obj-$(CONFIG_HID_EZKEY) += hid-ezkey.o
|
||||||
obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
|
obj-$(CONFIG_HID_GYRATION) += hid-gyration.o
|
||||||
|
obj-$(CONFIG_HID_KENSINGTON) += hid-kensington.o
|
||||||
|
obj-$(CONFIG_HID_KYE) += hid-kye.o
|
||||||
obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
|
obj-$(CONFIG_HID_LOGITECH) += hid-logitech.o
|
||||||
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
|
obj-$(CONFIG_HID_MICROSOFT) += hid-microsoft.o
|
||||||
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
|
obj-$(CONFIG_HID_MONTEREY) += hid-monterey.o
|
||||||
|
|||||||
@@ -158,5 +158,3 @@ static void a4_exit(void)
|
|||||||
module_init(a4_init);
|
module_init(a4_init);
|
||||||
module_exit(a4_exit);
|
module_exit(a4_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(a4tech);
|
|
||||||
|
|||||||
+15
-11
@@ -53,7 +53,7 @@ struct apple_key_translation {
|
|||||||
u8 flags;
|
u8 flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct apple_key_translation apple_fn_keys[] = {
|
static const struct apple_key_translation apple_fn_keys[] = {
|
||||||
{ KEY_BACKSPACE, KEY_DELETE },
|
{ KEY_BACKSPACE, KEY_DELETE },
|
||||||
{ KEY_ENTER, KEY_INSERT },
|
{ KEY_ENTER, KEY_INSERT },
|
||||||
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
|
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
|
||||||
@@ -75,7 +75,7 @@ static struct apple_key_translation apple_fn_keys[] = {
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct apple_key_translation powerbook_fn_keys[] = {
|
static const struct apple_key_translation powerbook_fn_keys[] = {
|
||||||
{ KEY_BACKSPACE, KEY_DELETE },
|
{ KEY_BACKSPACE, KEY_DELETE },
|
||||||
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
|
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
|
||||||
{ KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
|
{ KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
|
||||||
@@ -94,7 +94,7 @@ static struct apple_key_translation powerbook_fn_keys[] = {
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct apple_key_translation powerbook_numlock_keys[] = {
|
static const struct apple_key_translation powerbook_numlock_keys[] = {
|
||||||
{ KEY_J, KEY_KP1 },
|
{ KEY_J, KEY_KP1 },
|
||||||
{ KEY_K, KEY_KP2 },
|
{ KEY_K, KEY_KP2 },
|
||||||
{ KEY_L, KEY_KP3 },
|
{ KEY_L, KEY_KP3 },
|
||||||
@@ -117,16 +117,16 @@ static struct apple_key_translation powerbook_numlock_keys[] = {
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct apple_key_translation apple_iso_keyboard[] = {
|
static const struct apple_key_translation apple_iso_keyboard[] = {
|
||||||
{ KEY_GRAVE, KEY_102ND },
|
{ KEY_GRAVE, KEY_102ND },
|
||||||
{ KEY_102ND, KEY_GRAVE },
|
{ KEY_102ND, KEY_GRAVE },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct apple_key_translation *apple_find_translation(
|
static const struct apple_key_translation *apple_find_translation(
|
||||||
struct apple_key_translation *table, u16 from)
|
const struct apple_key_translation *table, u16 from)
|
||||||
{
|
{
|
||||||
struct apple_key_translation *trans;
|
const struct apple_key_translation *trans;
|
||||||
|
|
||||||
/* Look for the translation */
|
/* Look for the translation */
|
||||||
for (trans = table; trans->from; trans++)
|
for (trans = table; trans->from; trans++)
|
||||||
@@ -140,7 +140,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|||||||
struct hid_usage *usage, __s32 value)
|
struct hid_usage *usage, __s32 value)
|
||||||
{
|
{
|
||||||
struct apple_sc *asc = hid_get_drvdata(hid);
|
struct apple_sc *asc = hid_get_drvdata(hid);
|
||||||
struct apple_key_translation *trans;
|
const struct apple_key_translation *trans;
|
||||||
|
|
||||||
if (usage->code == KEY_FN) {
|
if (usage->code == KEY_FN) {
|
||||||
asc->fn_on = !!value;
|
asc->fn_on = !!value;
|
||||||
@@ -253,7 +253,7 @@ static void apple_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|||||||
|
|
||||||
static void apple_setup_input(struct input_dev *input)
|
static void apple_setup_input(struct input_dev *input)
|
||||||
{
|
{
|
||||||
struct apple_key_translation *trans;
|
const struct apple_key_translation *trans;
|
||||||
|
|
||||||
set_bit(KEY_NUMLOCK, input->keybit);
|
set_bit(KEY_NUMLOCK, input->keybit);
|
||||||
|
|
||||||
@@ -387,6 +387,12 @@ static const struct hid_device_id apple_devices[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS),
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS),
|
||||||
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
|
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
|
||||||
APPLE_RDESC_JIS },
|
APPLE_RDESC_JIS },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_ANSI),
|
||||||
|
.driver_data = APPLE_HAS_FN },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_ISO),
|
||||||
|
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_JIS),
|
||||||
|
.driver_data = APPLE_HAS_FN },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI),
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI),
|
||||||
.driver_data = APPLE_HAS_FN },
|
.driver_data = APPLE_HAS_FN },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO),
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO),
|
||||||
@@ -468,5 +474,3 @@ static void apple_exit(void)
|
|||||||
module_init(apple_init);
|
module_init(apple_init);
|
||||||
module_exit(apple_exit);
|
module_exit(apple_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(apple);
|
|
||||||
|
|||||||
@@ -101,5 +101,3 @@ static void belkin_exit(void)
|
|||||||
module_init(belkin_init);
|
module_init(belkin_init);
|
||||||
module_exit(belkin_exit);
|
module_exit(belkin_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(belkin);
|
|
||||||
|
|||||||
@@ -83,5 +83,3 @@ static void ch_exit(void)
|
|||||||
module_init(ch_init);
|
module_init(ch_init);
|
||||||
module_exit(ch_exit);
|
module_exit(ch_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(cherry);
|
|
||||||
|
|||||||
@@ -76,5 +76,3 @@ static void ch_exit(void)
|
|||||||
module_init(ch_init);
|
module_init(ch_init);
|
||||||
module_exit(ch_exit);
|
module_exit(ch_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(chicony);
|
|
||||||
|
|||||||
+19
-18
@@ -1236,6 +1236,9 @@ static const struct hid_device_id hid_blacklist[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_ANSI) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_ISO) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_MINI_JIS) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS) },
|
||||||
@@ -1262,6 +1265,7 @@ static const struct hid_device_id hid_blacklist[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PCS_ADAPTOR) },
|
||||||
@@ -1269,6 +1273,8 @@ static const struct hid_device_id hid_blacklist[] = {
|
|||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_MX3000_RECEIVER) },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
|
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
|
||||||
@@ -1813,14 +1819,21 @@ void hid_unregister_driver(struct hid_driver *hdrv)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(hid_unregister_driver);
|
EXPORT_SYMBOL_GPL(hid_unregister_driver);
|
||||||
|
|
||||||
#ifdef CONFIG_HID_COMPAT
|
int hid_check_keys_pressed(struct hid_device *hid)
|
||||||
static void hid_compat_load(struct work_struct *ws)
|
|
||||||
{
|
{
|
||||||
request_module("hid-dummy");
|
struct hid_input *hidinput;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
list_for_each_entry(hidinput, &hid->inputs, list) {
|
||||||
|
for (i = 0; i < BITS_TO_LONGS(KEY_MAX); i++)
|
||||||
|
if (hidinput->input->key[i])
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
static DECLARE_WORK(hid_compat_work, hid_compat_load);
|
|
||||||
static struct workqueue_struct *hid_compat_wq;
|
EXPORT_SYMBOL_GPL(hid_check_keys_pressed);
|
||||||
#endif
|
|
||||||
|
|
||||||
static int __init hid_init(void)
|
static int __init hid_init(void)
|
||||||
{
|
{
|
||||||
@@ -1836,15 +1849,6 @@ static int __init hid_init(void)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_bus;
|
goto err_bus;
|
||||||
|
|
||||||
#ifdef CONFIG_HID_COMPAT
|
|
||||||
hid_compat_wq = create_singlethread_workqueue("hid_compat");
|
|
||||||
if (!hid_compat_wq) {
|
|
||||||
hidraw_exit();
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
queue_work(hid_compat_wq, &hid_compat_work);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err_bus:
|
err_bus:
|
||||||
bus_unregister(&hid_bus_type);
|
bus_unregister(&hid_bus_type);
|
||||||
@@ -1854,9 +1858,6 @@ err:
|
|||||||
|
|
||||||
static void __exit hid_exit(void)
|
static void __exit hid_exit(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_HID_COMPAT
|
|
||||||
destroy_workqueue(hid_compat_wq);
|
|
||||||
#endif
|
|
||||||
hidraw_exit();
|
hidraw_exit();
|
||||||
bus_unregister(&hid_bus_type);
|
bus_unregister(&hid_bus_type);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,5 +154,3 @@ static void cp_exit(void)
|
|||||||
module_init(cp_init);
|
module_init(cp_init);
|
||||||
module_exit(cp_exit);
|
module_exit(cp_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(cypress);
|
|
||||||
|
|||||||
@@ -0,0 +1,188 @@
|
|||||||
|
/*
|
||||||
|
* Force feedback support for DragonRise Inc. game controllers
|
||||||
|
*
|
||||||
|
* From what I have gathered, these devices are mass produced in China and are
|
||||||
|
* distributed under several vendors. They often share the same design as
|
||||||
|
* the original PlayStation DualShock controller.
|
||||||
|
*
|
||||||
|
* 0079:0006 "DragonRise Inc. Generic USB Joystick "
|
||||||
|
* - tested with a Tesun USB-703 game controller.
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009 Richard Walmsley <richwalm@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/input.h>
|
||||||
|
#include <linux/usb.h>
|
||||||
|
#include <linux/hid.h>
|
||||||
|
|
||||||
|
#include "hid-ids.h"
|
||||||
|
#include "usbhid/usbhid.h"
|
||||||
|
|
||||||
|
struct drff_device {
|
||||||
|
struct hid_report *report;
|
||||||
|
};
|
||||||
|
|
||||||
|
static int drff_play(struct input_dev *dev, void *data,
|
||||||
|
struct ff_effect *effect)
|
||||||
|
{
|
||||||
|
struct hid_device *hid = input_get_drvdata(dev);
|
||||||
|
struct drff_device *drff = data;
|
||||||
|
int strong, weak;
|
||||||
|
|
||||||
|
strong = effect->u.rumble.strong_magnitude;
|
||||||
|
weak = effect->u.rumble.weak_magnitude;
|
||||||
|
|
||||||
|
dbg_hid("called with 0x%04x 0x%04x", strong, weak);
|
||||||
|
|
||||||
|
if (strong || weak) {
|
||||||
|
strong = strong * 0xff / 0xffff;
|
||||||
|
weak = weak * 0xff / 0xffff;
|
||||||
|
|
||||||
|
/* While reverse engineering this device, I found that when
|
||||||
|
this value is set, it causes the strong rumble to function
|
||||||
|
at a near maximum speed, so we'll bypass it. */
|
||||||
|
if (weak == 0x0a)
|
||||||
|
weak = 0x0b;
|
||||||
|
|
||||||
|
drff->report->field[0]->value[0] = 0x51;
|
||||||
|
drff->report->field[0]->value[1] = 0x00;
|
||||||
|
drff->report->field[0]->value[2] = weak;
|
||||||
|
drff->report->field[0]->value[4] = strong;
|
||||||
|
usbhid_submit_report(hid, drff->report, USB_DIR_OUT);
|
||||||
|
|
||||||
|
drff->report->field[0]->value[0] = 0xfa;
|
||||||
|
drff->report->field[0]->value[1] = 0xfe;
|
||||||
|
} else {
|
||||||
|
drff->report->field[0]->value[0] = 0xf3;
|
||||||
|
drff->report->field[0]->value[1] = 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
|
drff->report->field[0]->value[2] = 0x00;
|
||||||
|
drff->report->field[0]->value[4] = 0x00;
|
||||||
|
dbg_hid("running with 0x%02x 0x%02x", strong, weak);
|
||||||
|
usbhid_submit_report(hid, drff->report, USB_DIR_OUT);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int drff_init(struct hid_device *hid)
|
||||||
|
{
|
||||||
|
struct drff_device *drff;
|
||||||
|
struct hid_report *report;
|
||||||
|
struct hid_input *hidinput = list_first_entry(&hid->inputs,
|
||||||
|
struct hid_input, list);
|
||||||
|
struct list_head *report_list =
|
||||||
|
&hid->report_enum[HID_OUTPUT_REPORT].report_list;
|
||||||
|
struct input_dev *dev = hidinput->input;
|
||||||
|
int error;
|
||||||
|
|
||||||
|
if (list_empty(report_list)) {
|
||||||
|
dev_err(&hid->dev, "no output reports found\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
report = list_first_entry(report_list, struct hid_report, list);
|
||||||
|
if (report->maxfield < 1) {
|
||||||
|
dev_err(&hid->dev, "no fields in the report\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (report->field[0]->report_count < 7) {
|
||||||
|
dev_err(&hid->dev, "not enough values in the field\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
drff = kzalloc(sizeof(struct drff_device), GFP_KERNEL);
|
||||||
|
if (!drff)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
set_bit(FF_RUMBLE, dev->ffbit);
|
||||||
|
|
||||||
|
error = input_ff_create_memless(dev, drff, drff_play);
|
||||||
|
if (error) {
|
||||||
|
kfree(drff);
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
drff->report = report;
|
||||||
|
drff->report->field[0]->value[0] = 0xf3;
|
||||||
|
drff->report->field[0]->value[1] = 0x00;
|
||||||
|
drff->report->field[0]->value[2] = 0x00;
|
||||||
|
drff->report->field[0]->value[3] = 0x00;
|
||||||
|
drff->report->field[0]->value[4] = 0x00;
|
||||||
|
drff->report->field[0]->value[5] = 0x00;
|
||||||
|
drff->report->field[0]->value[6] = 0x00;
|
||||||
|
usbhid_submit_report(hid, drff->report, USB_DIR_OUT);
|
||||||
|
|
||||||
|
dev_info(&hid->dev, "Force Feedback for DragonRise Inc. game "
|
||||||
|
"controllers by Richard Walmsley <richwalm@gmail.com>\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int dr_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
dev_dbg(&hdev->dev, "DragonRise Inc. HID hardware probe...");
|
||||||
|
|
||||||
|
ret = hid_parse(hdev);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&hdev->dev, "parse failed\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
|
||||||
|
if (ret) {
|
||||||
|
dev_err(&hdev->dev, "hw start failed\n");
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
|
drff_init(hdev);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
err:
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct hid_device_id dr_devices[] = {
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006), },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(hid, dr_devices);
|
||||||
|
|
||||||
|
static struct hid_driver dr_driver = {
|
||||||
|
.name = "dragonrise",
|
||||||
|
.id_table = dr_devices,
|
||||||
|
.probe = dr_probe,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init dr_init(void)
|
||||||
|
{
|
||||||
|
return hid_register_driver(&dr_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit dr_exit(void)
|
||||||
|
{
|
||||||
|
hid_unregister_driver(&dr_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(dr_init);
|
||||||
|
module_exit(dr_exit);
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
#include <linux/autoconf.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/hid.h>
|
|
||||||
|
|
||||||
static int __init hid_dummy_init(void)
|
|
||||||
{
|
|
||||||
#ifdef CONFIG_HID_A4TECH_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(a4tech);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_APPLE_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(apple);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_BELKIN_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(belkin);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_BRIGHT_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(bright);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_CHERRY_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(cherry);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_CHICONY_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(chicony);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_CYPRESS_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(cypress);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_DELL_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(dell);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_EZKEY_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(ezkey);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_GYRATION_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(gyration);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_LOGITECH_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(logitech);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_MICROSOFT_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(microsoft);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_MONTEREY_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(monterey);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_NTRIG_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(ntrig);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_PANTHERLORD_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(pantherlord);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_PETALYNX_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(petalynx);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_SAMSUNG_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(samsung);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_SONY_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(sony);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_HID_SUNPLUS_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(sunplus);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_GREENASIA_FF_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(greenasia);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_THRUSTMASTER_FF_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(thrustmaster);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_ZEROPLUS_FF_MODULE
|
|
||||||
HID_COMPAT_CALL_DRIVER(zeroplus);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
module_init(hid_dummy_init);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
@@ -91,5 +91,3 @@ static void ez_exit(void)
|
|||||||
module_init(ez_init);
|
module_init(ez_init);
|
||||||
module_exit(ez_exit);
|
module_exit(ez_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(ezkey);
|
|
||||||
|
|||||||
@@ -181,5 +181,3 @@ static void __exit ga_exit(void)
|
|||||||
module_init(ga_init);
|
module_init(ga_init);
|
||||||
module_exit(ga_exit);
|
module_exit(ga_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(greenasia);
|
|
||||||
|
|||||||
@@ -94,5 +94,3 @@ static void gyration_exit(void)
|
|||||||
module_init(gyration_init);
|
module_init(gyration_init);
|
||||||
module_exit(gyration_exit);
|
module_exit(gyration_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(gyration);
|
|
||||||
|
|||||||
@@ -67,6 +67,9 @@
|
|||||||
#define USB_DEVICE_ID_APPLE_GEYSER4_ANSI 0x021a
|
#define USB_DEVICE_ID_APPLE_GEYSER4_ANSI 0x021a
|
||||||
#define USB_DEVICE_ID_APPLE_GEYSER4_ISO 0x021b
|
#define USB_DEVICE_ID_APPLE_GEYSER4_ISO 0x021b
|
||||||
#define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c
|
#define USB_DEVICE_ID_APPLE_GEYSER4_JIS 0x021c
|
||||||
|
#define USB_DEVICE_ID_APPLE_ALU_MINI_ANSI 0x021d
|
||||||
|
#define USB_DEVICE_ID_APPLE_ALU_MINI_ISO 0x021e
|
||||||
|
#define USB_DEVICE_ID_APPLE_ALU_MINI_JIS 0x021f
|
||||||
#define USB_DEVICE_ID_APPLE_ALU_ANSI 0x0220
|
#define USB_DEVICE_ID_APPLE_ALU_ANSI 0x0220
|
||||||
#define USB_DEVICE_ID_APPLE_ALU_ISO 0x0221
|
#define USB_DEVICE_ID_APPLE_ALU_ISO 0x0221
|
||||||
#define USB_DEVICE_ID_APPLE_ALU_JIS 0x0222
|
#define USB_DEVICE_ID_APPLE_ALU_JIS 0x0222
|
||||||
@@ -148,6 +151,8 @@
|
|||||||
#define USB_VENDOR_ID_DMI 0x0c0b
|
#define USB_VENDOR_ID_DMI 0x0c0b
|
||||||
#define USB_DEVICE_ID_DMI_ENC 0x5fab
|
#define USB_DEVICE_ID_DMI_ENC 0x5fab
|
||||||
|
|
||||||
|
#define USB_VENDOR_ID_DRAGONRISE 0x0079
|
||||||
|
|
||||||
#define USB_VENDOR_ID_ELO 0x04E7
|
#define USB_VENDOR_ID_ELO 0x04E7
|
||||||
#define USB_DEVICE_ID_ELO_TS2700 0x0020
|
#define USB_DEVICE_ID_ELO_TS2700 0x0020
|
||||||
|
|
||||||
@@ -272,6 +277,9 @@
|
|||||||
#define USB_DEVICE_ID_LD_POWERCONTROL 0x2030
|
#define USB_DEVICE_ID_LD_POWERCONTROL 0x2030
|
||||||
#define USB_DEVICE_ID_LD_MACHINETEST 0x2040
|
#define USB_DEVICE_ID_LD_MACHINETEST 0x2040
|
||||||
|
|
||||||
|
#define USB_VENDOR_ID_KENSINGTON 0x047d
|
||||||
|
#define USB_DEVICE_ID_KS_SLIMBLADE 0x2041
|
||||||
|
|
||||||
#define USB_VENDOR_ID_LOGITECH 0x046d
|
#define USB_VENDOR_ID_LOGITECH 0x046d
|
||||||
#define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101
|
#define USB_DEVICE_ID_LOGITECH_RECEIVER 0xc101
|
||||||
#define USB_DEVICE_ID_LOGITECH_HARMONY_FIRST 0xc110
|
#define USB_DEVICE_ID_LOGITECH_HARMONY_FIRST 0xc110
|
||||||
@@ -418,6 +426,8 @@
|
|||||||
#define USB_VENDOR_ID_ZEROPLUS 0x0c12
|
#define USB_VENDOR_ID_ZEROPLUS 0x0c12
|
||||||
|
|
||||||
#define USB_VENDOR_ID_KYE 0x0458
|
#define USB_VENDOR_ID_KYE 0x0458
|
||||||
|
#define USB_DEVICE_ID_KYE_ERGO_525V 0x0087
|
||||||
#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
|
#define USB_DEVICE_ID_KYE_GPEN_560 0x5003
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* HID driver for Kensigton Slimblade Trackball
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009 Jiri Kosina
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/device.h>
|
||||||
|
#include <linux/input.h>
|
||||||
|
#include <linux/hid.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include "hid-ids.h"
|
||||||
|
|
||||||
|
#define ks_map_key(c) hid_map_usage(hi, usage, bit, max, EV_KEY, (c))
|
||||||
|
|
||||||
|
static int ks_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||||
|
struct hid_field *field, struct hid_usage *usage,
|
||||||
|
unsigned long **bit, int *max)
|
||||||
|
{
|
||||||
|
if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
switch (usage->hid & HID_USAGE) {
|
||||||
|
case 0x01: ks_map_key(BTN_MIDDLE); break;
|
||||||
|
case 0x02: ks_map_key(BTN_SIDE); break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct hid_device_id ks_devices[] = {
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(hid, ks_devices);
|
||||||
|
|
||||||
|
static struct hid_driver ks_driver = {
|
||||||
|
.name = "kensington",
|
||||||
|
.id_table = ks_devices,
|
||||||
|
.input_mapping = ks_input_mapping,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int ks_init(void)
|
||||||
|
{
|
||||||
|
return hid_register_driver(&ks_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ks_exit(void)
|
||||||
|
{
|
||||||
|
hid_unregister_driver(&ks_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(ks_init);
|
||||||
|
module_exit(ks_exit);
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* HID driver for Kye/Genius devices not fully compliant with HID standard
|
||||||
|
*
|
||||||
|
* Copyright (c) 2009 Jiri Kosina
|
||||||
|
* Copyright (c) 2009 Tomas Hanak
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/device.h>
|
||||||
|
#include <linux/hid.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include "hid-ids.h"
|
||||||
|
|
||||||
|
/* the fixups that need to be done:
|
||||||
|
* - change led usage page to button for extra buttons
|
||||||
|
* - report size 8 count 1 must be size 1 count 8 for button bitfield
|
||||||
|
* - change the button usage range to 4-7 for the extra buttons
|
||||||
|
*/
|
||||||
|
static void kye_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||||
|
unsigned int rsize)
|
||||||
|
{
|
||||||
|
if (rsize >= 74 &&
|
||||||
|
rdesc[61] == 0x05 && rdesc[62] == 0x08 &&
|
||||||
|
rdesc[63] == 0x19 && rdesc[64] == 0x08 &&
|
||||||
|
rdesc[65] == 0x29 && rdesc[66] == 0x0f &&
|
||||||
|
rdesc[71] == 0x75 && rdesc[72] == 0x08 &&
|
||||||
|
rdesc[73] == 0x95 && rdesc[74] == 0x01) {
|
||||||
|
dev_info(&hdev->dev, "fixing up Kye/Genius Ergo Mouse report "
|
||||||
|
"descriptor\n");
|
||||||
|
rdesc[62] = 0x09;
|
||||||
|
rdesc[64] = 0x04;
|
||||||
|
rdesc[66] = 0x07;
|
||||||
|
rdesc[72] = 0x01;
|
||||||
|
rdesc[74] = 0x08;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct hid_device_id kye_devices[] = {
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
MODULE_DEVICE_TABLE(hid, kye_devices);
|
||||||
|
|
||||||
|
static struct hid_driver kye_driver = {
|
||||||
|
.name = "kye",
|
||||||
|
.id_table = kye_devices,
|
||||||
|
.report_fixup = kye_report_fixup,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int kye_init(void)
|
||||||
|
{
|
||||||
|
return hid_register_driver(&kye_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void kye_exit(void)
|
||||||
|
{
|
||||||
|
hid_unregister_driver(&kye_driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(kye_init);
|
||||||
|
module_exit(kye_exit);
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
@@ -326,5 +326,3 @@ static void lg_exit(void)
|
|||||||
module_init(lg_init);
|
module_init(lg_init);
|
||||||
module_exit(lg_exit);
|
module_exit(lg_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(logitech);
|
|
||||||
|
|||||||
@@ -210,5 +210,3 @@ static void ms_exit(void)
|
|||||||
module_init(ms_init);
|
module_init(ms_init);
|
||||||
module_exit(ms_exit);
|
module_exit(ms_exit);
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
HID_COMPAT_LOAD_DRIVER(microsoft);
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user