2006-01-16 10:33:44

by Olaf Hering

[permalink] [raw]
Subject: Re: Input: HID - add support for fn key on Apple PowerBooks

On Sat, Jan 14, Linux Kernel Mailing List wrote:

> tree 8ba37791bfeb95e660caf6192c8dcecd9ba2aa6e
> parent 1e27ffd4d7d39783c5196daa2584cca5785d1f95
> author Michael Hanselmann <[email protected]> Sat, 14 Jan 2006 20:08:06 -0500
> committer Dmitry Torokhov <[email protected]> Sat, 14 Jan 2006 20:08:06 -0500
>
> Input: HID - add support for fn key on Apple PowerBooks
>
> This patch implements support for the fn key on Apple PowerBooks using
> USB based keyboards and makes them behave like their ADB counterparts.
>
> Signed-off-by: Michael Hanselmann <[email protected]>
> Acked-by: Rene Nussbaumer <[email protected]>
> Acked-by: Johannes Berg <[email protected]>
> Acked-by: Benjamin Herrenschmidt <[email protected]>
> Acked-by: Vojtech Pavlik <[email protected]>
> Signed-off-by: Dmitry Torokhov <[email protected]>
>
> drivers/usb/input/Kconfig | 10 ++
> drivers/usb/input/hid-core.c | 8 ++
> drivers/usb/input/hid-input.c | 166 +++++++++++++++++++++++++++++++++++++++++-
> drivers/usb/input/hid.h | 31 ++++---
> 4 files changed, 201 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
> index 509dd0a..5246b35 100644
> --- a/drivers/usb/input/Kconfig
> +++ b/drivers/usb/input/Kconfig
> @@ -37,6 +37,16 @@ config USB_HIDINPUT
>
> If unsure, say Y.
>
> +config USB_HIDINPUT_POWERBOOK
> + bool "Enable support for iBook/PowerBook special keys"
> + default n
> + depends on USB_HIDINPUT
> + help
> + Say Y here if you want support for the special keys (Fn, Numlock) on
> + Apple iBooks and PowerBooks.

Should this depend on CONFIG_$powerbook?

--
short story of a lazy sysadmin:
alias appserv=wotan


2006-01-16 10:44:22

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Input: HID - add support for fn key on Apple PowerBooks

On Mon, Jan 16, 2006 at 11:33:41AM +0100, Olaf Hering wrote:

> > diff --git a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
> > index 509dd0a..5246b35 100644
> > --- a/drivers/usb/input/Kconfig
> > +++ b/drivers/usb/input/Kconfig
> > @@ -37,6 +37,16 @@ config USB_HIDINPUT
> >
> > If unsure, say Y.
> >
> > +config USB_HIDINPUT_POWERBOOK
> > + bool "Enable support for iBook/PowerBook special keys"
> > + default n
> > + depends on USB_HIDINPUT
> > + help
> > + Say Y here if you want support for the special keys (Fn, Numlock) on
> > + Apple iBooks and PowerBooks.
>
> Should this depend on CONFIG_$powerbook?

It could, but will still compile and not cause any trouble on
non-powerbooks, so there isn't much reason to restrict it.

--
Vojtech Pavlik
SuSE Labs, SuSE CR

2006-01-16 23:20:08

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: Input: HID - add support for fn key on Apple PowerBooks

On Mon, 2006-01-16 at 11:33 +0100, Olaf Hering wrote:

> Should this depend on CONFIG_$powerbook?

Except that there is no such thing :) there is the CONFIG_PMAC_PBOOK
thing but that will be going away soon as it's over abused.

You may want to make it CONFIG_PPC_PMAC if you want, but it doesn't
really matter as the option will not cause any problem on non-powerbook
and it will still build. Beside, who knows, it might even end up being
useful on the Intel Macs if Linux ever runs on them :)

Ben.