Re: [PATCH] Input: opencores-kbd: Switch to using managed resources

2014-10-08 Thread Tobias Klauser
On 2014-10-07 at 18:17:16 +0200, Dmitry Torokhov wrote: > On Tue, Oct 07, 2014 at 03:33:22PM +0200, Tobias Klauser wrote: > > On 2014-10-07 at 13:31:41 +0200, Pramod Gurav > > wrote: > > > This change switch to managed resources to simplifies error handling > > > and module unloading and does a

Xbox Controllers: Should hid be used?

2014-10-08 Thread Zachary L
Other 3rd party drivers (and seemingly Microsoft's driver as well) uses HID to describe the [any Xbox] controller's features. We can see uses of this in other drivers: TattieBogle - http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver XBCD - http://www.redcl0ud.com/xbcd.htm

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Ivan T. Ivanov
On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: > Hi Ivan, > > On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: > > @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct platform_device > > *pdev) > > > > + > > + kp->row_hold = devm_regmap_field_alloc(kp->dev, kp

usbhid: 10 seconds delay with N-Trig Duosense

2014-10-08 Thread Christian Hesse
Hello everybody, I am having trouble with N-Trig Duosense in a Lenovo Thinkpad T410s. Kernel version is 3.16.4. In lsusb the device identifies as: Bus 002 Device 004: ID 1b96:0001 N-Trig Duosense Transparent Electromagnetic Digitizer The touchscreen works, however loading usbhid module results i

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Ivan T. Ivanov
On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: > On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: > > Hi Ivan, > > > > On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: > > > @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct platform_device > > > *pdev) >

Re: [PATCH 0/2] Qualcomm PM8941 power key driver

2014-10-08 Thread Ivan T. Ivanov
On Tue, 2014-10-07 at 11:46 -0700, Bjorn Andersson wrote: > On Tue 07 Oct 02:01 PDT 2014, Ivan T. Ivanov wrote: > > > > > Hi Bjorn, > > > > On Mon, 2014-10-06 at 18:11 -0700, Bjorn Andersson wrote: > > > These patches add dt bindings and a device driver for the power key block > > > in > > > th

Re: [PATCH] Input: adp5588-keys: cancel workqueue in failure path

2014-10-08 Thread Pramod Gurav
Hi Dmitry, On Tue, Oct 7, 2014 at 10:08 PM, Dmitry Torokhov wrote: > On Tue, Oct 07, 2014 at 01:00:49PM +0530, Pramod Gurav wrote: >> This change introduces a label to call cancel_delayed_work_sync in >> failure path. >> >> Cc: Michael Hennerich >> Cc: Dmitry Torokhov >> Cc: linux-input@vger.ke

Re: [PATCH] Input: adp5588-keys: cancel workqueue in failure path

2014-10-08 Thread Pramod Gurav
On Wed, Oct 8, 2014 at 3:48 PM, Pramod Gurav wrote: > Hi Dmitry, > > On Tue, Oct 7, 2014 at 10:08 PM, Dmitry Torokhov > .. > Thanks. I saw the change in your tree. Shouldn't > cancel_delayed_work_sync(&kpad->work) be called under label > err_free_mem so that it will executed in case adp5588_read

[PATCH] Input: pxa27x_keypad: Switch to using managed resources

2014-10-08 Thread Pramod Gurav
This change switches to using devm_* APIs to allocate resources. This helps to simplify failure path in probe function and module unloading and does away with remove function. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Pramod Gurav --- drivers/input/keyboard/pxa27x_keyp

[PATCH] Input: nomadik-ske-keypad: Switch to using managed resources

2014-10-08 Thread Pramod Gurav
This change switches to using devm_* APIs to allocate resources. This helps to simplify failure path in probe function as well as remove function. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Pramod Gurav --- drivers/input/keyboard/nomadik-ske-keypad.c | 63 +---

Re: [PATCH 1/2] input: remove use of gpiochip_remove() retval

2014-10-08 Thread Linus Walleij
On Tue, Sep 30, 2014 at 4:34 PM, Pramod Gurav wrote: > Get rid of using return value from gpiochip_remove() as it returns > void. > > Cc: Linus Walleij > Cc: Alexandre Courbot > Cc: Dmitry Torokhov > Cc: linux-input@vger.kernel.org > Cc: linux-g...@vger.kernel.org > Signed-off-by: Pramod Gurav

[PATCH] Input: Add Microchip AR1021 i2c touchscreen

2014-10-08 Thread Christian Gmeiner
This patch adds support for the ar1021 i2c based touchscreen. The driver is quite simple and only supports the Touch Reporting Protocol. This is the final version for an RFC patch send a while ago. http://www.spinics.net/lists/linux-input/msg29419.html Signed-off-by: Christian Gmeiner --- drive

Re: How to indicate hover touch when exact distance unknown?

2014-10-08 Thread Henrik Rydberg
Hi Dmitry, > OK, so should we then say that we will continue reporting binary hovering > with ABS_MT_DISTANCE 0/1 and such devices must report resolution of 0; > devices reporting wider ABS_MT_DISTANCE ranges should also report > appropriate resolution, same as X/Y coordinates? Yes, I think this

[PATCH] Input: automatically set EV_ABS bit in input_set_abs_params

2014-10-08 Thread Dmitry Torokhov
Let's automatically set EV_ABS bit in device's event type list when calling input_set_abs_params() so that drivers do not have to do it explicitly. These calls are never in a hot paths so we won't lose much time by setting the same bit several times. Signed-off-by: Dmitry Torokhov --- drivers/i

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

2014-10-08 Thread David Herrmann
Hi On Wed, Oct 8, 2014 at 6:54 PM, Dmitry Torokhov wrote: > Let's automatically set EV_ABS bit in device's event type list when calling > input_set_abs_params() so that drivers do not have to do it explicitly. > > These calls are never in a hot paths so we won't lose much time by setting > the sa

Re: [PATCH] Input: Add Microchip AR1021 i2c touchscreen

2014-10-08 Thread Dmitry Torokhov
Hi Christian, On Wed, Oct 08, 2014 at 04:45:18PM +0200, Christian Gmeiner wrote: > +static irqreturn_t ar1021_i2c_irq(int irq, void *dev_id) > +{ > + struct ar1021_i2c *ar1021 = dev_id; > + struct input_dev *input = ar1021->input; > + u8 *data = ar1021->data; > + unsigned int x, y,

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Stephen Boyd
On 10/08/2014 02:30 AM, Ivan T. Ivanov wrote: On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: Hi Ivan, On Tue, Oct 07, 2014 at 12:50:46PM +0300, Ivan T. Ivanov wrote: @@ -527,10 +538,55 @@ static int pmic8xxx_kp_probe(struct p

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 11:00:07AM -0700, Stephen Boyd wrote: > On 10/08/2014 02:30 AM, Ivan T. Ivanov wrote: > >On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: > >>On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote: > >>>Hi Ivan, > >>> > >>>On Tue, Oct 07, 2014 at 12:50:46PM +0300,

Re: [PATCH] Input: mpr121: Switch to using managed resources

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 12:18:31PM +0530, Pramod Gurav wrote: > This change switches to using devm_* managed resources APIs to > request the resources in probe to simplify probe error path and > module unloading and does away with remove function. > > Cc: Dmitry Torokhov > Cc: linux-input@vger.ke

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Stephen Boyd
Adding Mark and Srini On 10/08/2014 11:13 AM, Dmitry Torokhov wrote: On Wed, Oct 08, 2014 at 11:00:07AM -0700, Stephen Boyd wrote: On 10/08/2014 02:30 AM, Ivan T. Ivanov wrote: On Wed, 2014-10-08 at 12:13 +0300, Ivan T. Ivanov wrote: On Tue, 2014-10-07 at 10:26 -0700, Dmitry Torokhov wrote:

Re: [PATCH] Input: pxa27x_keypad: Switch to using managed resources

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 04:20:11PM +0530, Pramod Gurav wrote: > This change switches to using devm_* APIs to allocate resources. > This helps to simplify failure path in probe function and module > unloading and does away with remove function. > > Cc: Dmitry Torokhov > Cc: linux-input@vger.kerne

[PATCH v2] HID: wacom: Prevent potential null dereference after disconnect

2014-10-08 Thread Jason Gerecke
Repeated connect/disconnect cycles under GNOME can trigger an occasional OOPS from within e.g. wacom_led_select_store, presumably due to a timing issue where userspace begins setting a value immediately before the device disconnects and our shared data is whisked away. Signed-off-by: Jason Gerecke

Re: [PATCH] Input: lpc32xx-keys: Switch to using managed resources

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 12:04:41PM +0530, Pramod Gurav wrote: > This change switches to using devm_* managed resources APIs to > request the resources in probe to simplify probe error path and > module unloading. > > Cc: Dmitry Torokhov > Cc: linux-input@vger.kernel.org > Signed-off-by: Pramod Gu

Re: [PATCH 2/2] input: cros_ec_keyb: Add of match table

2014-10-08 Thread Dmitry Torokhov
On Fri, Sep 19, 2014 at 10:08:13AM +0200, Sjoerd Simons wrote: > To enable the cros_ec_keyb driver to be auto-loaded when build as > module add an of match table (and export it) to match the modalias > information passed on to userspace as the Cros EC MFD driver registers > the MFD subdevices with

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Mark Brown
On Wed, Oct 08, 2014 at 11:20:58AM -0700, Stephen Boyd wrote: > On 10/08/2014 11:13 AM, Dmitry Torokhov wrote: > >>>Oops. struct regmap_field is opaque. It seems that the allocation > >>>is the only way that I could have instance of it. > >>Maybe we can add an API to allocate an array of fields?

Re: [PATCH 2/4] Input: pmic8xxx-keypad - use regmap_field for register access

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 09:04:26PM +0100, Mark Brown wrote: > On Wed, Oct 08, 2014 at 11:20:58AM -0700, Stephen Boyd wrote: > > On 10/08/2014 11:13 AM, Dmitry Torokhov wrote: > > > >>>Oops. struct regmap_field is opaque. It seems that the allocation > > >>>is the only way that I could have instanc

[RFC] avoid (theoretical) conflicts of input device file names

2014-10-08 Thread Richard Leitner
Hi, currently I discovered the possibility that device file numbers of the input subsystem could go negative when the signed int "border" is passed. To fix this behaviour I sent a patch a few minutes ago. But as the subject says there is currently the (theoretical) possibility that the same input

[PATCH] input: avoid negative input device numbers

2014-10-08 Thread Richard Leitner
From: Richard Leitner Fix the format string for input device name generation to avoid negative device numbers when the id exceeds the maximum signed integer value. Signed-off-by: Richard Leitner --- drivers/input/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

Re: [PATCH] input: avoid negative input device numbers

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 10:42:45PM +0200, Richard Leitner wrote: > From: Richard Leitner > > Fix the format string for input device name generation to avoid negative > device numbers when the id exceeds the maximum signed integer value. Well, it is going to take us a while to get there :) Appli

Re: [PATCH] input: avoid negative input device numbers

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 02:25:38PM -0700, Dmitry Torokhov wrote: > On Wed, Oct 08, 2014 at 10:42:45PM +0200, Richard Leitner wrote: > > From: Richard Leitner > > > > Fix the format string for input device name generation to avoid negative > > device numbers when the id exceeds the maximum signed

Re: [PATCH] input: avoid negative input device numbers

2014-10-08 Thread Richard Leitner
On Wed, 8 Oct 2014 14:30:51 -0700 Dmitry Torokhov wrote: > On Wed, Oct 08, 2014 at 02:25:38PM -0700, Dmitry Torokhov wrote: > > On Wed, Oct 08, 2014 at 10:42:45PM +0200, Richard Leitner wrote: > > > From: Richard Leitner > > > > > > Fix the format string for input device name generation to avoi

Re: [RFC] avoid (theoretical) conflicts of input device file names

2014-10-08 Thread Dmitry Torokhov
Hi Richard, On Wed, Oct 08, 2014 at 10:49:29PM +0200, Richard Leitner wrote: > Hi, > currently I discovered the possibility that device file numbers of the input > subsystem could go negative when the signed int "border" is passed. To fix > this behaviour I sent a patch a few minutes ago. > > But

[PATCH] serio: avoid negative serio device numbers

2014-10-08 Thread Richard Leitner
From: Richard Leitner Fix the format string for serio device name generation to avoid negative device numbers when the id exceeds the maximum signed integer value. Signed-off-by: Richard Leitner --- drivers/input/serio/serio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

Re: [PATCH v2] HID: wacom: Prevent potential null dereference after disconnect

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 11:25:42AM -0700, Jason Gerecke wrote: > Repeated connect/disconnect cycles under GNOME can trigger an occasional > OOPS from within e.g. wacom_led_select_store, presumably due to a timing > issue where userspace begins setting a value immediately before the > device disconn

Re: [PATCH] serio: avoid negative serio device numbers

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 11:54:27PM +0200, Richard Leitner wrote: > From: Richard Leitner > > Fix the format string for serio device name generation to avoid negative > device numbers when the id exceeds the maximum signed integer value. > > Signed-off-by: Richard Leitner Applied, thank you. >

Re: [PATCH v2] HID: wacom: Prevent potential null dereference after disconnect

2014-10-08 Thread Jason Gerecke
On Wed, Oct 8, 2014 at 2:40 PM, Dmitry Torokhov wrote: > On Wed, Oct 08, 2014 at 11:25:42AM -0700, Jason Gerecke wrote: >> Repeated connect/disconnect cycles under GNOME can trigger an occasional >> OOPS from within e.g. wacom_led_select_store, presumably due to a timing >> issue where userspace b

Re: [PATCH v2] HID: wacom: Prevent potential null dereference after disconnect

2014-10-08 Thread Dmitry Torokhov
On Wed, Oct 08, 2014 at 05:24:32PM -0700, Jason Gerecke wrote: > On Wed, Oct 8, 2014 at 2:40 PM, Dmitry Torokhov > wrote: > > On Wed, Oct 08, 2014 at 11:25:42AM -0700, Jason Gerecke wrote: > >> Repeated connect/disconnect cycles under GNOME can trigger an occasional > >> OOPS from within e.g. waco

Re: [PATCH v2] HID: wacom: Prevent potential null dereference after disconnect

2014-10-08 Thread Jason Gerecke
On Wed, Oct 8, 2014 at 5:28 PM, Dmitry Torokhov wrote: > On Wed, Oct 08, 2014 at 05:24:32PM -0700, Jason Gerecke wrote: >> On Wed, Oct 8, 2014 at 2:40 PM, Dmitry Torokhov >> wrote: >> > On Wed, Oct 08, 2014 at 11:25:42AM -0700, Jason Gerecke wrote: >> >> Repeated connect/disconnect cycles under G