Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638363 > unrolled thread
| Started by | Michal Suchanek <msuchanek@suse.de> |
|---|---|
| First post | 2017-05-09 21:20 +0200 |
| Last post | 2017-05-10 12:50 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] macintosh: move mac_hid driver to input/mouse. Michal Suchanek <msuchanek@suse.de> - 2017-05-09 21:20 +0200
Re: [PATCH] macintosh: move mac_hid driver to input/mouse. Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-05-10 02:50 +0200
Re: [PATCH] macintosh: move mac_hid driver to input/mouse. Michal Suchánek <msuchanek@suse.de> - 2017-05-10 12:50 +0200
| From | Michal Suchanek <msuchanek@suse.de> |
|---|---|
| Date | 2017-05-09 21:20 +0200 |
| Subject | [PATCH] macintosh: move mac_hid driver to input/mouse. |
| Message-ID | <tFiPT-62w-5@gated-at.bofh.it> |
There is nothing mac-specific about this driver. Non-mac hardware with
suboptimal built-in pointer devices exists.
This makes it possible to use this emulation not only on x86 and ppc
notebooks but also on arm and mips.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
drivers/input/mouse/Kconfig | 20 ++++++++++++++++++++
drivers/input/mouse/Makefile | 1 +
drivers/{macintosh => input/mouse}/mac_hid.c | 0
drivers/macintosh/Kconfig | 17 -----------------
drivers/macintosh/Makefile | 1 -
5 files changed, 21 insertions(+), 18 deletions(-)
rename drivers/{macintosh => input/mouse}/mac_hid.c (100%)
diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
index 89ebb8f39fee..5533fd3a113f 100644
--- a/drivers/input/mouse/Kconfig
+++ b/drivers/input/mouse/Kconfig
@@ -12,6 +12,26 @@ menuconfig INPUT_MOUSE
if INPUT_MOUSE
+config MAC_EMUMOUSEBTN
+ tristate "Support for mouse button 2+3 emulation"
+ depends on SYSCTL && INPUT
+ help
+ This provides generic support for emulating the 2nd and 3rd mouse
+ button with keypresses. If you say Y here, the emulation is still
+ disabled by default. The emulation is controlled by these sysctl
+ entries:
+ /proc/sys/dev/mac_hid/mouse_button_emulation
+ /proc/sys/dev/mac_hid/mouse_button2_keycode
+ /proc/sys/dev/mac_hid/mouse_button3_keycode
+
+ If you have an Apple machine with a 1-button mouse, say Y here.
+
+ This emulation can be useful on notebooks with suboptimal touchpad
+ hardware as well.
+
+ To compile this driver as a module, choose M here: the
+ module will be called mac_hid.
+
config MOUSE_PS2
tristate "PS/2 mouse"
default y
diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
index 56bf0ad877c6..dfaad1dd8857 100644
--- a/drivers/input/mouse/Makefile
+++ b/drivers/input/mouse/Makefile
@@ -4,6 +4,7 @@
# Each configuration option enables a list of files.
+obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o
obj-$(CONFIG_MOUSE_AMIGA) += amimouse.o
obj-$(CONFIG_MOUSE_APPLETOUCH) += appletouch.o
obj-$(CONFIG_MOUSE_ATARI) += atarimouse.o
diff --git a/drivers/macintosh/mac_hid.c b/drivers/input/mouse/mac_hid.c
similarity index 100%
rename from drivers/macintosh/mac_hid.c
rename to drivers/input/mouse/mac_hid.c
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index 97a420c11eed..011df09c5167 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -159,23 +159,6 @@ config INPUT_ADBHID
If unsure, say Y.
-config MAC_EMUMOUSEBTN
- tristate "Support for mouse button 2+3 emulation"
- depends on SYSCTL && INPUT
- help
- This provides generic support for emulating the 2nd and 3rd mouse
- button with keypresses. If you say Y here, the emulation is still
- disabled by default. The emulation is controlled by these sysctl
- entries:
- /proc/sys/dev/mac_hid/mouse_button_emulation
- /proc/sys/dev/mac_hid/mouse_button2_keycode
- /proc/sys/dev/mac_hid/mouse_button3_keycode
-
- If you have an Apple machine with a 1-button mouse, say Y here.
-
- To compile this driver as a module, choose M here: the
- module will be called mac_hid.
-
config THERM_WINDTUNNEL
tristate "Support for thermal management on Windtunnel G4s"
depends on I2C && I2C_POWERMAC && PPC_PMAC && !PPC_PMAC64
diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile
index 516eb65bcacc..ab8b1e74d160 100644
--- a/drivers/macintosh/Makefile
+++ b/drivers/macintosh/Makefile
@@ -7,7 +7,6 @@
obj-$(CONFIG_PPC_PMAC) += macio_asic.o macio_sysfs.o
obj-$(CONFIG_PMAC_MEDIABAY) += mediabay.o
-obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o
obj-$(CONFIG_INPUT_ADBHID) += adbhid.o
obj-$(CONFIG_ANSLCD) += ans-lcd.o
--
2.10.2
[toc] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-05-10 02:50 +0200 |
| Message-ID | <tFnZg-Uf-17@gated-at.bofh.it> |
| In reply to | #1638363 |
Hi Michal,
On Tue, May 09, 2017 at 09:14:18PM +0200, Michal Suchanek wrote:
> There is nothing mac-specific about this driver. Non-mac hardware with
> suboptimal built-in pointer devices exists.
>
> This makes it possible to use this emulation not only on x86 and ppc
> notebooks but also on arm and mips.
I'd rather we did not promote from drivers/macintosh to other platforms,
but rather removed it. The same functionality can be done from
userspace.
What hardware do you believe would benefit from this and why?
Thanks.
>
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> drivers/input/mouse/Kconfig | 20 ++++++++++++++++++++
> drivers/input/mouse/Makefile | 1 +
> drivers/{macintosh => input/mouse}/mac_hid.c | 0
> drivers/macintosh/Kconfig | 17 -----------------
> drivers/macintosh/Makefile | 1 -
> 5 files changed, 21 insertions(+), 18 deletions(-)
> rename drivers/{macintosh => input/mouse}/mac_hid.c (100%)
>
> diff --git a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
> index 89ebb8f39fee..5533fd3a113f 100644
> --- a/drivers/input/mouse/Kconfig
> +++ b/drivers/input/mouse/Kconfig
> @@ -12,6 +12,26 @@ menuconfig INPUT_MOUSE
>
> if INPUT_MOUSE
>
> +config MAC_EMUMOUSEBTN
> + tristate "Support for mouse button 2+3 emulation"
> + depends on SYSCTL && INPUT
> + help
> + This provides generic support for emulating the 2nd and 3rd mouse
> + button with keypresses. If you say Y here, the emulation is still
> + disabled by default. The emulation is controlled by these sysctl
> + entries:
> + /proc/sys/dev/mac_hid/mouse_button_emulation
> + /proc/sys/dev/mac_hid/mouse_button2_keycode
> + /proc/sys/dev/mac_hid/mouse_button3_keycode
> +
> + If you have an Apple machine with a 1-button mouse, say Y here.
> +
> + This emulation can be useful on notebooks with suboptimal touchpad
> + hardware as well.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called mac_hid.
> +
> config MOUSE_PS2
> tristate "PS/2 mouse"
> default y
> diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
> index 56bf0ad877c6..dfaad1dd8857 100644
> --- a/drivers/input/mouse/Makefile
> +++ b/drivers/input/mouse/Makefile
> @@ -4,6 +4,7 @@
>
> # Each configuration option enables a list of files.
>
> +obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o
> obj-$(CONFIG_MOUSE_AMIGA) += amimouse.o
> obj-$(CONFIG_MOUSE_APPLETOUCH) += appletouch.o
> obj-$(CONFIG_MOUSE_ATARI) += atarimouse.o
> diff --git a/drivers/macintosh/mac_hid.c b/drivers/input/mouse/mac_hid.c
> similarity index 100%
> rename from drivers/macintosh/mac_hid.c
> rename to drivers/input/mouse/mac_hid.c
> diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
> index 97a420c11eed..011df09c5167 100644
> --- a/drivers/macintosh/Kconfig
> +++ b/drivers/macintosh/Kconfig
> @@ -159,23 +159,6 @@ config INPUT_ADBHID
>
> If unsure, say Y.
>
> -config MAC_EMUMOUSEBTN
> - tristate "Support for mouse button 2+3 emulation"
> - depends on SYSCTL && INPUT
> - help
> - This provides generic support for emulating the 2nd and 3rd mouse
> - button with keypresses. If you say Y here, the emulation is still
> - disabled by default. The emulation is controlled by these sysctl
> - entries:
> - /proc/sys/dev/mac_hid/mouse_button_emulation
> - /proc/sys/dev/mac_hid/mouse_button2_keycode
> - /proc/sys/dev/mac_hid/mouse_button3_keycode
> -
> - If you have an Apple machine with a 1-button mouse, say Y here.
> -
> - To compile this driver as a module, choose M here: the
> - module will be called mac_hid.
> -
> config THERM_WINDTUNNEL
> tristate "Support for thermal management on Windtunnel G4s"
> depends on I2C && I2C_POWERMAC && PPC_PMAC && !PPC_PMAC64
> diff --git a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile
> index 516eb65bcacc..ab8b1e74d160 100644
> --- a/drivers/macintosh/Makefile
> +++ b/drivers/macintosh/Makefile
> @@ -7,7 +7,6 @@
> obj-$(CONFIG_PPC_PMAC) += macio_asic.o macio_sysfs.o
>
> obj-$(CONFIG_PMAC_MEDIABAY) += mediabay.o
> -obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o
> obj-$(CONFIG_INPUT_ADBHID) += adbhid.o
> obj-$(CONFIG_ANSLCD) += ans-lcd.o
>
> --
> 2.10.2
>
--
Dmitry
[toc] | [prev] | [next] | [standalone]
| From | Michal Suchánek <msuchanek@suse.de> |
|---|---|
| Date | 2017-05-10 12:50 +0200 |
| Message-ID | <tFxlT-82s-3@gated-at.bofh.it> |
| In reply to | #1638476 |
On 2017-05-10 02:43, Dmitry Torokhov wrote: > Hi Michal, > > On Tue, May 09, 2017 at 09:14:18PM +0200, Michal Suchanek wrote: >> There is nothing mac-specific about this driver. Non-mac hardware with >> suboptimal built-in pointer devices exists. >> >> This makes it possible to use this emulation not only on x86 and ppc >> notebooks but also on arm and mips. > > I'd rather we did not promote from drivers/macintosh to other > platforms, > but rather removed it. The same functionality can be done from > userspace. Why do we even have drivers/input? What in there cannot be done in userspace? We can just remove everything but uinput, right? > > What hardware do you believe would benefit from this and why? Many notebooks have built-in touchpad that has only two buttons, no or limited multitouch and is not built in a way that allows pressing both buttons together to trigger the X11 middle button emulation. This is a facility that exists in the kernel already and allows mapping the missing button(s) to keys near the touchpad. Easy, works with anything that uses the Linux input events (ie does not depend on X11). Thanks Michal
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web