linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
To: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
Cc: linux-input <linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	BlueZ development
	<linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	mjg <mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Peter Hutterer
	<peter.hutterer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	zap-ez6wqqBRKvoox3rIn2DAYQ@public.gmane.org
Subject: Re: RFC: Wacom Bluetooth HID driver, first pass
Date: Mon, 16 Mar 2009 14:29:59 +0000	[thread overview]
Message-ID: <1237213799.32264.10090.camel@cookie.hadess.net> (raw)
In-Reply-To: <93531296-64B0-4D4B-A4A9-26F3D67DF579-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>

On Mon, 2009-03-16 at 15:00 +0100, Marcel Holtmann wrote:
> Hi Bastien,
> 
> >> This is a first pass at a driver for the Wacom Graphire Bluetooth
> >> tablet, based on work by Andrew Zabolotny[1]. It's mildly tested  
> >> (eg. it
> >> works in my very few tests).
> >>
> >> I was looking for guidance for the code itself, possibly making it
> >> easier to merge in the input/tablet/wacom* drivers into it in the
> >> future, as well as some explanations as to how I'm supposed to reset
> >> tools, etc. so the user-space drivers (the X.org linuxwacom driver)
> >> doesn't need special-casing for the device.
> >>
> >> Note that it requires a user-space activation to switch to Mode 2,  
> >> using
> >> bluetoothd (as the Bluetooth HID doesn't support  
> >> hid_output_raw_event).
> >> Patch at:
> >> http://cvs.fedoraproject.org/viewvc/rpms/bluez/devel/bluez-activate-wacom-mode2.patch?view=markup
> >
> > A couple of notes:
> > - the wheel action is reversed, it's a simple fix, done locally
> > - hidp and the Bluetooth sub-system says it can't probe the device  
> > with
> > error "-14" when hid-wacom.ko isn't already loaded
> 
> what was the reason for not forcing HID to load the generic driver?

What generic driver? If you're talking about the default Wacom driver,
it isn't an HID driver, and requires a USB device.

>  I  
> lost track on how HID is suppose to handle these. You could also  
> introduce a phony export like we do with L2CAP to ensure it is loaded  
> even if userspace isn't ready to handle this dependency.

Well, the problem is that the driver _does_ load, but I'm not certain
about the sequence of events between the Bluetooth sub-system, the
user-space enabling (see the linked patch to bluetoothd), and the HID
sub-system.

> > - I'm getting oopses in hci_conn_del() when the device goes away  
> > (eg. I
> > turn it off).
> 
> Try to run a net-next-2.6 or bluetooth-next-2.6 kernel. Kyle should  
> have merged these patches into the latest rawhide kernel.

I was hoping this would be fixed in the latest linus-2.6 tree, guess
not.

> > I'd appreciate any help making this just a tad more stable.
> >
> > Any comments about the code itself?
> 
> The main parsing function looks highly complicated and could either  
> use more comments or break into two.

The parsing is adapted from the code Andrew wrote, so I don't have any
great insights into it. Right it's in "it works well enough to do
things" mode, clean-ups and bug fixes will probably follow when my
machine stops crashing when using that driver :)

> 	if ((wdata->tool = tool)) {
> 		input_report_key(input, tool, 1);
> 		need_sync = 1;
> 	}
> 
> Don't do the assignment in the if clause test.

As I mentioned, copy/paste code this is.

>  Did you run  
> checkpatch.pl on it?

Nope, I didn't, but will do.

Cheers

  parent reply	other threads:[~2009-03-16 14:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 23:59 RFC: Wacom Bluetooth HID driver, first pass Bastien Nocera
     [not found] ` <1236988799.32264.6310.camel-MYKcRh6MmTE/Ra3EetS/fF6hYfS7NtTn@public.gmane.org>
2009-03-16 10:55   ` Bastien Nocera
     [not found]     ` <1237200912.32264.9867.camel-MYKcRh6MmTE/Ra3EetS/fF6hYfS7NtTn@public.gmane.org>
2009-03-16 14:00       ` Marcel Holtmann
     [not found]         ` <93531296-64B0-4D4B-A4A9-26F3D67DF579-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
2009-03-16 14:29           ` Bastien Nocera [this message]
2009-03-16 23:58             ` Bastien Nocera
2009-03-16 23:55   ` [PATCH] Wacom Graphire Bluetooth driver Bastien Nocera
2009-03-18  0:11     ` [PATCH] Wacom Graphire Bluetooth driver (updated with a few fixes) Bastien Nocera
2009-03-18 21:28       ` Andrew Zabolotny
2009-03-18 22:47         ` Bastien Nocera
2009-03-28 19:35           ` Andrew Zabolotny
     [not found]     ` <1237247755.32264.10664.camel-MYKcRh6MmTE/Ra3EetS/fF6hYfS7NtTn@public.gmane.org>
2009-03-31 22:35       ` [PATCH] Wacom Graphire Bluetooth driver Bastien Nocera
2009-05-06 15:14     ` [PATCH] Wacom Graphire Bluetooth driver (updated with a few fixes) Bastien Nocera
2009-05-11 15:20       ` Jiri Kosina
2009-05-11 16:12         ` Bastien Nocera

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=1237213799.32264.10090.camel@cookie.hadess.net \
    --to=hadess-0meiytkfxgostnjn9+bgxg@public.gmane.org \
    --cc=linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org \
    --cc=mjg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=peter.hutterer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=zap-ez6wqqBRKvoox3rIn2DAYQ@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).