Re: [PATCH] Input: evdev - add event-mask API

2015-10-25 Thread David Herrmann
Hi On Sun, Oct 25, 2015 at 2:17 AM, Dmitry Torokhov <dmitry.torok...@gmail.com> wrote: > Hi David, > > On Thu, Sep 03, 2015 at 06:14:01PM +0200, David Herrmann wrote: >> +static int bits_from_user(unsigned long *bits, unsigned int maxbit, >> + unsi

Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

2015-10-25 Thread David Herrmann
e, then adjust > various axes and bits and then validate everything. Indeed, we now force the order to be abs-setup first, then device-setup as last step. Appended is a follow-up patch to cleanup ABS handling in uinput. It is untested. Benjamin, care to give it a spin? Thanks David >From 2

Re: [PATCH] Input: evdev - add event-mask API

2015-10-08 Thread David Herrmann
Hey On Thu, Sep 3, 2015 at 6:14 PM, David Herrmann <dh.herrm...@gmail.com> wrote: > Hardware manufacturers group keys in the weirdest way possible. This may > cause a power-key to be grouped together with normal keyboard keys and > thus be reported on the same kernel interface. &g

Re: [PATCH] HID: hid-input: allow input_configured callback return errors

2015-09-28 Thread David Herrmann
Hi On Mon, Sep 28, 2015 at 2:23 AM, Dmitry Torokhov wrote: [...] >> >> > } >> > >> > static int mt_probe(struct hid_device *hdev, const struct hid_device_id >> > *id) >> >> [snip] >> >> > diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c >> > index

Re: [PATCH] HID: hid-input: allow input_configured callback return errors

2015-09-26 Thread David Herrmann
ABS_MT_TOUCH_MINOR, 0, 0x0f, 0, 0); > > - input_mt_init_slots(input, data->max_fingers, INPUT_MT_POINTER); > + ret = input_mt_init_slots(input, data->max_fingers, INPUT_MT_POINTER); > + if (ret < 0) > + goto exit; > > if (data-&g

Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

2015-09-21 Thread David Herrmann
no need to copy the whole array temporarily into the kernel, > but instead the caller issues several ioctl where we copy each value > manually. > > Signed-off-by: David Herrmann <dh.herrm...@gmail.com> > Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> &g

[PATCH] Input: evdev - add event-mask API

2015-09-03 Thread David Herrmann
or event-types. Signed-off-by: David Herrmann <dh.herrm...@gmail.com> --- drivers/input/evdev.c | 206 - include/uapi/linux/input.h | 60 + 2 files changed, 264 insertions(+), 2 deletions(-) diff --git a/drivers/input/evdev.c b/d

Re: [PATCH v2] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

2015-08-24 Thread David Herrmann
. Signed-off-by: David Herrmann dh.herrm...@gmail.com Signed-off-by: Benjamin Tissoires benjamin.tissoi...@redhat.com --- Hi, this is the v2 of the patch David submitted last year. I tried to take Dmitry's remarks into account and came out with this. Cheers, Benjamin drivers/input/misc

Re: [PATCH] HID: sony: Enable Gasia third-party PS3 controllers

2015-03-19 Thread David Herrmann
Hi On Sat, Feb 7, 2015 at 10:48 PM, Lauri Kasanen c...@gmx.com wrote: Hi, On Sat, 7 Feb 2015 17:31:33 +0100 Antonio Ospite a...@ao2.it wrote: +#include linux/usb/input.h Please don't. HID should be transport agnostic, so please refrain from directly call usb. I agree with

Re: 3.19: Sony playstation controller causes kernel oops

2015-02-23 Thread David Herrmann
below, though. For both: Reviewed-by: David Herrmann dh.herrm...@gmail.com The bug is non-critical (global memory, so initialized to 0 which is fine for spinlocks). It only spits out warnings if you enable lock-debugging. We might mark it for stable 3.14+. Thanks David diff --git a/drivers/hid

Re: [PATCH] Input: evdev - add EVIOCREVOKE ioctl

2015-02-04 Thread David Herrmann
Hi On Wed, Feb 4, 2015 at 2:12 PM, Bruno Prémont bonb...@linux-vserver.org wrote: Hi David, Sorry for reviving this old thread (I didn't find more recent patch series at first glance or have not been using the proper keyword while searching). At FOSDEM 2015 last Sunday Hans presented

Re: PATCH change for HID_BATTERY_STRENGTH kconfig

2015-01-07 Thread David Herrmann
/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index f42df4d..602ac07 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -27,7 +27,8 @@ if HID

Re: [PATCH] HID: input: fix confusion on conflicting mappings

2015-01-06 Thread David Herrmann
Hi On Tue, Jan 6, 2015 at 1:37 PM, Fredrik Hallenberg megahal...@gmail.com wrote: I can confirm that the patch breaks things when not using n key rollover. If using the Corsair K70 in BIOS mode or just using a plain USB-keyboard keys repeat forever as reported. David, I noticed that in the

Re: [PATCH] HID: input: fix confusion on conflicting mappings

2015-01-06 Thread David Herrmann
Hi On Tue, Jan 6, 2015 at 10:19 PM, Jiri Kosina jkos...@suse.cz wrote: On Mon, 29 Dec 2014, David Herrmann wrote: On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its neighbours look like this: +---+ +---+ +---+ | 1 | | 2 | | 5

[PATCH] HID: input: fix confusion on conflicting mappings

2014-12-29 Thread David Herrmann
...@vger.kernel.org Reported-by: Adam Goode a...@spicenitz.org Reported-by: Fredrik Hallenberg megahal...@gmail.com Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi Fredrik, Adam, can you give this a try? It should fix your issues. Thanks David drivers/hid/hid-input.c | 16 1 file

Re: [systemd-devel] Supporting U2F over HID on Linux?

2014-12-12 Thread David Herrmann
Hi On Thu, Dec 11, 2014 at 6:36 PM, Andy Lutomirski l...@amacapital.net wrote: It happens during driver probe. I don't set GET_REPORT to my device -- the protocol consists solely of SET_REPORT from the driver followed by an asynchronous (but generally reasonably quick) report back from the

Re: [systemd-devel] Supporting U2F over HID on Linux?

2014-12-12 Thread David Herrmann
Hi On Fri, Dec 12, 2014 at 6:18 PM, Andy Lutomirski l...@amacapital.net wrote: On Dec 12, 2014 3:05 AM, David Herrmann dh.herrm...@gmail.com wrote: So far, the solution is to use hid_device_io_start() and hid_device_io_stop() in -probe(). It's a hack to allow I/O during -probe(). Maybe your

Re: [systemd-devel] Supporting U2F over HID on Linux?

2014-12-12 Thread David Herrmann
Hi On Fri, Dec 12, 2014 at 6:25 PM, Andy Lutomirski l...@amacapital.net wrote: On Fri, Dec 12, 2014 at 9:21 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Fri, Dec 12, 2014 at 6:18 PM, Andy Lutomirski l...@amacapital.net wrote: On Dec 12, 2014 3:05 AM, David Herrmann dh.herrm

Re: [systemd-devel] Supporting U2F over HID on Linux?

2014-12-11 Thread David Herrmann
wrote: On Mon, 3 Nov 2014, David Herrmann wrote: Agreed, mostly. My only real concern is that this could be annoying for the userspace developers who will need to target Linux and HIDAPI separately. Admittedly the Linux support will be trivial. I see. I'll not stop you from using hidraw

Re: [sur40] videobuf2 and/or DMA?

2014-12-11 Thread David Herrmann
Hi On Mon, Dec 8, 2014 at 8:50 AM, Florian Echtler f...@butterbrot.org wrote: Hello everyone, I'm preparing to finally add support for the raw sensor video stream to my driver for the SUR40 touchscreen. However, after an extensive amount of Googling, I'm still not clear on the relationship

Re: [PATCH v3] Input: evdev - add event-mask API

2014-11-13 Thread David Herrmann
Hi On Wed, Nov 12, 2014 at 1:41 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Wed, Nov 12, 2014 at 8:40 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi David, On Tue, Nov 04, 2014 at 06:12:23PM +0100, David Herrmann wrote: +static int bits_from_user(unsigned long *bits

Re: [PATCH v3] Input: evdev - add event-mask API

2014-11-12 Thread David Herrmann
Hi On Wed, Nov 12, 2014 at 8:40 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi David, On Tue, Nov 04, 2014 at 06:12:23PM +0100, David Herrmann wrote: +static int bits_from_user(unsigned long *bits, unsigned int maxbit, + unsigned int maxlen, const void __user

Re: [PATCH RESEND RESEND] Input: evdev - add event-mask API

2014-11-04 Thread David Herrmann
Hi Dmitry Sorry for the delay, back from holiday now. On Fri, Oct 10, 2014 at 12:52 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: diff -u b/include/uapi/linux/input.h b/include/uapi/linux/input.h --- b/include/uapi/linux/input.h +++ b/include/uapi/linux/input.h @@ -161,53 +161,59 @@

[PATCH v3] Input: evdev - add event-mask API

2014-11-04 Thread David Herrmann
or event-types. Acked-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi Dmitry This works fine here. Tested with libevdev on my keyboard on x86-64 only. Lemme know if there's anything left to do. v3: - fix wording (Dmitry) - use bits_to_user

Re: [systemd-devel] Supporting U2F over HID on Linux?

2014-11-03 Thread David Herrmann
Hi On Sun, Nov 2, 2014 at 7:57 PM, Andy Lutomirski l...@amacapital.net wrote: I want to get U2F (universal second factor, sometimes called security key or even gnubby) working on Linux. U2F tokens are HID devices that speak a custom protocol. The intent is that user code will speak to then

Re: [systemd-devel] Supporting U2F over HID on Linux?

2014-11-03 Thread David Herrmann
Hi On Mon, Nov 3, 2014 at 8:19 PM, Andy Lutomirski l...@amacapital.net wrote: On Mon, Nov 3, 2014 at 11:03 AM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Sun, Nov 2, 2014 at 7:57 PM, Andy Lutomirski l...@amacapital.net wrote: I want to get U2F (universal second factor, sometimes

Re: Problem with Das Keyboard 4 in N-key rollover mode

2014-10-16 Thread David Herrmann
Hi On Thu, Oct 16, 2014 at 8:36 AM, Fredrik Hallenberg megahal...@gmail.com wrote: Hi, this issue was discussed on this list a while ago. Look for spurious backslash in the archive. I submitted a patch that fixed the problem but David Herrmann did a better one later in the thread. However

Re: [PATCH RESEND RESEND] Input: evdev - add event-mask API

2014-10-10 Thread David Herrmann
Hi On Fri, Oct 10, 2014 at 12:52 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi David, On Sun, Sep 28, 2014 at 12:19:39PM +0200, David Herrmann wrote: Ping? Sorry for the delay. On Wed, Aug 13, 2014 at 9:16 AM, David Herrmann dh.herrm...@gmail.com wrote: Hardware

Re: [PATCH] Input: automatically set EV_ABS bit in input_set_abs_params

2014-10-08 Thread David Herrmann
time by setting the same bit several times. Looks good to me. I mean we already do the absbit-allocation here, so this looks sane to do. Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David Signed-off-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/input/input.c | 3

Re: 3.17-rc5: kernel oops when exiting X under heavy load

2014-10-07 Thread David Herrmann
way to much into the array, but the bits_to_user() truncates it properly. So afaics, this only fails if the kernel memory isn't accessible, and thus faults. Patch looks good! Nice catch: Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David spin_unlock(dev-event_lock

Re: [PATCH] HID: uHID: fix excepted report type

2014-10-01 Thread David Herrmann
need the *_REPLY type as response: Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks for trying to fix this! I will try to get my Arc-Surface working until Bordeaux. We should be able to get all that stuff figured out together then. And it will still be in time for 3.18-fixes then. Thanks

Re: [PATCH RESEND RESEND] Input: evdev - add event-mask API

2014-09-28 Thread David Herrmann
Ping? On Wed, Aug 13, 2014 at 9:16 AM, David Herrmann dh.herrm...@gmail.com wrote: Hardware manufacturers group keys in the weirdest way possible. This may cause a power-key to be grouped together with normal keyboard keys and thus be reported on the same kernel interface. However, user

Re: [PATCH] HID: add new gamepad LED constants

2014-09-25 Thread David Herrmann
Hi On Tue, Sep 23, 2014 at 6:37 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: It's the same discussion we had with backlights for years and we're trying eagerly to merge them into the DRM char-devs. So keyboard backlight is going to be controlled by display chardev? Or we are

Re: [PATCH] HID: add new gamepad LED constants

2014-09-16 Thread David Herrmann
Hi On Tue, Sep 16, 2014 at 12:58 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: The LED subsystem lacks any unprivileged API to control LEDs. As far as I can see it is the same as for input devices. You just need to make sure the device owner can access needed attributes, such as

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-15 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 4:47 PM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: On Mon, Sep 15, 2014 at 10:39 AM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: On Sun, Sep 14, 2014 at 12:45 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Sun, Aug 10, 2014 at 11

Re: [PATCH] HID: add new gamepad LED constants

2014-09-15 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 11:57 PM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: On Mon, Sep 15, 2014 at 11:03:47AM -0700, Michael Wright wrote: Why not introduce all 8 player LEDs as described in the document? You should be safe increasing LED_MAX to 0x1f. Wasn't sure if it was safe

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-14 Thread David Herrmann
Hi On Sun, Aug 10, 2014 at 11:56 AM, Fredrik Hallenberg megahal...@gmail.com wrote: Here is my attempt on a fix for bug 70181, please review it. It is tested on my nordic Corsair K70, if this solution is deemed acceptable I can ask some people with other problematic keyboards to test it.

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-14 Thread David Herrmann
Hi On Sun, Sep 14, 2014 at 6:45 PM, David Herrmann dh.herrm...@gmail.com wrote: Hi On Sun, Aug 10, 2014 at 11:56 AM, Fredrik Hallenberg megahal...@gmail.com wrote: Here is my attempt on a fix for bug 70181, please review it. It is tested on my nordic Corsair K70, if this solution is deemed

Re: [PATCH] HID: add new gamepad LED constants

2014-09-14 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 5:13 AM, Michael Wright michae...@android.com wrote: Improve gamepad support by introducing new LED constants for player LEDs and the mappings from their corresponding HID usages introduced in HUTTR47: http://www.usb.org/developers/hidpage/HUTRR47.pdf Why not

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-12 Thread David Herrmann
Hi On Thu, Sep 11, 2014 at 10:35 PM, Fredrik Hallenberg megahal...@gmail.com wrote: Thanks I had no idea about the hwdb but I have tried it now, it works if I use KEYBOARD_KEY_70031=reserved Thanks for confirming! on my nordic keyboard, but a US keyboard user would have to use scancode

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-12 Thread David Herrmann
Hi On Fri, Sep 12, 2014 at 1:34 PM, Fredrik Hallenberg megahal...@gmail.com wrote: Is the country tag derived from the bCountryCode seen in the HID device descriptor seen when doing lsusb -v? Yes, it is. If so it probably wont work as it says 0 (Not supported) on my keyboard and a few

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-11 Thread David Herrmann
Hi On Thu, Sep 11, 2014 at 10:50 AM, Fredrik Hallenberg megahal...@gmail.com wrote: The nicest fix, obviously, is to blacklist keys that are not physically present on the keyboard. But I assume the keyboard reports Hmm, somebody could still load keymap with duplicate keycodes though... The

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-10 Thread David Herrmann
Hi (CC Dmitry for AT details) On Wed, Sep 10, 2014 at 10:26 AM, Jiri Kosina jkos...@suse.cz wrote: On Tue, 9 Sep 2014, Fredrik Hallenberg wrote: Hi, time for a bump on this one. On Sun, Aug 10, 2014 at 11:56 AM, Fredrik Hallenberg megahal...@gmail.com wrote: Here is my attempt on a fix

Re: [PATCH] Handle spurious backslash key repeats on some keyboards

2014-09-10 Thread David Herrmann
Hi On Wed, Sep 10, 2014 at 1:13 PM, Fredrik Hallenberg megahal...@gmail.com wrote: The keyboards in question have n-key rollover, this seems to be implemented by sending every single key id every time the keyboard is polled, this includes several keys that does not exist physically for

Re: [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property

2014-09-02 Thread David Herrmann
Hi On Tue, Sep 2, 2014 at 2:43 PM, Hans de Goede hdego...@redhat.com wrote: Hi, It is useful for userspace to know that they're not dealing with a regular mouse but rather with a pointing stick (e.g. a trackpoint) so that userspace can e.g. automatically enable middle button scrollwheel

Re: [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property

2014-09-02 Thread David Herrmann
Hi On Tue, Sep 2, 2014 at 4:40 PM, Hans de Goede hdego...@redhat.com wrote: On 09/02/2014 02:55 PM, David Herrmann wrote: Hi On Tue, Sep 2, 2014 at 2:43 PM, Hans de Goede hdego...@redhat.com wrote: Hi, It is useful for userspace to know that they're not dealing with a regular mouse

[PATCH RESEND RESEND] Input: evdev - add event-mask API

2014-08-13 Thread David Herrmann
or event-types. Acked-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi Dmitry We could really make use of this for SUSPEND/POWER key handling. We keep getting reports from people where those keys are reported as part of the main keyboard. It's

Re: [RFC RESEND 5/5] Input: evdev - add new EVIOCGABSRANGE ioctl

2014-08-11 Thread David Herrmann
Hi On Mon, Aug 11, 2014 at 4:13 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Sun, Aug 10, 2014 at 05:01:35PM -0700, Dmitry Torokhov wrote: [...] is about handling corner-cases. If we make SYN_DROPPED handling cause SYN_DROPPED, we can just ignore it. yep, that too

Re: [RFC RESEND 5/5] Input: evdev - add new EVIOCGABSRANGE ioctl

2014-08-08 Thread David Herrmann
Hi On Wed, Aug 6, 2014 at 3:35 AM, Peter Hutterer peter.hutte...@who-t.net wrote: sorry for the late comments, not sure how that slipped through but it hadn't shown up in my inbox unil Benjamin poked me. On Sat, Jul 19, 2014 at 03:10:45PM +0200, David Herrmann wrote: When we introduced

[PATCH 04/12] HID: uhid: avoid magic-numbers when setting strings

2014-07-29 Thread David Herrmann
Avoid hard-coding the target buffer sizes and use sizeof() instead. This also makes us future-proof to buffer-extensions later on. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH 01/12] HID: uhid: simplify report-cb shutdown

2014-07-29 Thread David Herrmann
afterwards synchronously remove the HID device. Therefore, we wait for all report-cbs to finish before we return. This way, @running can never flip to true while we wait for it. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c | 11 ++- 1 file changed, 2

[PATCH 00/12] HID: Convert UHID to new HID transport-layer

2014-07-29 Thread David Herrmann
break backwards-compatibility. Thanks David David Herrmann (12): HID: uhid: simplify report-cb shutdown HID: uhid: forward create_req to create2_req HID: uhid: avoid dangling pointers in uhid context HID: uhid: avoid magic-numbers when setting strings HID: uhid: turn report_id into u32

[PATCH 03/12] HID: uhid: avoid dangling pointers in uhid context

2014-07-29 Thread David Herrmann
Avoid keeping uhid-rd_data and uhid-rd_size set in case uhid_dev_create2() fails. This is non-critical as we never flip uhid-running and thus never enter uhid_dev_destroy(). However, it's much nicer for debugging if pointers are only set if they point to valid data. Signed-off-by: David Herrmann

[PATCH 06/12] HID: uhid: invert report_done and make non-atomic

2014-07-29 Thread David Herrmann
All accesses to @report_done are protected by qlock (or report-contexts). No need to use an atomic. While at it, invert the logic and call it report_running. This is similar to the uhid-running field and easier to read. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c

[PATCH 02/12] HID: uhid: forward create_req to create2_req

2014-07-29 Thread David Herrmann
. uhid_dev_create2() doesn't access it. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c | 90 +++--- 1 file changed, 25 insertions(+), 65 deletions(-) diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 16af4d3..c05b544

[PATCH 07/12] HID: uhid: add ABI compatible UHID_GET_REPORT replacing UHID_FEATURE

2014-07-29 Thread David Herrmann
around to not break API. From now on, UHID_GET_REPORT must trigger a GET_REPORT request on the user-space hardware layer. All the ambiguity due to the weird feature name should be gone now. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c| 28

[PATCH 05/12] HID: uhid: turn report_id into u32

2014-07-29 Thread David Herrmann
All accesses to @report_id are protected by @qlock. No need to use an atomic. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 5dee8bd..db4e119

[PATCH 09/12] HID: uhid: rename uhid_raw_request to uhid_hid_raw_request

2014-07-29 Thread David Herrmann
extracted helpers and keep the same order as in struct hid_driver. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 8f5e46b

[PATCH 10/12] HID: uhid: implement SET_REPORT

2014-07-29 Thread David Herrmann
a restriction of HID and due to its blocking nature, this is just fine. Maybe some future transport layer supports parallel requests (very unlikely), however, until then lets not over-complicate things and avoid request-lookup-tables. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid

[PATCH 12/12] HID: uhid: update documentation

2014-07-29 Thread David Herrmann
Remove legacy bits, refer people to hid-transport.txt and add descriptions for all new features. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Documentation/hid/uhid.txt | 179 +++-- 1 file changed, 92 insertions(+), 87 deletions(-) diff --git

[PATCH 08/12] HID: uhid: keep legacy definitions at the bottom of uhid.h

2014-07-29 Thread David Herrmann
Instead of inlining the legacy definitions into the main part of uhid.h, keep them at the bottom now. This way, the API is much easier to read and legacy requests can be looked up at a separate place. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- include/uapi/linux/uhid.h | 101

[PATCH 11/12] HID: uhid: report to user-space whether reports are numbered

2014-07-29 Thread David Herrmann
-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/hid/uhid.c| 21 - include/uapi/linux/uhid.h | 11 +++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 1951148..f6ec5ea 100644 --- a/drivers/hid

Re: [PATCH 00/12] HID: Convert UHID to new HID transport-layer

2014-07-29 Thread David Herrmann
Hi On Tue, Jul 29, 2014 at 9:00 PM, Jiri Kosina jkos...@suse.cz wrote: On Tue, 29 Jul 2014, David Herrmann wrote: Hi When Benjamin cleanup up the transport layer, he left UHID mostly unconverted due to ABI issues. I promised to take a look, so here're the patches. Most of the patches

Re: [PATCH] hid: uhid.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-07-28 Thread David Herrmann
Hi On Sat, Jul 26, 2014 at 6:46 PM, Rickard Strandqvist rickard_strandqv...@spectrumdigital.se wrote: Replacing strncpy with strlcpy to avoid strings that lacks null terminate. And removed unnecessary magic numbers. Signed-off-by: Rickard Strandqvist rickard_strandqv...@spectrumdigital.se

Re: [PATCH RESEND 4/5] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-07-21 Thread David Herrmann
Hi On Mon, Jul 21, 2014 at 3:01 AM, Dmitry Torokhov dmitry.torok...@gmail.com wrote: Hi David, On Sat, Jul 19, 2014 at 03:10:44PM +0200, David Herrmann wrote: This adds a new ioctl UINPUT_DEV_SETUP that replaces the old device setup method (by write()'ing struct uinput_user_dev to the node

Re: [PATCH] Input: fix defuzzing logic

2014-07-20 Thread David Herrmann
on the original value instead. Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David Reviewed-by: Andrew de los Reyes a...@chromium.org Reviewed-by: Benson Leung ble...@chromium.org Signed-off-by: Dmitry Torokhov dmitry.torok...@gmail.com --- drivers/input/input.c | 6 -- 1

[RFC PATCH] Input: evdev - drop redundant list-locking

2014-07-20 Thread David Herrmann
evdev-client_list is rcu-protected. There is no need to have a separate spinlock just for the list. Either one is good enough, so lets drop the spinlock. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi I stumbled across this one when doing some evdev reviews. Maybe I'm missing

[PATCH v2] Input: evdev - drop redundant list-locking

2014-07-20 Thread David Herrmann
only once. Most of them are fairly trivial so there's little reason to extract them. This is needed to get better control over evdev-mutex locking. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- v2: - use evdev-mutex to protect against concurrent writes - inline most of the helper

[PATCH RESEND 0/5] Evdev Extensions

2014-07-19 Thread David Herrmann
months. Thanks David [1] fdo repo: http://cgit.freedesktop.org/~dvdhrm/linux/log/?h=input-next David Herrmann (5): Input: evdev - add event-mask API Input: uinput - uinput_validate_absbits() cleanup Input: uinput - add UI_GET_VERSION ioctl Input: uinput - add new UINPUT_DEV_SETUP ioctl

[PATCH RESEND 2/5] Input: uinput - uinput_validate_absbits() cleanup

2014-07-19 Thread David Herrmann
This moves basic checks and setup from uinput_setup_device() into uinput_validate_absbits() to make it easier to use. This way, we can call it from other places without copying the boilerplate code. Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: David Herrmann dh.herrm

[PATCH RESEND 4/5] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-07-19 Thread David Herrmann
axes if not set. The payload-size can now be specified by the caller. There is no need to copy the whole array temporarily into the kernel, but instead we can iterate over it and copy each value manually. Reviewed-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: David Herrmann dh.herrm

[PATCH RESEND 1/5] Input: evdev - add event-mask API

2014-07-19 Thread David Herrmann
or event-types. Acked-by: Peter Hutterer peter.hutte...@who-t.net Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/input/evdev.c | 156 - include/uapi/linux/input.h | 56 2 files changed, 210 insertions(+), 2

[RFC RESEND 5/5] Input: evdev - add new EVIOCGABSRANGE ioctl

2014-07-19 Thread David Herrmann
to receive an arbitrary range of axes. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/input/evdev.c | 180 - include/uapi/linux/input.h | 44 ++- 2 files changed, 219 insertions(+), 5 deletions(-) diff --git a/drivers/input/evdev.c

Re: [PATCH] Input: Add driver for Microchip's CAP1106

2014-07-11 Thread David Herrmann
Hi On Fri, Jul 11, 2014 at 9:42 AM, Daniel Mack zon...@gmail.com wrote: This patch adds a driver for Microchips CAP1106, an I2C driven, 6-channel capacitive touch sensor. For now, only the capacitive buttons are supported, and no specific settings that can be tweaked for individual channels,

Re: [PATCH] Input: Add driver for Microchip's CAP1106

2014-07-11 Thread David Herrmann
Hi On Fri, Jul 11, 2014 at 9:42 AM, Daniel Mack zon...@gmail.com wrote: This patch adds a driver for Microchips CAP1106, an I2C driven, 6-channel capacitive touch sensor. For now, only the capacitive buttons are supported, and no specific settings that can be tweaked for individual channels,

Re: [PATCH v3] Input: evdev - add event-mask API

2014-07-03 Thread David Herrmann
Hi Dmitry On Wed, Jun 18, 2014 at 7:42 AM, David Herrmann dh.herrm...@gmail.com wrote: Hardware manufacturers group keys in the weirdest way possible. This may cause a power-key to be grouped together with normal keyboard keys and thus be reported on the same kernel interface. However, user

Re: [PATCH v2 2/2] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-06-23 Thread David Herrmann
Hi On Mon, Jun 23, 2014 at 4:53 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Fri, Jun 20, 2014 at 01:26:40PM +0200, David Herrmann wrote: This adds a new ioctl UINPUT_DEV_SETUP that replaces the old device setup method (by write()'ing struct uinput_user_dev to the node). The old

Re: [RFC] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-06-20 Thread David Herrmann
Hi On Fri, Jun 20, 2014 at 2:55 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Thu, Jun 19, 2014 at 03:11:55PM +0200, David Herrmann wrote: This adds a new ioctl UINPUT_DEV_SETUP that replaces the old device setup method (by write()'ing struct uinput_user_dev to the node). The old

Re: [RFC] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-06-20 Thread David Herrmann
Hi On Fri, Jun 20, 2014 at 1:10 PM, David Herrmann dh.herrm...@gmail.com wrote: + * abs: This is an appended array that contains parameters for ABS + * axes. See struct input_absinfo for a description of these + * fields. This array is copied

[PATCH v2 1/2] Input: uinput - add UI_GET_VERSION ioctl

2014-06-20 Thread David Herrmann
This ioctl is the counterpart to EVIOCGVERSION and returns the uinput-version the kernel was compiled with. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/input/misc/uinput.c | 6 ++ include/uapi/linux/uinput.h | 9 + 2 files changed, 15 insertions(+) diff --git

[PATCH v2 2/2] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-06-20 Thread David Herrmann
axes if not set. The payload-size can now be specified by the caller. There is no need to copy the whole array temporarily into the kernel, but instead we can iterate over it and copy each value manually. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- v2: - drop version field - drop size

[RFC] Input: evdev - add new EVIOCGABSRANGE ioctl

2014-06-20 Thread David Herrmann
to receive an arbitrary range of axes. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/input/evdev.c | 180 - include/uapi/linux/input.h | 42 +++ 2 files changed, 218 insertions(+), 4 deletions(-) diff --git a/drivers/input/evdev.c

Re: [PATCH] Input: evdev - Fix incorrect kfree of err_free_client after vzalloc

2014-06-20 Thread David Herrmann
was not considered on below case. 1. kzalloc fail 2. vzalloc success 3. evdev_open_device fail 4. kfree So that address checking is needed to call correct free function. Signed-off-by: Yongtaek Lee ytk@samsung.com Reviewed-by: Daniel Stone dani...@collabora.com Reviewed-by: David Herrmann dh.herrm

Re: [RFC] Input: evdev - add new EVIOCGABSRANGE ioctl

2014-06-20 Thread David Herrmann
Hi On Fri, Jun 20, 2014 at 4:49 PM, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: Hi David, On Fri, Jun 20, 2014 at 10:05 AM, David Herrmann dh.herrm...@gmail.com wrote: When we introduced the slotted MT ABS extensions, we didn't take care to make SYN_DROPPED recoverable. Imagine

[RFC] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-06-19 Thread David Herrmann
axes if not set. The payload-size can now be specified by the caller. There is no need to copy the whole array temporarily into the kernel, but instead we can iterate over it and copy each value manually. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- Hi I replaced my old approach

[PATCH] Input: uinput - uinput_validate_absbits() cleanup

2014-06-19 Thread David Herrmann
This moves basic checks and setup from uinput_setup_device() into uinput_validate_absbits() to make it easier to use. This way, we can call it from other places without copying the boilerplate code. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- drivers/input/misc/uinput.c | 40

Re: [RFC] Input: uinput - add new UINPUT_DEV_SETUP ioctl

2014-06-19 Thread David Herrmann
Hi On Thu, Jun 19, 2014 at 3:11 PM, David Herrmann dh.herrm...@gmail.com wrote: This adds a new ioctl UINPUT_DEV_SETUP that replaces the old device setup method (by write()'ing struct uinput_user_dev to the node). The old method is not easily extendable and requires huge payloads. Furthermore

Re: [PATCH v2] Input: evdev - add event-mask API

2014-06-17 Thread David Herrmann
Hi On Wed, Jun 18, 2014 at 6:47 AM, Peter Hutterer peter.hutte...@who-t.net wrote: On Mon, Jun 16, 2014 at 12:09:18PM +0200, David Herrmann wrote: Hardware manufacturers group keys in the weirdest way possible. This may cause a power-key to be grouped together with normal keyboard keys

Re: [PATCH v3 1/2] elantech: Add support for trackpoint found on some v3 models

2014-06-16 Thread David Herrmann
init_fail_tp_alloc; This must be: if (!tp_dev) { error = -ENOMEM; goto init_fail_tp_alloc; } Otherwise, error is 0 due to the previous call to sysfs_create_group() and this function will return 0 erroneously. Apart from that, patch looks good to me: Reviewed-by: David Herrmann dh.herrm

Re: [PATCH v3 2/2] elantech: Call psmouse_reset when elantech probe fails

2014-06-16 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 11:21 PM, Ulrik De Bie ulrik.debie...@e2big.org wrote: Signed-off-by: Ulrik De Bie ulrik.debie...@e2big.org This patch lacks _any_ explanation why this is done. Please always write commit-messages! It is totally unclear from the patch description why the device is

[PATCH v2] Input: evdev - add event-mask API

2014-06-16 Thread David Herrmann
or event-types. Signed-off-by: David Herrmann dh.herrm...@gmail.com --- v2: - Drop empty SYN_REPORT - turn evdev_get_mask_cnt() into an array-lookup - add documentation - fix coding-style drivers/input/evdev.c | 156 - include/uapi/linux/input.h

Re: [PATCH v2 1/1] elantech: Add support for trackpoint found on some v3 models

2014-06-13 Thread David Herrmann
Hi On Thu, Jun 12, 2014 at 8:15 PM, Ulrik De Bie ulrik.debie...@e2big.org wrote: Some elantech v3 touchpad equipped laptops also have a trackpoint, before this commit, these give sync errors. With this patch, the trackpoint is provided as another input device: 'Elantech PS/2 TrackPoint' The

Re: [PATCH v2 1/1] elantech: Add support for trackpoint found on some v3 models

2014-06-13 Thread David Herrmann
Hi On Fri, Jun 13, 2014 at 9:24 AM, Hans de Goede hdego...@redhat.com wrote: You rely on external data here, so please check for truncation. If anyone changes psmouse-ps2dev.serio-phys, they would not notice that you rely on it here. So I'd do sth like: size_t n = snprintf(etd-tp_phys,

Re: joydev devices are world readable

2014-05-29 Thread David Herrmann
Hi On Thu, May 29, 2014 at 10:11 AM, Floris jkflo...@dds.nl wrote: Hey, after asking the systemd mailing list [1] I will try this list. Maybe someone can help me to solve this issue or point me to someone/ some list. The short version of the problem: I have created a multiseat setup with

Re: joydev devices are world readable

2014-05-29 Thread David Herrmann
Hi On Thu, May 29, 2014 at 11:44 AM, Floris jkflo...@dds.nl wrote: I posted an explanation on systemd-devel [1] this morning. Please note that this is a policy-issue created in user-space. The kernel-side cannot help you there. Furthermore, the kernel recommends using evdev instead of joydev

Re: [PATCH 16/18] HID: uhid: Use kmemdup instead of kmalloc + memcpy

2014-05-26 Thread David Herrmann
Hi On Mon, May 26, 2014 at 5:21 PM, Benoit Taine benoit.ta...@lip6.fr wrote: This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/memdup.cocci Signed-off-by: Benoit Taine benoit.ta...@lip6.fr Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David

Re: [PATCH] Input: implement managed polled input devices

2014-04-29 Thread David Herrmann
; Your error-paths in this function _must_ free devres via devres_free(). With this fixed: Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David + } + input_set_drvdata(input, dev); INIT_DELAYED_WORK(dev-work, input_polled_device_work); @@ -233,6 +332,12 @@ int

Re: [PATCH] Input: evdev - get rid of old workaround for EVIOCGBIT

2014-04-29 Thread David Herrmann
dmitry.torok...@gmail.com Yes, plase! Reviewed-by: David Herrmann dh.herrm...@gmail.com Thanks David -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: HID vendor access from user space

2014-04-23 Thread David Herrmann
Hi On Wed, Apr 23, 2014 at 11:14 AM, Nestor Lopez Casado nlopezca...@logitech.com wrote: A device with one mouse collection and one vendor collection would give something like this: /dev/input/eventX (no change) this comes via hid-input /dev/mouse (no change) /dev/hidrawX

Re: [PATCH] evdev: flush ABS_* events during EVIOCGABS

2014-04-22 Thread David Herrmann
Hi Peter On Tue, Apr 22, 2014 at 6:15 AM, Peter Hutterer peter.hutte...@who-t.net wrote: How are you planning to handle the slot-based events? We'd either need to add something similar (but more complex) to evdev_handle_mt_request or rely on the caller to call the whole EV_ABS range and ditch

  1   2   3   4   >