From: pascal@pabr.org
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] [PATCH] hidraw support for Bluetooth HID devices
Date: Wed, 13 Feb 2008 14:37:08 +0100 [thread overview]
Message-ID: <fourq4$ivu$1@ger.gmane.org> (raw)
This patch exposes Bluetooth HID peripherals to userspace
through the hidraw API, in addition to the input subsystem.
This improves consistency between hidp and usbhid.
--- linux-2.6.24.2/net/bluetooth/hidp/core.c.orig 2008-02-13 13:28:26.000000000 +0100
+++ linux-2.6.24.2/net/bluetooth/hidp/core.c 2008-02-13 14:19:29.000000000 +0100
@@ -40,6 +40,7 @@
#include <linux/input.h>
#include <linux/hid.h>
+#include <linux/hidraw.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
@@ -589,6 +590,8 @@ static int hidp_session(void *arg)
if (session->hid) {
if (session->hid->claimed & HID_CLAIMED_INPUT)
hidinput_disconnect(session->hid);
+ if (session->hid->claimed & HID_CLAIMED_HIDRAW)
+ hidraw_disconnect(session->hid);
hid_free_device(session->hid);
}
@@ -741,6 +744,8 @@ static inline void hidp_setup_hid(struct
if (hidinput_connect(hid) == 0)
hid->claimed |= HID_CLAIMED_INPUT;
+ if (hidraw_connect(hid) == 0)
+ hid->claimed |= HID_CLAIMED_HIDRAW;
}
int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock, struct socket *intr_sock)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2008-02-13 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-13 13:37 pascal [this message]
2008-02-13 13:40 ` [Bluez-devel] [PATCH] hidraw support for Bluetooth HID devices Marcel Holtmann
2008-02-13 14:46 ` [Bluez-devel] [PATCH] bluetooth: " pascal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='fourq4$ivu$1@ger.gmane.org' \
--to=pascal@pabr.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.