* - bluetooth-hid-quirks-mightymouse-quirk.patch removed from -mm tree
@ 2007-03-27 20:22 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2007-03-27 20:22 UTC (permalink / raw)
To: jikos, jkosina, mm-commits
The patch titled
bluetooth hid quirks: mightymouse quirk
has been removed from the -mm tree. Its filename was
bluetooth-hid-quirks-mightymouse-quirk.patch
This patch was dropped because an updated version will be merged
------------------------------------------------------
Subject: bluetooth hid quirks: mightymouse quirk
From: Jiri Kosina <jikos@jikos.cz>
I have a bugreport that scrollwheel of bluetooth version of apple
mightymouse doesn't work. The USB version of mightymouse works, as there
is a quirk for handling scrollwheel in hid/usbhid for it.
Now that bluetooth git tree is hooked to generic hid layer, it could easily
use the quirks which are already present in generic hid parser, hid-input,
etc.
Below is a simple patch against bluetooth git tree, which adds quirk
handling to current bluetooth hidp code, and sets quirk flags for device
0x05ac/0x030c, which is the bluetooth version of the apple mightymouse.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
net/bluetooth/hidp/core.c | 13 +++++++++++++
net/bluetooth/hidp/hidp.h | 17 +++++++++++++++++
2 files changed, 30 insertions(+)
diff -puN net/bluetooth/hidp/core.c~bluetooth-hid-quirks-mightymouse-quirk net/bluetooth/hidp/core.c
--- a/net/bluetooth/hidp/core.c~bluetooth-hid-quirks-mightymouse-quirk
+++ a/net/bluetooth/hidp/core.c
@@ -679,6 +679,17 @@ static void hidp_close(struct hid_device
{
}
+static void hidp_setup_quirks(struct hid_device *hid)
+{
+ unsigned int n;
+
+ for (n = 0; hid_blacklist[n].idVendor; n++)
+ if ((hid_blacklist[n].idVendor == le16_to_cpu(hid->vendor)) &&
+ (hid_blacklist[n].idProduct == le16_to_cpu(hid->product)))
+ hid->quirks = hid_blacklist[n].quirks;
+
+}
+
static inline void hidp_setup_hid(struct hidp_session *session, struct hidp_connadd_req *req)
{
struct hid_device *hid = session->hid;
@@ -708,6 +719,8 @@ static inline void hidp_setup_hid(struct
hid->hidinput_input_event = hidp_hidinput_event;
+ hidp_setup_quirks(hid);
+
list_for_each_entry(report, &hid->report_enum[HID_INPUT_REPORT].report_list, list)
hidp_send_report(session, report);
diff -puN net/bluetooth/hidp/hidp.h~bluetooth-hid-quirks-mightymouse-quirk net/bluetooth/hidp/hidp.h
--- a/net/bluetooth/hidp/hidp.h~bluetooth-hid-quirks-mightymouse-quirk
+++ a/net/bluetooth/hidp/hidp.h
@@ -23,6 +23,7 @@
#ifndef __HIDP_H
#define __HIDP_H
+#include <linux/hid.h>
#include <linux/types.h>
#include <net/bluetooth/bluetooth.h>
@@ -166,4 +167,20 @@ static inline void hidp_schedule(struct
extern int __init hidp_init_sockets(void);
extern void __exit hidp_cleanup_sockets(void);
+/* HID blacklist and quirk entries */
+
+#define BT_VENDOR_ID_APPLE 0x05ac
+#define BT_DEVICE_ID_APPLE_MIGHTYMOUSE 0x030c
+
+static const struct hid_blacklist {
+ __u16 idVendor;
+ __u16 idProduct;
+ unsigned quirks;
+} hid_blacklist[] = {
+
+ { BT_VENDOR_ID_APPLE, BT_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
+
+ { 0, 0 }
+};
+
#endif /* __HIDP_H */
_
Patches currently in -mm which might be from jikos@jikos.cz are
bluetooth-hid-quirks-mightymouse-quirk.patch
statistics-infrastructure-make-printk_clock-a-generic-kernel-wide-nsec-resolution.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-27 20:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27 20:22 - bluetooth-hid-quirks-mightymouse-quirk.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.