Skip to contentSkip to conversation

HID patches for 2.6.19

PATCH In review Greg KH 4 participants 5 messages Dec 8, 2006 USB

lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 HID patches for 2.6.19

Here are some patches that move the HID code to a new directory allowing it to be used by other kernel subsystems easier.

This patch was approved by Dmitry, Marcel and myself, and Andrew asked that I get this to you now to make merges with other parts of our respective queues easier.

Many thanks to Jiri for taking the time and respinning these patches multiple times as the tree has changed over the past few days.

Please pull from:

	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6.git/

The full set of patches will be sent to the linux-usb-devel mailing list, if anyone wants to see them.

thanks,

greg k-h

 CREDITS                                          |    8 +
 drivers/Kconfig                                  |    2 +
 drivers/Makefile                                 |    1 +
 drivers/hid/Kconfig                              |   18 +
 drivers/hid/Makefile                             |   15 +
 drivers/hid/hid-core.c                           | 1003 +++++++++++++++
 drivers/{usb/input => hid}/hid-input.c           |  151 +--
 drivers/input/Makefile                           |    1 +
 drivers/usb/input/Kconfig                        |   21 +-
 drivers/usb/input/Makefile                       |    3 -
 drivers/usb/input/hid-core.c                     | 1415 +++++-----------------
 drivers/usb/input/hid-ff.c                       |    8 +-
 drivers/usb/input/hid-lgff.c                     |    7 +-
 drivers/usb/input/hid-pidff.c                    |   58 +-
 drivers/usb/input/hid-tmff.c                     |    5 +-
 drivers/usb/input/hid-zpff.c                     |    7 +-
 drivers/usb/input/hiddev.c                       |   37 +-
 drivers/usb/input/usbhid.h                       |   84 ++
 {drivers/usb/input => include/linux}/hid-debug.h |    0 
 {drivers/usb/input => include/linux}/hid.h       |   86 +-
 20 files changed, 1584 insertions(+), 1346 deletions(-)
 create mode 100644 drivers/hid/Kconfig
 create mode 100644 drivers/hid/Makefile
 create mode 100644 drivers/hid/hid-core.c
 rename drivers/{usb/input/hid-input.c => hid/hid-input.c} (88%)
 create mode 100644 drivers/usb/input/usbhid.h
 rename drivers/usb/input/hid-debug.h => include/linux/hid-debug.h (100%)
 rename drivers/usb/input/hid.h => include/linux/hid.h (86%)

---------------

Jiri Kosina (8):
Generic HID layer - disable USB HID Generic HID layer - code split Generic HID layer - API
Generic HID layer - USB API
Generic HID layer - hiddev
Generic HID layer - input and event reporting Generic HID layer - pb_fnmode
Generic HID layer - build

#1 lore raw
Quoted 3 lines · Greg KH

Here are some patches that move the HID code to a new directory allowing it to be used by other kernel subsystems easier.

I pulled. However, I think the Kconfig changes are HORRIBLE.

I don't understand why people don't use "select" more. Why should Kconfig ask for "Generic HID support?" That question _never_ makes sense to a user. And if you answer "n", you'll not get USB_HID.

This is not user-friendly. If you need HID support, just select it. Don't ask people questions that make no sense. If the generic HID code is needed for some driver, you just select it. If it's not needed, you don't. It's that easy.

Linus

#2 lore raw

Hi Linus,

Quoted 5 lines
Quoted 2 lines

Here are some patches that move the HID code to a new directory allowing it to be used by other kernel subsystems easier.

I pulled. However, I think the Kconfig changes are HORRIBLE.

Quoted 8 lines

I don't understand why people don't use "select" more. Why should Kconfig ask for "Generic HID support?" That question _never_ makes sense to a user. And if you answer "n", you'll not get USB_HID.

This is not user-friendly. If you need HID support, just select it. Don't ask people questions that make no sense. If the generic HID code is needed for some driver, you just select it. If it's not needed, you don't. It's that easy.

since we don't have any user-space or out of kernel HID transport drivers at the moment it would make sense to simply select HID if someone selects USB_HID or the upcoming Bluetooth transport.

Regards

Marcel

author
#4 lore raw
In reply to Linus Torvalds
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Greg KH

Here are some patches that move the HID code to a new directory allowing it to be used by other kernel subsystems easier.

I pulled. However, I think the Kconfig changes are HORRIBLE.

Quoted 8 lines

I don't understand why people don't use "select" more. Why should Kconfig ask for "Generic HID support?" That question _never_ makes sense to a user. And if you answer "n", you'll not get USB_HID.

This is not user-friendly. If you need HID support, just select it. Don't ask people questions that make no sense. If the generic HID code is needed for some driver, you just select it. If it's not needed, you don't. It's that easy.

I think some people feel we are using "select" too much at times, so that is why it was done that way.

But in this case, yes, I do think it would make it easier for the user if it was changed. Jiri, care to make up a new patch that does this?

thanks,

greg k-h

#3 lore raw
In reply to Marcel Holtmann
Quoted 3 lines · Marcel Holtmann

since we don't have any user-space or out of kernel HID transport drivers at the moment it would make sense to simply select HID if someone selects USB_HID or the upcoming Bluetooth transport.

OK, I agree. Something like this? (applies on top of previous patches, or I could collapse all the Kconfig changes into one patch if desired)

Thanks.

[PATCH] Generic HID layer - build: USB_HID should select HID, not depend on it

Let CONFIG_USB_HID imply CONFIG_HID. Making it only dependent might confuse users to choose CONFIG_HID, but no particular HID transport drivers.

---
commit a94cfd7aa1df1e89b058d6eaf347ce94cd10ba71
tree b11cb076d4528603c8c11220691801231d6236c8
parent 3ecbf35f6a6b45ecbf03002da8dd6fe030196ed3
author Jiri Kosina <[email protected]> Fri, 08 Dec 2006 22:29:13 +0100 committer Jiri Kosina <[email protected]> Fri, 08 Dec 2006 22:29:13 +0100

 drivers/usb/input/Kconfig |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/usb/input/Kconfig +2 -1
index 8a62d47..e308f6d 100644
@@ -7,7 +7,8 @@ comment "USB Input Devices"
 config USB_HID
 	tristate "USB Human Interface Device (full HID) support"
 	default y
-	depends on USB && HID
+	depends on USB
+	select HID
 	---help---
 	  Say Y here if you want full HID support to connect USB keyboards,
 	  mice, joysticks, graphic tablets, or any other HID based devices
Signature · 1 line
Jiri Kosina