2008-11-26 15:05:46

by Jan Scholz

[permalink] [raw]
Subject: [PATCH 0/1] HID: hid_apple is not used for apple alu wireless keyboards

Hi Jiri,

While parsing 'hid_blacklist' in hid-core.c my apple alu wireless
keyboard is not found. This happens because in the blacklist it
is declared with HID_USB_DEVICE although the keyboards are really
bluetooth devices. The same holds for 'apple_devices' list in
hid-apple.c

This patch fixes it by changing HID_USB_DEVICE to
HID_BLUETOOTH_DEVICE in those two lists.

Jan Scholz (1):
HID: Apple alu wireless keyboards are bluetooth devices

drivers/hid/hid-apple.c | 6 +++---
drivers/hid/hid-core.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)


2008-11-26 14:54:24

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices

On Wed, 26 Nov 2008, Jan Scholz wrote:

> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
> wireless keyboards
> Signed-off-by: Jan Scholz <[email protected]>
> ---
> drivers/hid/hid-apple.c | 6 +++---
> drivers/hid/hid-core.c | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index 9b97795..aa28aed 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> APPLE_RDESC_JIS },
> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> APPLE_ISO_KEYBOARD },
> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
> .driver_data = APPLE_HAS_FN },

Hi Jan,

shouldn't we rather have both USB and Bluetooth variants?

Thanks,

--
Jiri Kosina
SUSE Labs

2008-11-26 15:04:55

by Jan Scholz

[permalink] [raw]
Subject: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices

Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
wireless keyboards

Signed-off-by: Jan Scholz <[email protected]>
---
drivers/hid/hid-apple.c | 6 +++---
drivers/hid/hid-core.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 9b97795..aa28aed 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
APPLE_RDESC_JIS },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
APPLE_ISO_KEYBOARD },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
.driver_data = APPLE_HAS_FN },
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 147ec59..98c7e2d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1241,9 +1241,9 @@ static const struct hid_device_id hid_blacklist[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) },
--
1.6.0.4

2008-11-26 15:18:17

by Jan Scholz

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices

Jiri Kosina <[email protected]> writes:

> On Wed, 26 Nov 2008, Jan Scholz wrote:
>
>> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
>> wireless keyboards
>> Signed-off-by: Jan Scholz <[email protected]>
>> ---
>> drivers/hid/hid-apple.c | 6 +++---
>> drivers/hid/hid-core.c | 6 +++---
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
>> index 9b97795..aa28aed 100644
>> --- a/drivers/hid/hid-apple.c
>> +++ b/drivers/hid/hid-apple.c
>> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
>> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>> APPLE_RDESC_JIS },
>> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
>> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>> APPLE_ISO_KEYBOARD },
>> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
>> .driver_data = APPLE_HAS_FN },
>
> Hi Jan,
>
> shouldn't we rather have both USB and Bluetooth variants?
>
> Thanks,

Hi Jiri,

Hm, I thought the USB_DEVICE_ID_APPLE_ALU_{ANSI,ISO,JIS} were apples usb
aluminum keyboards (standard desktop size), while the
USB_DEVICE_ID_APPLE_ALU_WIRELESS_{ANSI,ISO,JIS} ones were the aluminum
bluetooth keyboards (notebook sized, no numeric keypad, etc).

The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
with bluetooth, unfortunately I don't have access to a usb variant.

Jan

2008-11-26 15:33:59

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices

On Wed, 26 Nov 2008, Jan Scholz wrote:

> Jiri Kosina <[email protected]> writes:
>
> > On Wed, 26 Nov 2008, Jan Scholz wrote:
> >
> >> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
> >> wireless keyboards
> >> Signed-off-by: Jan Scholz <[email protected]>
> >> ---
> >> drivers/hid/hid-apple.c | 6 +++---
> >> drivers/hid/hid-core.c | 6 +++---
> >> 2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> >> index 9b97795..aa28aed 100644
> >> --- a/drivers/hid/hid-apple.c
> >> +++ b/drivers/hid/hid-apple.c
> >> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
> >> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> >> APPLE_RDESC_JIS },
> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> >> APPLE_ISO_KEYBOARD },
> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> >> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
> >> .driver_data = APPLE_HAS_FN },
> >
> > Hi Jan,
> >
> > shouldn't we rather have both USB and Bluetooth variants?
> >
> > Thanks,
>
> Hi Jiri,
>
> Hm, I thought the USB_DEVICE_ID_APPLE_ALU_{ANSI,ISO,JIS} were apples usb
> aluminum keyboards (standard desktop size), while the
> USB_DEVICE_ID_APPLE_ALU_WIRELESS_{ANSI,ISO,JIS} ones were the aluminum
> bluetooth keyboards (notebook sized, no numeric keypad, etc).
>
> The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
> with bluetooth, unfortunately I don't have access to a usb variant.

Tobias Mueller added these device IDs, so persumably he has tested it and
could provide some insight. I don't have the hardware myself, so I have no
idea whether there are only Bluetooht variants, or even USB are available.

Tobias?

Thanks,

--
Jiri Kosina
SUSE Labs

2008-11-26 16:35:55

by J.R. Mauro

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices

On Wed, Nov 26, 2008 at 10:33 AM, Jiri Kosina <[email protected]> wrote:
> On Wed, 26 Nov 2008, Jan Scholz wrote:
>
>> Jiri Kosina <[email protected]> writes:
>>
>> > On Wed, 26 Nov 2008, Jan Scholz wrote:
>> >
>> >> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
>> >> wireless keyboards
>> >> Signed-off-by: Jan Scholz <[email protected]>
>> >> ---
>> >> drivers/hid/hid-apple.c | 6 +++---
>> >> drivers/hid/hid-core.c | 6 +++---
>> >> 2 files changed, 6 insertions(+), 6 deletions(-)
>> >>
>> >> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
>> >> index 9b97795..aa28aed 100644
>> >> --- a/drivers/hid/hid-apple.c
>> >> +++ b/drivers/hid/hid-apple.c
>> >> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
>> >> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
>> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>> >> APPLE_RDESC_JIS },
>> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
>> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
>> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>> >> APPLE_ISO_KEYBOARD },
>> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>> >> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
>> >> .driver_data = APPLE_HAS_FN },
>> >
>> > Hi Jan,
>> >
>> > shouldn't we rather have both USB and Bluetooth variants?
>> >
>> > Thanks,
>>
>> Hi Jiri,
>>
>> Hm, I thought the USB_DEVICE_ID_APPLE_ALU_{ANSI,ISO,JIS} were apples usb
>> aluminum keyboards (standard desktop size), while the
>> USB_DEVICE_ID_APPLE_ALU_WIRELESS_{ANSI,ISO,JIS} ones were the aluminum
>> bluetooth keyboards (notebook sized, no numeric keypad, etc).
>>
>> The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
>> with bluetooth, unfortunately I don't have access to a usb variant.
>
> Tobias Mueller added these device IDs, so persumably he has tested it and
> could provide some insight. I don't have the hardware myself, so I have no
> idea whether there are only Bluetooht variants, or even USB are available.

There is one bluetooth model and one USB model.

>
> Tobias?
>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2008-11-26 21:15:59

by Tobias Müller

[permalink] [raw]
Subject: Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices

>> The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
>> with bluetooth, unfortunately I don't have access to a usb variant.
>
> Tobias Mueller added these device IDs, so persumably he has tested it and
> could provide some insight. I don't have the hardware myself, so I have no
> idea whether there are only Bluetooht variants, or even USB are available.
>
> Tobias?

I own the USB variant and these are the right id for that. The wireless
IDs were from another patch I merged together with mine. I don't have a
wireless version.

Regards
Tobias

2008-11-27 00:57:34

by Jiri Kosina

[permalink] [raw]
Subject: Re: several messages

On Wed, 26 Nov 2008, J.R. Mauro wrote:

> There is one bluetooth model and one USB model.

On Wed, 26 Nov 2008, Tobias M?ller wrote:

> I own the USB variant and these are the right id for that. The wireless
> IDs were from another patch I merged together with mine. I don't have a
> wireless version.

OK, so therefore you confirm that Jan's patch is OK, right?

Thanks a lot,

--
Jiri Kosina
SUSE Labs

2008-11-28 14:11:30

by Jiri Kosina

[permalink] [raw]
Subject: Re: [PATCH 0/1] HID: hid_apple is not used for apple alu wireless keyboards

On Wed, 26 Nov 2008, Jan Scholz wrote:

> While parsing 'hid_blacklist' in hid-core.c my apple alu wireless
> keyboard is not found. This happens because in the blacklist it
> is declared with HID_USB_DEVICE although the keyboards are really
> bluetooth devices. The same holds for 'apple_devices' list in
> hid-apple.c
> This patch fixes it by changing HID_USB_DEVICE to
> HID_BLUETOOTH_DEVICE in those two lists.

OK, I have done some googling in addition to what Tobias and J.R. have
written, and your patch seems to be indeed the correct thing to do for
these three product IDs. So I have queued it in my tree for 2.6.28,
thanks.

--
Jiri Kosina
SUSE Labs

2008-11-28 14:48:54

by J.R. Mauro

[permalink] [raw]
Subject: Re: [PATCH 0/1] HID: hid_apple is not used for apple alu wireless keyboards



On Nov 28, 2008, at 9:11, Jiri Kosina <[email protected]> wrote:

> On Wed, 26 Nov 2008, Jan Scholz wrote:
>
>> While parsing 'hid_blacklist' in hid-core.c my apple alu wireless
>> keyboard is not found. This happens because in the blacklist it
>> is declared with HID_USB_DEVICE although the keyboards are really
>> bluetooth devices. The same holds for 'apple_devices' list in
>> hid-apple.c
>> This patch fixes it by changing HID_USB_DEVICE to
>> HID_BLUETOOTH_DEVICE in those two lists.
>
> OK, I have done some googling in addition to what Tobias and J.R. have
> written, and your patch seems to be indeed the correct thing to do for
> these three product IDs. So I have queued it in my tree for 2.6.28,
> thanks.

Jiri,

I can test this patch hopefully next week on the wireless keyboard.
I'll let you know of any issues.

Thanks,
J.R.


>
>
> --
> Jiri Kosina
> SUSE Labs