diff mbox

[RFC] HID: Stop hiding options with !EXPERT

Message ID 20140321094636.66fc62f2@endymion.delvare (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Jean Delvare March 21, 2014, 8:46 a.m. UTC
Many HID driver options are hidden unless EXPERT is set. While I
understand the idea of simplifying the kernel configuration for most
users, in practice I believe it adds more confusion than it helps.

One thing that worries me is that, in non-EXPERT mode, these drivers
will be either built-in or modular based on apparent magic. For
example, switching INPUT and HID from m to y will cause all these
drivers to be built into the kernel when they were previously built
as modules. Short of enabling EXPERT mode altogether, the user has no
control over that.

Generally I do not think tristate options should depend on !EXPERT.
Of these, 11 of 15 are currently in the hid subsystem.

The HID_LOGITECH option is even worse than the others. Sub-options
depend on it, and this causes menuconfig and friends to display the
option even though the user can't change its value. The help page for
HID_LOGITECH will not explain why the value can't be changed. It only
says, for example:

  Depends on: INPUT [=y] && HID [=y]

and that leaves the user puzzled about why the option is forced to y.
You might argue that this is a Kconfig bug, but that doesn't make it
less annoying for the user.

Even worse is that some of the sub-options of HID_LOGITECH select
INPUT_FF_MEMLESS, which in turn gets out of control for the user. So,
if you set INPUT=y and HID=y (something most general purpose
distributions would do these days, as both modules would get loaded on
a vast majority of systems otherwise), and you want support for
force-feedback game controllers, you can't have that as a module, it
has to be built-in, regardless of how rare these devices are.

Of course, all this madness goes away once EXPERT is enabled, but then
the rest of the kernel configuration becomes more complex, which
totally voids the original point.

For this reason, I would like all HID device tristate options to be
displayed regardless of EXPERT being set or not. We can let the
default settings still depend on EXPERT, that's not intrusive.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Jiri Kosina <jkosina@suse.cz>
---
 drivers/hid/Kconfig |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

Comments

Jiri Kosina March 28, 2014, 10:13 p.m. UTC | #1
On Fri, 21 Mar 2014, Jean Delvare wrote:

> Many HID driver options are hidden unless EXPERT is set. While I
> understand the idea of simplifying the kernel configuration for most
> users, in practice I believe it adds more confusion than it helps.

Hi Jean,

actually this question has been raised by several people in the past 
already. Copy/pasting the latest reply I have sent on this topic

===
mostly this is because we don't want to bother users with asking for every
single quirky device/vendor, as there are unfortunately a lot of them.
Usually compiling everything in doesn't waste runtime footprint (the
modules don't get loaded unless needed), and they don't cost too much disk
space either.
And if you really want to disable them, CONFIG_EMBEDDED allows you to do
that.

Please see last paragraph on

	https://lkml.org/lkml/2008/10/14/266

===

i.e. it was explicitly requested by Linus.

That's the history.

Now, admittedly, it was quite some time ago, and HID world has matured a 
lot since then, so the 'quirks' turned out into proper drivers. So maybe 
there indeed might be a good time to try it again.
Jean Delvare March 29, 2014, 2:06 p.m. UTC | #2
Hi Jiri,

On Fri, 28 Mar 2014 15:13:39 -0700 (PDT), Jiri Kosina wrote:
> On Fri, 21 Mar 2014, Jean Delvare wrote:
> 
> > Many HID driver options are hidden unless EXPERT is set. While I
> > understand the idea of simplifying the kernel configuration for most
> > users, in practice I believe it adds more confusion than it helps.
> 
> actually this question has been raised by several people in the past 
> already. Copy/pasting the latest reply I have sent on this topic
> 
> ===
> mostly this is because we don't want to bother users with asking for every
> single quirky device/vendor, as there are unfortunately a lot of them.
> Usually compiling everything in doesn't waste runtime footprint (the
> modules don't get loaded unless needed), and they don't cost too much disk
> space either.

The problem is that the hidden options may end up built-in, not
modular, in which case they are actually wasting runtime footprint, and
polluting /sys/bus/hid/drivers.

> And if you really want to disable them, CONFIG_EMBEDDED allows you to do
> that.

True, but CONFIG_EMBEDDED / CONFIG_EXPERT are tree-wide settings.
Enabling them un-hides a lot more options than just these HID drivers.
Not everyone wants that.

Other subsystems have solved the problem with specific options, which
give the user more flexibility over which areas he/she wants to
fine-tune. See for example CONFIG_I2C_HELPER_AUTO and
CONFIG_MEDIA_SUBDRV_AUTOSELECT. That might be an alternative if you
really think that these drivers entries should be hidden by default (I
don't.)

> Please see last paragraph on
> 
> 	https://lkml.org/lkml/2008/10/14/266
> 
> ===
> 
> i.e. it was explicitly requested by Linus.
> 
> That's the history.

Well, I see that Linus was mostly unhappy because the of the new
warnings introduced by the change. Plus...

> Now, admittedly, it was quite some time ago, and HID world has matured a 
> lot since then, so the 'quirks' turned out into proper drivers. So maybe 
> there indeed might be a good time to try it again.

... these were boolean quirks, and IIRC everything ended up being built
in the same module. So the discussion was relevant back then.

Now we have separate drivers, controlled by tristate options. This is a
completely different situation.

Also, many drivers were added since then. I doubt that hiding 11
drivers, while about 50 are always presented to the user, really helps
easing the configuration, if that was the actual goal.

In fact, looking at the git history, I can see that more drivers used
to depend on CONFIG_EMBEDDED / CONFIG_EXPERT, and these dependencies
were removed over time:

commit 4b186f72033611c2b526c7341534e71ee4afd222
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Wed Dec 23 13:12:32 2009 +0100

    HID: make 3M PCT touchscreen driver standalone config option

commit 92688c0c3c1c9e2daf705d307e8fda1b5a180d26
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Mon Jan 4 12:04:59 2010 +0100

    HID: make Stantum driver standalone config option

commit 2dbf209d7a7ab94266b936bd2da6a4026c279992
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Wed Feb 3 16:11:12 2010 +0100

    HID: make full-fledged hid-bus drivers properly selectable

commit 23d386d85a9144612c4a13733aa1ca6e5a21f4a2
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Mon Mar 22 16:33:15 2010 +0100

    HID: fixup Kconfig entry for Roccat Kone

commit 95736de984dec5b80ea9d6640d4d55ca8ff98db4
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Wed May 12 15:27:00 2010 +0200

    HID: make Prodikeys driver standalone config option

commit 73d5e8f77e88a4d3a154dfdbb4ed2cf461b7bf21
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Fri May 21 13:15:17 2010 +0200

    HID: fix up 'EMBEDDED' mess in Kconfig

commit f36ee074d5d563a832fbfc378207739db3a0a205
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Mon Aug 9 19:56:01 2010 +0200

    HID: uclogic: fix up Kconfig entry

commit dfe9a31211c0a3a0252af6c87935d7ac718aadf9
Author: Jiri Kosina <jkosina@suse.cz>
Date:   Mon Oct 17 17:04:58 2011 +0200

    HID: primax: remove spurious dependency

commit 22ca20b250f5c9672a53b34f032f43dd2c4a4aaf
Author: Nikolai Kondrashov <spbnick@gmail.com>
Date:   Tue Feb 28 13:01:46 2012 +0200

    HID: kye: Add support for 3 tablets

And I may have missed some. So all I am really asking here, is that we
finish a cleanup that already started over 4 years ago.

If this is really only a question of which devices are more likely to
be used by a large number of users, then that's what defaults are for.

Thanks,
diff mbox

Patch

--- linux-3.14-rc7.orig/drivers/hid/Kconfig	2014-03-20 21:06:41.457316973 +0100
+++ linux-3.14-rc7/drivers/hid/Kconfig	2014-03-20 21:06:59.861752396 +0100
@@ -91,7 +91,7 @@  menu "Special HID drivers"
 	depends on HID
 
 config HID_A4TECH
-	tristate "A4 tech mice" if EXPERT
+	tristate "A4 tech mice"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -112,7 +112,7 @@  config HID_ACRUX_FF
 	game controllers.
 
 config HID_APPLE
-	tristate "Apple {i,Power,Mac}Books" if EXPERT
+	tristate "Apple {i,Power,Mac}Books"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -140,21 +140,21 @@  config HID_AUREAL
 	Support for Aureal Cy se W-01RN Remote Controller and other Aureal derived remotes.
 
 config HID_BELKIN
-	tristate "Belkin Flip KVM and Wireless keyboard" if EXPERT
+	tristate "Belkin Flip KVM and Wireless keyboard"
 	depends on HID
 	default !EXPERT
 	---help---
 	Support for Belkin Flip KVM and Wireless keyboard.
 
 config HID_CHERRY
-	tristate "Cherry Cymotion keyboard" if EXPERT
+	tristate "Cherry Cymotion keyboard"
 	depends on HID
 	default !EXPERT
 	---help---
 	Support for Cherry Cymotion keyboard.
 
 config HID_CHICONY
-	tristate "Chicony Tactical pad" if EXPERT
+	tristate "Chicony Tactical pad"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -176,7 +176,7 @@  config HID_PRODIKEYS
 	  and some additional multimedia keys.
 
 config HID_CYPRESS
-	tristate "Cypress mouse and barcode readers" if EXPERT
+	tristate "Cypress mouse and barcode readers"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -225,7 +225,7 @@  config HID_ELO
 	different devices than those handled by CONFIG_TOUCHSCREEN_USB_ELO.
 
 config HID_EZKEY
-	tristate "Ezkey BTC 8193 keyboard" if EXPERT
+	tristate "Ezkey BTC 8193 keyboard"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -310,7 +310,7 @@  config HID_TWINHAN
 	Support for Twinhan IR remote control.
 
 config HID_KENSINGTON
-	tristate "Kensington Slimblade Trackball" if EXPERT
+	tristate "Kensington Slimblade Trackball"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -336,7 +336,7 @@  config HID_LENOVO_TPKBD
 	controlling the mute and microphone mute LEDs.
 
 config HID_LOGITECH
-	tristate "Logitech devices" if EXPERT
+	tristate "Logitech devices"
 	depends on HID
 	default !EXPERT
 	---help---
@@ -413,14 +413,14 @@  config HID_MAGICMOUSE
 	Apple Wireless "Magic" Mouse and the Apple Wireless "Magic" Trackpad.
 
 config HID_MICROSOFT
-	tristate "Microsoft non-fully HID-compliant devices" if EXPERT
+	tristate "Microsoft non-fully HID-compliant devices"
 	depends on HID
 	default !EXPERT
 	---help---
 	Support for Microsoft devices that are not fully compliant with HID standard.
 
 config HID_MONTEREY
-	tristate "Monterey Genius KB29E keyboard" if EXPERT
+	tristate "Monterey Genius KB29E keyboard"
 	depends on HID
 	default !EXPERT
 	---help---