* [Bluez-devel] [PATCH] hidraw support for Bluetooth HID devices
@ 2008-02-13 13:37 pascal
2008-02-13 13:40 ` Marcel Holtmann
0 siblings, 1 reply; 3+ messages in thread
From: pascal @ 2008-02-13 13:37 UTC (permalink / raw)
To: bluez-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-devel] [PATCH] hidraw support for Bluetooth HID devices
2008-02-13 13:37 [Bluez-devel] [PATCH] hidraw support for Bluetooth HID devices pascal
@ 2008-02-13 13:40 ` Marcel Holtmann
2008-02-13 14:46 ` [Bluez-devel] [PATCH] bluetooth: " pascal
0 siblings, 1 reply; 3+ messages in thread
From: Marcel Holtmann @ 2008-02-13 13:40 UTC (permalink / raw)
To: BlueZ development
Hi Pascal,
> 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.
it misses a Signed-off-by line.
> --- 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>
This looks like your editor can't handle inline very well.
Regards
Marcel
-------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bluez-devel] [PATCH] bluetooth: hidraw support for Bluetooth HID devices
2008-02-13 13:40 ` Marcel Holtmann
@ 2008-02-13 14:46 ` pascal
0 siblings, 0 replies; 3+ messages in thread
From: pascal @ 2008-02-13 14:46 UTC (permalink / raw)
To: bluez-devel
From: "Pascal A. Brisset" <pascal@pabr.org>
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.
Signed-off-by: "Pascal A. Brisset" <pascal@pabr.org>
--- linux-2.6.24.2/net/bluetooth/hidp/core.c.orig 2008-02-13 15:18:41.000000000 +0100
+++ linux-2.6.24.2/net/bluetooth/hidp/core.c 2008-02-13 15:17:27.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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-13 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 13:37 [Bluez-devel] [PATCH] hidraw support for Bluetooth HID devices pascal
2008-02-13 13:40 ` Marcel Holtmann
2008-02-13 14:46 ` [Bluez-devel] [PATCH] bluetooth: " pascal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox