Re: [PATCH] HID: uhid: Fix sending events with invalid data

2012-07-14 Thread David Herrmann
). Anyway, the patch looks good, thanks! Reviewed-by: David Herrmann dh.herrm...@googlemail.com Thanks! David Cheers, drivers/hid/uhid.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 119b7e6..714cd8c 100644 --- a/drivers

[PATCH 2/3] HID: picolcd: explicitly claim hid devices with HID_CLAIMED_OTHER

2012-07-15 Thread David Herrmann
Instead of using an ugly workaround to make hid_hw_start() correctly initialize the device, we now explicitely set HID_CLAIMED_OTHER before initializing the hid device. This tells the hid-core to accept the device even if no generic hid driver gets loaded. Signed-off-by: David Herrmann dh.herrm

[PATCH 3/3] HID: wiimote: explicitly claim hid devices with HID_CLAIMED_OTHER

2012-07-15 Thread David Herrmann
it. The wiimote driver will correctly handle the device, anyway. Signed-off-by: David Herrmann dh.herrm...@googlemail.com --- drivers/hid/hid-wiimote-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 84e2fbe..39154ff9

Re: [PATCH 1/3] HID: Add HID_CLAIMED_OTHER for non-generic drivers

2012-07-16 Thread David Herrmann
Hi Henrik On Mon, Jul 16, 2012 at 8:45 PM, Henrik Rydberg rydb...@euromail.se wrote: Hi David, Perhaps one should make hid-core warn instead of bailing out instead? Something may need to be done to make sure everything works smoothly, but really, why would hid-core mind keeping a device on

Re: [PATCH 1/3] HID: Add HID_CLAIMED_OTHER for non-generic drivers

2012-07-16 Thread David Herrmann
Hi Henrik On Mon, Jul 16, 2012 at 9:35 PM, Henrik Rydberg rydb...@euromail.se wrote: On Mon, Jul 16, 2012 at 09:08:47PM +0200, David Herrmann wrote: Hi Henrik On Mon, Jul 16, 2012 at 8:45 PM, Henrik Rydberg rydb...@euromail.se wrote: Hi David, Perhaps one should make hid-core warn

[PATCH] HID: Allow drivers without listeners to remain on the bus

2012-07-17 Thread David Herrmann
another flag for special devices like hid-picolcd and hid-wiimote. This also removes the ugly hack from hid-picolcd as this is no longer required. Signed-off-by: David Herrmann dh.herrm...@googlemail.com --- Hi Jiri I posted another patchset that introduced HID_CLAIMED_OTHER to avoid this heuristic

[PATCH] input: fix input_open_file() accessing out-of-bound buffers

2012-09-13 Thread David Herrmann
The input_table array is very small and we cannot be sure that the file the user opens has a minor-ID below 256 (8 5). Hence, simply check that the minor isn't out-of-bounds. If it is, return -ENODEV. Signed-off-by: David Herrmann dh.herrm...@googlemail.com Cc: sta...@kernel.org --- drivers

Re: [PATCH] input: fix input_open_file() accessing out-of-bound buffers

2012-09-13 Thread David Herrmann
Hi Dmitry On Thu, Sep 13, 2012 at 6:17 PM, David Herrmann dh.herrm...@googlemail.com wrote: The input_table array is very small and we cannot be sure that the file the user opens has a minor-ID below 256 (8 5). Hence, simply check that the minor isn't out-of-bounds. If it is, return -ENODEV

Re: [PATCH] input: fix input_open_file() accessing out-of-bound buffers

2012-09-13 Thread David Herrmann
Hi Dmitry On Thu, Sep 13, 2012 at 6:57 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi David, On Thu, Sep 13, 2012 at 06:18:17PM +0200, David Herrmann wrote: Hi Dmitry On Thu, Sep 13, 2012 at 6:17 PM, David Herrmann dh.herrm...@googlemail.com wrote: The input_table array is very

[PATCH 2/2] HID: wiimote: Parse calibration data of balance boards

2012-09-17 Thread David Herrmann
From: Florian Echtler f...@butterbrot.org The raw pressure-data that is reported by balance-boards is pretty useless unless calibration data is applied. Therefore, we read the full calibration data on extension initialization and apply it to every reported data. Signed-off-by: David Herrmann

Re: [PATCH] HID: wiimote: fix weight conversion error for values 17kg

2012-09-17 Thread David Herrmann
checked it again. Thanks for the fix. I've compared it with the original and I messed it up during conversion. Sorry. Signed-off-by: David Herrmann dh.herrm...@googlemail.com Thanks Jiri for applying them. David -- To unsubscribe from this list: send the line unsubscribe linux-input in the body

[PATCH v2 0/3] input: Dynamic Minor Numbers

2012-09-20 Thread David Herrmann
issues since version 1 and a NULL-dereference in input_minor_alloc(). Regards David David Herrmann (3): input: add dynamic-minor allocation helpers input: increase INPUT_DEVICES to 512 to allow dynamic minors input: evdev: use dynamic-minors if running out of static minors drivers/input

[PATCH v2 3/3] input: evdev: use dynamic-minors if running out of static minors

2012-09-20 Thread David Herrmann
these devices aren't visible, either, so this is no problem at all. Signed-off-by: David Herrmann dh.herrm...@googlemail.com --- drivers/input/evdev.c | 95 --- 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/drivers/input/evdev.c b

[PATCH v2 2/3] input: increase INPUT_DEVICES to 512 to allow dynamic minors

2012-09-20 Thread David Herrmann
and wouldn't loose any performance here. Signed-off-by: David Herrmann dh.herrm...@googlemail.com --- drivers/input/input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index 2741ce1..f8d985f 100644 --- a/drivers/input/input.c

[PATCH v2 1/3] input: add dynamic-minor allocation helpers

2012-09-20 Thread David Herrmann
might not be visible to old user-space programs that do not use libudev or similar. Signed-off-by: David Herrmann dh.herrm...@googlemail.com --- drivers/input/input.c | 162 +- include/linux/input.h | 5 ++ 2 files changed, 166 insertions(+), 1

Re: [PATCH v2 0/3] input: Dynamic Minor Numbers

2012-09-21 Thread David Herrmann
Hi Dmitry On Fri, Sep 21, 2012 at 10:51 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Friday, September 21, 2012 09:18:00 PM David Herrmann wrote: Hi Dmitry On Fri, Sep 21, 2012 at 11:22 AM, David Herrmann dh.herrm...@googlemail.com wrote: Hi Dmitry On Fri, Sep 21, 2012

Re: [PATCH v2 0/3] input: Dynamic Minor Numbers

2012-09-25 Thread David Herrmann
*data, int (*fn)(struct input_handle *, void *)); Looks all good and works perfectly well for me. Reviewed-by: David Herrmann dh.herrm...@googlemail.com Dmitry, if you push it into linux-next soon, we might even get it into 3.7. And while looking over it, I

Re: [PATCH 4/4] Input: extend the number of event (and other) devices

2012-10-07 Thread David Herrmann
Hi Dmitry On Wed, Oct 3, 2012 at 11:03 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Extend the amount of character devices, such as eventX, mouseX and jsX, from a hard limit of 32 per input handler to about 1024 shared across all handlers. To be compatible with legacy installations

Re: [PATCH] HID: wiimote: add Nintendo-Wii-Remote-Plus IDs

2012-10-24 Thread David Herrmann
Hi Peter On Tue, Oct 23, 2012 at 6:42 AM, Peter Olson peter.ol...@gmail.com wrote: I didn't feel up to reinstalling my entire kernel, so I just rebuilt the kernel and insmod'd the hid ko files. Before the new module was loaded, dmesg gave: [335678.959554] hid-generic 0005:057E:0330.0005:

Re: [RFC] HID: uhid: Handle LED input events

2012-11-05 Thread David Herrmann
Hi Andre On Thu, Nov 1, 2012 at 10:55 PM, Andre Guedes andre.gue...@openbossa.org wrote: This patches adds support for handling LED input events in uhid driver. When uhid receives an input LED event, we set the proper field, create the output report and send it to userspace as UHID_OUTPUT

Re: [PATCH] HID: wiimote: add Nintendo-Wii-Remote-Plus IDs

2012-11-12 Thread David Herrmann
Hi Peter On Mon, Nov 12, 2012 at 7:19 AM, Peter Olson peter.ol...@gmail.com wrote: (If I'm over-documenting my process, sorry, just wanted it as a record for myself as well) Summary at bottom, oneline is progress but not complete success yet. Ok, now built bluez with the patch from [PATCH

Re: [PATCH] HID: wiimote: add Nintendo-Wii-Remote-Plus IDs

2012-11-15 Thread David Herrmann
Hi Peter On Tue, Nov 13, 2012 at 3:53 AM, Peter Olson peter.ol...@gmail.com wrote: RE: flashing LEDs, the LEDs are always flashing every connect. I haven't had them once switch from all-flashing to having only LED1 (or just any single LED) lit. Also, I've never heard of / used the sysfs API,

Re: [PATCH] HID: Separate struct hid_device's driver_lock into two locks.

2012-11-26 Thread David Herrmann
Hi On Mon, Nov 26, 2012 at 7:34 PM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: Hi Bruno, On Mon, Nov 26, 2012 at 6:56 PM, Bruno Prémont bonb...@linux-vserver.org wrote: Hi Andrew, [CCing David Herrmann] On Sun, 25 November 2012 Andrew de los Reyes wrote: Benjamin Tissoires

[PATCH] HID: uhid: use __packed__ for uhid_feature_answer_req

2012-12-17 Thread David Herrmann
-by: David Herrmann dh.herrm...@googlemail.com --- include/uapi/linux/uhid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/uhid.h b/include/uapi/linux/uhid.h index 9c6974f..e9ed951 100644 --- a/include/uapi/linux/uhid.h +++ b/include/uapi/linux/uhid.h @@ -86,7 +86,7

[PATCH] Input: new EVIOCGKEYF to get keystate and flush queues

2013-01-07 Thread David Herrmann
to be a waste of computing power and memory to keep another copy for each input device if we could just use something like EVIOCGKEYF. Signed-off-by: David Herrmann dh.herrm...@googlemail.com --- Hi I am actually not sure whether I did the locking in the right order. However, I need to take event_lock

Re: [PATCH] hid: Fix uninitialized variable size in hid-wiimote-debug

2013-01-17 Thread David Herrmann
that there is no path to line 66 where size is uninitialized. Anyway, I am fine with this fix. We test for size == 0 anyway. Signed-off-by: David Herrmann dh.herrm...@googlemail.com Next time please copy the gcc-warning message verbatim into the commit-message so we can more easily reproduce

Re: [PATCH] hid: Fix uninitialized variable size in hid-wiimote-debug

2013-01-17 Thread David Herrmann
CC'ing Jiri so he can apply it to hid-next. On Thu, Jan 17, 2013 at 9:07 PM, David Herrmann dh.herrm...@googlemail.com wrote: Hi Simon On Thu, Jan 17, 2013 at 8:47 PM, Simon Que s...@chromium.org wrote: This variable is initialized conditionally, based on whether a wiimote call succeeds

Re: [PATCH v2] hid: Fix uninitialized variable size in hid-wiimote-debug

2013-01-17 Thread David Herrmann
. The warning is: files/drivers/hid/hid-wiimote-debug.c:69:18: warning: 'size' may be used uninitialized in this function [-Wmaybe-uninitialized] Thanks! Signed-off-by: David Herrmann dh.herrm...@googlemail.com Signed-off-by: Simon Que s...@chromium.org --- drivers/hid/hid-wiimote-debug.c |2

Re: [PATCH] HID: Separate struct hid_device's driver_lock into two locks.

2013-02-05 Thread David Herrmann
Hi Nestor On Tue, Feb 5, 2013 at 5:38 PM, Andrew de los Reyes andrew-v...@gizmolabs.org wrote: Yes, I'm hoping to upstream soon as part of a patch series to get WTP support in. The current version of the commit you are asking about is specifically here:

Re: [PATCH] HID: Separate struct hid_device's driver_lock into two locks.

2013-02-06 Thread David Herrmann
Hi Jiri On Wed, Feb 6, 2013 at 4:10 PM, Jiri Kosina jkos...@suse.cz wrote: On Tue, 5 Feb 2013, David Herrmann wrote: Yes, I'm hoping to upstream soon as part of a patch series to get WTP support in. The current version of the commit you are asking about is specifically here: https

Re: hidraw: Bug in select/poll for writing

2013-02-11 Thread David Herrmann
Hi Tim On Tue, Feb 5, 2013 at 12:47 AM, Tim Peterson t...@timpeterson.org wrote: Hi all, I have found that when one uses select() on /dev/hidraw0, it will never report that it is writable, even though a write will succeed at any time. As a demonstration, the command socat -v -

Re: uhid: broken interface: 32/64-bit compatibility

2013-02-15 Thread David Herrmann
Hi Kirill On Fri, Feb 15, 2013 at 12:29 PM, Kirill A. Shutemov kirill.shute...@linux.intel.com wrote: Hi David and all, There's claim in uhid.h that the interface is compatible even between architectures. But it obviously is not true: struct uhid_create_req contains pointer which breaks

[PATCH] HID: wiimote: fix nunchuck button parser

2013-02-17 Thread David Herrmann
victor.quicksil...@gmail.com Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-ext.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/hid/hid-wiimote-ext.c b/drivers/hid/hid-wiimote-ext.c index 38ae877..0472191 100644 --- a/drivers/hid/hid

Re: [PATCH] HID: Separate struct hid_device's driver_lock into two locks.

2013-02-25 Thread David Herrmann
Hi Jiri On Mon, Feb 25, 2013 at 2:03 PM, Jiri Kosina jkos...@suse.cz wrote: On Mon, 18 Feb 2013, Jiri Kosina wrote: Change-Id: I737f6fc15911134b51273acf8d3de92fa5cc0f85 Hi, thanks for finally proceeding on this front. Please provide your Signed-off-by line; without that, the patch can't

Re: [PATCH v2 0/8] hid driver transport cleanup

2013-02-25 Thread David Herrmann
Hi guys On Mon, Feb 25, 2013 at 1:29 PM, Jiri Kosina jkos...@suse.cz wrote: On Mon, 25 Feb 2013, Benjamin Tissoires wrote: Hi guys, this is the v2 of the hid transport cleanup. Changes since v1: - gathered reviewed/acked/etc.. - changed commit messages of patches 4-6 - add newcomer into

Re: [RFC 0/2] HID: Introduce .idle() to remove last usb dependence from hid-multitouch

2013-02-27 Thread David Herrmann
a Bluetooth device that relies on it. Any reasons why I should implement them? Also, for things like UHID I think we can safely drop this request. Considering that, I think the patches can be applied as they are, so: Reviewed-by: David Herrmann dh.herrm...@gmail.com The Bluetooth HID Profile actually

Re: [PATCH v2 0/8] hid driver transport cleanup

2013-02-28 Thread David Herrmann
Hi On Mon, Feb 25, 2013 at 4:06 PM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: (I did read the Bluetooth HID Profile specification but I have no idea how USB does it, so please bear with me if I mix things up. Maybe some day I will have the time to read the USB specs, too) *

Re: [PATCH] Input: new EVIOCGKEYF to get keystate and flush queues

2013-03-27 Thread David Herrmann
Hi Dmitry On Sat, Feb 16, 2013 at 10:10 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi David, On Mon, Jan 07, 2013 at 12:58:23PM +0100, David Herrmann wrote: EVIOCGKEYF returns the current keystate similar to EVIOCGKEY but also flushes the outgoing evdev event queue. This allows

[PATCH v2] Input: evdev - Flush queues during EVIOCGKEY-like ioctls

2013-03-27 Thread David Herrmann
to post new events. This should guarantee that we don't block event-dispatching for too long while flushing a single event queue. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/input/evdev.c | 90 --- 1 file changed, 86 insertions(+), 4

Re: [PATCH v2] Input: evdev - Flush queues during EVIOCGKEY-like ioctls

2013-03-28 Thread David Herrmann
Hi Dmitry On Thu, Mar 28, 2013 at 6:06 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Thu, Mar 28, 2013 at 01:49:24AM +0100, David Herrmann wrote: + spin_lock_irq(dev-event_lock); + spin_lock(client-buffer_lock); + + ret = bits_to_user(bits, max, size, p, compat

[PATCH v3] Input: evdev - Flush queues during EVIOCGKEY-like ioctls

2013-03-28 Thread David Herrmann
to post new events. This should guarantee that we don't block event-dispatching for too long while flushing a single event queue. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi Dmitry I hope this time everything is right. I tested this on my local machine with uinput. You can find

[PATCH 1/3] HID: wiimote: use unique battery names

2013-04-02 Thread David Herrmann
Battery device names must be unique, otherwise registration fails if multiple Wii Remotes are connected. This breaks the sysfs API, but there is no known application that uses the Wii Remote battery that I know of so we should go ahead and apply this. Signed-off-by: David Herrmann dh.herrm

[RFC 00/21] Nintendo Wii Remote Extension Hotplugging

2013-04-13 Thread David Herrmann
for the beginning. Last but not least I noticed that we duplicate the HID Boot Protocol in usbhid and Bluetooth HID. The Wifi-Display HID also provides some similar protocol. So I currently look into creating a hid-boot.c so we have a central place that implements it. Cheers David David Herrmann (21): HID

[PATCH 01/21] HID: wiimote: extend driver description

2013-04-13 Thread David Herrmann
the copyright information for the coming hotplugging rework. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/Kconfig | 20 ++-- drivers/hid/hid-wiimote-core.c | 6 +++--- drivers/hid/hid-wiimote-debug.c | 4 ++-- drivers/hid/hid-wiimote-ext.c

[PATCH 05/21] HID: wiimote: use cached battery values on I/O failure

2013-04-13 Thread David Herrmann
-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 2d56a08..e47c949 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers

[PATCH 06/21] HID: wiimote: wake up if output queue failed

2013-04-13 Thread David Herrmann
is required to be reliable and does retransmission itself. So it is safe to assume that if the transmission fails, the device is in inconsistent state. Hence, we abort every request if any output report fails. No need to verify which report failed. Signed-off-by: David Herrmann dh.herrm

[PATCH 07/21] HID: wiimote: add sub-device module infrastructure

2013-04-13 Thread David Herrmann
and more will be ported in follow-up patches to the new module layer. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/Makefile | 2 +- drivers/hid/hid-wiimote-core.c| 124 +- drivers/hid/hid-wiimote-modules.c | 45

[PATCH 09/21] HID: wiimote: convert BATTERY to module

2013-04-13 Thread David Herrmann
This introduces a new sub-device module for the BATTERY handlers. It moves the whole power_supply battery handling over to wiimote-modules. This doesn't change any semantics or ABI but only converts the battery handling into a sub-device module. Signed-off-by: David Herrmann dh.herrm

[PATCH 10/21] HID: wiimote: convert LEDS to modules

2013-04-13 Thread David Herrmann
. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 125 -- drivers/hid/hid-wiimote-modules.c | 140 ++ drivers/hid/hid-wiimote.h | 5 ++ 3 files changed, 158 insertions(+), 112

[PATCH 11/21] HID: wiimote: convert ACCEL to module

2013-04-13 Thread David Herrmann
Accelerometer data is very similar to KEYS handling. Therefore, convert all ACCEL related handling into a sub-device module similar to KEYS. This doesn't change any semantics but only moves code over to wiimote-modules. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid

[PATCH 13/21] HID: wiimote: add extension hotplug support

2013-04-13 Thread David Herrmann
and work great during any hotplug sequence. Yay! Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 635 -- drivers/hid/hid-wiimote-modules.c | 16 + drivers/hid/hid-wiimote.h | 25 ++ 3 files changed, 655 insertions

[PATCH 14/21] HID: wiimote: add Balance Board support

2013-04-13 Thread David Herrmann
and disable unsupported hardward like accelerometer, IR, rumble and more. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 23 + drivers/hid/hid-wiimote-modules.c | 211 ++ drivers/hid/hid-wiimote.h | 9 ++ 3

[PATCH 15/21] HID: wiimote: add Nunchuk support

2013-04-13 Thread David Herrmann
This moves the nunchuk parser over to an extension module. This allows to make use of hotplugged Nunchuks instead of the old static parser. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 6 ++ drivers/hid/hid-wiimote-modules.c | 198

[PATCH 16/21] HID: wiimote: add Classic Controller extension

2013-04-13 Thread David Herrmann
Add a new extension module for the classic controller so we get hotplug support for this device. It is mostly the same as the old static classic controller parser. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 6 + drivers/hid/hid-wiimote-modules.c

[PATCH 17/21] HID: wiimote: add Motion Plus extension module

2013-04-13 Thread David Herrmann
Add parsers for motion plus data so we can hotplug motion plus extensions and make use of them. This is mostly the same as the old static motion plus parser. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-modules.c | 144

[PATCH 19/21] HID: wiimote: lock DRM mode during debugfs overwrite

2013-04-13 Thread David Herrmann
by wiimote core. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c | 4 +++- drivers/hid/hid-wiimote-debug.c | 3 +++ drivers/hid/hid-wiimote.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers

[PATCH 20/21] HID: wiimote: add sysfs extension/device-type attrs

2013-04-13 Thread David Herrmann
-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c | 106 - 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 126c9d9..c5b5207 100644 --- a/drivers/hid

[PATCH 21/21] HID: wiimote: add bboard_calib attribute

2013-04-13 Thread David Herrmann
out how it works, we can implement it in the kernel and provide offline data via bboard_calib. This won't break user-space then. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-modules.c | 68 ++- 1 file changed, 67 insertions

Re: [PATCH RFC] input: Add evdev mute ioctl

2013-04-17 Thread David Herrmann
Hi Kristian On Tue, Apr 16, 2013 at 3:58 PM, Kristian Høgsberg k...@bitplanet.net wrote: This commit adds a new ioctl to the evdev device: EVIOCMUTE. The purpose of this ioctl it to temporarily block event delivery to a specific evdev client and prevent access to most of the ioctls. The use

Re: [PATCH RFC] input: Add evdev mute ioctl

2013-04-21 Thread David Herrmann
Hi Kristian On Wed, Apr 17, 2013 at 7:55 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi Kristian On Tue, Apr 16, 2013 at 3:58 PM, Kristian Høgsberg k...@bitplanet.net wrote: This commit adds a new ioctl to the evdev device: EVIOCMUTE. The purpose of this ioctl it to temporarily block

Re: [PATCH v3] Input: evdev - Flush queues during EVIOCGKEY-like ioctls

2013-05-02 Thread David Herrmann
Hi Dmitry Any update on this? Regards David On Thu, Mar 28, 2013 at 12:59 PM, David Herrmann dh.herrm...@gmail.com wrote: If userspace requests current KEY-state, they very likely assume that no such events are pending in the output queue of the evdev device. Otherwise, they will parse

Re: Game Controllers

2013-05-02 Thread David Herrmann
Hi Todd On Thu, May 2, 2013 at 3:46 PM, Todd Showalter t...@electronjump.com wrote: On Thu, May 2, 2013 at 2:35 AM, Antonio Ospite osp...@studenti.unina.it wrote: On Mon, 29 Apr 2013 20:46:47 -0400 Todd Showalter t...@electronjump.com wrote: My proposed standard gamepad is: - left

Re: Game Controllers

2013-05-02 Thread David Herrmann
Hi Todd On Thu, May 2, 2013 at 7:35 PM, Todd Showalter t...@electronjump.com wrote: On Thu, May 2, 2013 at 1:01 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Thu, May 02, 2013 at 09:46:44AM -0400, Todd Showalter wrote: left stick: ABS_X, ABS_Y right stick: ABS_RX, ABS_RY Not

[PATCH 00/26] Wii Remote Extension Hotplugging Support

2013-05-05 Thread David Herrmann
David Herrmann (26): HID: wiimote: extend driver description HID: wiimote: move queue handling into separate struct HID: wiimote: keep HID device open HID: wiimote: add device detection HID: wiimote: use cached battery values on I/O failure HID: wiimote: wake up if output queue failed

[PATCH 02/26] HID: wiimote: move queue handling into separate struct

2013-05-05 Thread David Herrmann
The output queue is independent of the other wiimote modules and can run on its own. Therefore, move its members into a separate struct so we don't run into name collisions with other modules. This is only a syntactic change that renames all queue members to queue.*. Signed-off-by: David

[PATCH 01/26] HID: wiimote: extend driver description

2013-05-05 Thread David Herrmann
the copyright information for the coming hotplugging rework. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/Kconfig | 20 ++-- drivers/hid/hid-wiimote-core.c | 6 +++--- drivers/hid/hid-wiimote-debug.c | 4 ++-- drivers/hid/hid-wiimote-ext.c

[PATCH 03/26] HID: wiimote: keep HID device open

2013-05-05 Thread David Herrmann
We need constant I/O to keep the state up-to-date and not miss any packets. Hence, call hid_hw_open() during setup and hid_hw_close() during destruction. These are no-ops for Bluetooth HIDP, but lets be safe. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c

[PATCH 04/26] HID: wiimote: add device detection

2013-05-05 Thread David Herrmann
. This isn't implemented, yet and will be added later. However, we need to make sure that this worker can be called multiple times. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c | 153 - drivers/hid/hid-wiimote.h | 37

[PATCH 05/26] HID: wiimote: use cached battery values on I/O failure

2013-05-05 Thread David Herrmann
-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 76d2c73..00a9b6f 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers

[PATCH 06/26] HID: wiimote: wake up if output queue failed

2013-05-05 Thread David Herrmann
is required to be reliable and does retransmission itself. So it is safe to assume that if the transmission fails, the device is in inconsistent state. Hence, we abort every request if any output report fails. No need to verify which report failed. Signed-off-by: David Herrmann dh.herrm

[PATCH 07/26] HID: wiimote: add sub-device module infrastructure

2013-05-05 Thread David Herrmann
and more will be ported in follow-up patches to the new module layer. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/Makefile | 2 +- drivers/hid/hid-wiimote-core.c| 124 +- drivers/hid/hid-wiimote-modules.c | 45

[PATCH 08/26] HID: wiimote: convert KEYS and RUMBLE to modules

2013-05-05 Thread David Herrmann
or ABI. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 134 ++ drivers/hid/hid-wiimote-modules.c | 134 ++ drivers/hid/hid-wiimote.h | 18 + 3 files changed, 172

[PATCH 09/26] HID: wiimote: convert BATTERY to module

2013-05-05 Thread David Herrmann
This introduces a new sub-device module for the BATTERY handlers. It moves the whole power_supply battery handling over to wiimote-modules. This doesn't change any semantics or ABI but only converts the battery handling into a sub-device module. Signed-off-by: David Herrmann dh.herrm

[PATCH 10/26] HID: wiimote: convert LEDS to modules

2013-05-05 Thread David Herrmann
. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 125 -- drivers/hid/hid-wiimote-modules.c | 140 ++ drivers/hid/hid-wiimote.h | 5 ++ 3 files changed, 158 insertions(+), 112

[PATCH 11/26] HID: wiimote: convert ACCEL to module

2013-05-05 Thread David Herrmann
Accelerometer data is very similar to KEYS handling. Therefore, convert all ACCEL related handling into a sub-device module similar to KEYS. This doesn't change any semantics but only moves code over to wiimote-modules. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid

[PATCH 12/26] HID: wiimote: convert IR to module

2013-05-05 Thread David Herrmann
-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 233 +++-- drivers/hid/hid-wiimote-modules.c | 263 ++ drivers/hid/hid-wiimote.h | 3 + 3 files changed, 287 insertions(+), 212 deletions

[PATCH 13/26] HID: wiimote: add extension hotplug support

2013-05-05 Thread David Herrmann
and work great during any hotplug sequence. Yay! Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 669 -- drivers/hid/hid-wiimote-modules.c | 16 + drivers/hid/hid-wiimote.h | 49 +++ 3 files changed, 709 insertions

[PATCH 14/26] HID: wiimote: add Balance Board support

2013-05-05 Thread David Herrmann
and disable unsupported hardward like accelerometer, IR, rumble and more. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 26 + drivers/hid/hid-wiimote-modules.c | 211 ++ drivers/hid/hid-wiimote.h | 9 ++ 3

[PATCH 16/26] HID: wiimote: add Classic Controller extension

2013-05-05 Thread David Herrmann
Add a new extension module for the classic controller so we get hotplug support for this device. It is mostly the same as the old static classic controller parser. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 6 + drivers/hid/hid-wiimote-modules.c

[PATCH 17/26] HID: wiimote: add Motion Plus extension module

2013-05-05 Thread David Herrmann
Add parsers for motion plus data so we can hotplug motion plus extensions and make use of them. This is mostly the same as the old static motion plus parser. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-modules.c | 144

[PATCH 18/26] HID: wiimote: fix ctx pointer in debugfs DRM-write

2013-05-05 Thread David Herrmann
single_open() stores the seq_file pointer in file-private_data. It stores our ctx pointer in seq_file-private. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-wiimote

[PATCH 19/26] HID: wiimote: lock DRM mode during debugfs overwrite

2013-05-05 Thread David Herrmann
by wiimote core. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c | 4 +++- drivers/hid/hid-wiimote-debug.c | 3 +++ drivers/hid/hid-wiimote.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers

[PATCH 21/26] HID: wiimote: add bboard_calib attribute

2013-05-05 Thread David Herrmann
out how it works, we can implement it in the kernel and provide offline data via bboard_calib. This won't break user-space then. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Documentation/ABI/testing/sysfs-driver-hid-wiimote | 15 + drivers/hid/hid-wiimote-modules.c

[PATCH 22/26] HID: wiimote: remove old static extension support

2013-05-05 Thread David Herrmann
We now have dynamic hotplug support so the old static extensions are no longer needed nor used. Remove it along CONFIG_HID_WIIMOTE_EXT. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/Kconfig | 9 - drivers/hid/Makefile | 3 - drivers/hid/hid-wiimote

[PATCH 23/26] HID: wiimote: add MP quirks

2013-05-05 Thread David Herrmann
extension ports, we load WIIMOD_NO_MP which sets WIIPROTO_FLAG_NO_MP. This effectively disables all MP detection logic. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 25 ++--- drivers/hid/hid-wiimote-modules.c | 74

[RFC 24/26] HID: wiimote: support Nintendo Wii U Pro Controller

2013-05-05 Thread David Herrmann
to access these if you're interested. We might want to hook up the charging and USB bits to the battery device so user-space can query whether it is currently charged via USB. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/hid-wiimote-core.c| 23 +++ drivers/hid/hid

[PATCH 25/26] HID: wiimote: fix DRM debug-attr to correctly parse input

2013-05-05 Thread David Herrmann
We need to correctly zero-terminate the input to parse it. Otherwise, we always end up interpreting it as numbers. Furthermore, we actually want hexadecimal numbers instead of decimal. As it is a debugfs interface, we can change the API at any time. Signed-off-by: David Herrmann dh.herrm

[RFC 26/26] HID/ALSA: wiimote: add speaker support

2013-05-05 Thread David Herrmann
. Cc: alsa-de...@alsa-project.org Cc: Takashi Iwai ti...@suse.de Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi This is my second revision of the Wii Remote sound-driver. It is based on the hotplugging rework in this series. It's the only patch that is marked as RFC but I thought I'd just

Re: [PATCH 16/26] HID: wiimote: add Classic Controller extension

2013-05-05 Thread David Herrmann
Hi Todd On Mon, May 6, 2013 at 2:39 AM, Todd Showalter t...@electronjump.com wrote: On Sun, May 5, 2013 at 5:13 PM, David Herrmann dh.herrm...@gmail.com wrote: Add a new extension module for the classic controller so we get hotplug support for this device. It is mostly the same as the old

Re: [RFC 24/26] HID: wiimote: support Nintendo Wii U Pro Controller

2013-05-05 Thread David Herrmann
Hi Todd On Mon, May 6, 2013 at 2:43 AM, Todd Showalter t...@electronjump.com wrote: On Sun, May 5, 2013 at 5:13 PM, David Herrmann dh.herrm...@gmail.com wrote: The Wii U Pro Controller is a new Nintendo remote device that looks very similar to the XBox controller. It has nearly the same

Re: [RFC 24/26] HID: wiimote: support Nintendo Wii U Pro Controller

2013-05-08 Thread David Herrmann
Hi Todd On Mon, May 6, 2013 at 4:14 PM, Todd Showalter t...@electronjump.com wrote: On Mon, May 6, 2013 at 1:49 AM, David Herrmann dh.herrm...@gmail.com wrote: The Wii U Pro Controller is a new Nintendo remote device that looks very similar to the XBox controller. It has nearly the same

Re: [RFC 24/26] HID: wiimote: support Nintendo Wii U Pro Controller

2013-05-08 Thread David Herrmann
Hi Todd On Wed, May 8, 2013 at 7:20 PM, Todd Showalter t...@electronjump.com wrote: On Wed, May 8, 2013 at 1:05 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Or you have your library that provides ABS-BTN translation. You can even have your API structured such that consumer provides

[PATCH] HID: input: return ENODATA if reading battery attrs fails

2013-05-13 Thread David Herrmann
on this. Cc: Jiri Kosina jkos...@suse.cz Cc: Anton Vorontsov c...@mail.ru Cc: David Woodhouse dw...@infradead.org Reported-by: Daniel Nicoletti dantt...@gmail.com Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi I really dislike the way power_supply core calls into the drivers during the add uevent

Re: [RFC 24/26] HID: wiimote: support Nintendo Wii U Pro Controller

2013-05-13 Thread David Herrmann
(from left to right) as BTN_SELECT, BTN_MODE, + BTN_START + +Rumble: + Rumble is advertices as FF_RUMBLE. + + + Written 2013 by David Herrmann dh.herrm...@gmail.com diff --git a/include/uapi/linux/input.h

Re: [PATCH] HID: input: return ENODATA if reading battery attrs fails

2013-05-15 Thread David Herrmann
Hi Anton On Tue, May 14, 2013 at 1:20 AM, Anton Vorontsov an...@enomsg.org wrote: On Mon, May 13, 2013 at 05:01:30PM +0200, David Herrmann wrote: [..] I really dislike the way power_supply core calls into the drivers during the add uevent. If a driver holds an I/O mutex (or anything else

Re: HID vendor access from user space

2013-05-21 Thread David Herrmann
Hi On Fri, May 17, 2013 at 1:47 PM, Nestor Lopez Casado nlopezca...@logitech.com wrote: Hi, In today's linux HID subsystem, a HID device can be accessed for control and configuration via dev/hidraw, via a hid-specific driver, as well as /dev/input (setting leds on a kbd for instance) Some

Re: [RFC 24/26] HID: wiimote: support Nintendo Wii U Pro Controller

2013-05-22 Thread David Herrmann
Hi On Mon, May 13, 2013 at 7:40 PM, Todd Showalter t...@electronjump.com wrote: On Mon, May 13, 2013 at 1:03 PM, David Herrmann dh.herrm...@gmail.com wrote: I tried to put up some documentation. Comments welcome. If no problems arise with it, I will send a proper series later. I'd

Re: [PATCH 13/26] HID: wiimote: add extension hotplug support

2013-05-23 Thread David Herrmann
Hi Jiri On Sun, May 5, 2013 at 11:12 PM, David Herrmann dh.herrm...@gmail.com wrote: The Wii Remote has several extension ports. The first port (EXT) provides hotplug events whenever an extension is plugged. The second port (MP) does not provide hotplug events by default. Instead, we have

[PATCH] Bluetooth: hidp: register HID devices async

2013-05-23 Thread David Herrmann
-off-by: David Herrmann dh.herrm...@gmail.com --- Hi @Daniel, this should fix the battery issues for Bluetooth devices. As far as I can see, it should have always worked for USB devices already as it uses the synchronous HID data-callbacks. I tested this on my machine and it works quite well

Re: [PATCH] Bluetooth: hidp: register HID devices async

2013-05-24 Thread David Herrmann
Hi On Fri, May 24, 2013 at 12:46 AM, Daniel Nicoletti dantt...@gmail.com wrote: Ok, just tested with my two Apple mouses (Trackpad MagicMouse), and with the ENODATA patch it now works perfectly, the other mouse doesn't freeze when connecting and the udev signals are also properly emitted, is

  1   2   3   4   >