[PATCH] HID: i2c-hid: add ACPI support

2013-01-08 Thread Mika Westerberg
The HID over I2C protocol specification states that when the device is enumerated from ACPI the HID descriptor address can be obtained by executing _DSM for the device with function 1. Enable this. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/i2c-hid/i2c-hid.c

Re: [PATCH] HID: i2c-hid: add ACPI support

2013-01-08 Thread Mika Westerberg
On Tue, Jan 08, 2013 at 02:51:53PM +0100, Benjamin Tissoires wrote: Hi Mika, On Tue, Jan 8, 2013 at 2:05 PM, Mika Westerberg mika.westerb...@linux.intel.com wrote: The HID over I2C protocol specification states that when the device is enumerated from ACPI the HID descriptor address can

Re: [PATCH] HID: i2c-hid: add ACPI support

2013-01-09 Thread Mika Westerberg
one point in my previous review: Please note that I can only compare this to my patch, based on the DSDT example Microsoft gave in its spec. So sorry if I'm asking useless things, but I like to understand... :) Here are a few comments: Signed-off-by: Mika Westerberg

[PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus

2013-02-11 Thread Mika Westerberg
We now have two transport mediums: USB and I2C, where sensor hubs can exists. So instead of constraining the driver to only these two we let it to match any HID bus as long as the group is HID_GROUP_SENSOR_HUB. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/hid

Re: [PATCH 0/7] hid driver transport cleanup

2013-02-11 Thread Mika Westerberg
On Mon, Feb 11, 2013 at 12:19:13PM +0100, Benjamin Tissoires wrote: On Mon, Feb 11, 2013 at 11:13 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: On Fri, Feb 08, 2013 at 03:37:29PM +0100, Benjamin Tissoires wrote: so, here is the hid drivers cleanup. The aim is to remove as much

Re: [PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus

2013-02-12 Thread Mika Westerberg
On Mon, Feb 11, 2013 at 03:54:05PM +, Pandruvada, Srinivas wrote: So finally we can use HID sensor hub over I2C. Did you try with any I2C sensor hub? Yes, we have I2C HID sensor hub here and I tested with it. However, I'm not that familiar how it should be used except that I can see the

Re: [PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus

2013-02-18 Thread Mika Westerberg
On Mon, Feb 18, 2013 at 12:03:04PM +0100, Alexander Holler wrote: Am 11.02.2013 11:31, schrieb Mika Westerberg: We now have two transport mediums: USB and I2C, where sensor hubs can exists. So instead of constraining the driver to only these two we let it to match any HID bus as long

Re: [PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus

2013-02-18 Thread Mika Westerberg
On Mon, Feb 18, 2013 at 12:22:58PM +0100, Alexander Holler wrote: Am 18.02.2013 12:12, schrieb Mika Westerberg: On Mon, Feb 18, 2013 at 12:03:04PM +0100, Alexander Holler wrote: Am 11.02.2013 11:31, schrieb Mika Westerberg: We now have two transport mediums: USB and I2C, where sensor hubs can

Re: [PATCH 3/3] HID: sensor-hub: don't limit the driver only to USB bus

2013-02-18 Thread Mika Westerberg
On Mon, Feb 18, 2013 at 12:37:52PM +0100, Alexander Holler wrote: Am 18.02.2013 12:33, schrieb Mika Westerberg: On Mon, Feb 18, 2013 at 12:22:58PM +0100, Alexander Holler wrote: Am 18.02.2013 12:12, schrieb Mika Westerberg: On Mon, Feb 18, 2013 at 12:03:04PM +0100, Alexander Holler wrote: Am

[PATCH] HID: make sensor autodetection independent of underlying bus

2013-02-19 Thread Mika Westerberg
Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/hid-core.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index fe3a59e..f89e902 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c

Re: [PATCH 12/14] HID: sensor-hub: validate feature report details

2013-08-29 Thread Mika Westerberg
-2898 Signed-off-by: Kees Cook keesc...@chromium.org Cc: sta...@kernel.org Reviewed-by: Mika Westerberg mika.westerb...@linux.intel.com -- 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

Q: weird hidraw behaviour

2013-09-24 Thread Mika Westerberg
Hi, I noticed that after commit 212a871a393 (HID: hidraw: correctly deallocate memory on device disconnect) hidraw doesn't close the underlying hid device when the device node is closed last time. For example I have a touch panel (HID over I2C) device with added debug prints in

Re: weird hidraw behaviour

2013-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2013 at 05:13:16PM +0530, Manoj Chourasia wrote: Can you please try the attached patch and see if it fixes this issue? Yes, that patch fixes the issue for me, thanks! It introduces following warning, though: drivers/hid/hidraw.c: In function ‘drop_ref’:

Re: weird hidraw behaviour

2013-10-01 Thread Mika Westerberg
On Tue, Oct 01, 2013 at 07:07:57PM +0530, Manoj Chourasia wrote: I have posted the patch in mailing list for review. Attaching it here too. Please test it one more time as I have fixed the warning. Still works for me, thanks! -- To unsubscribe from this list: send the line unsubscribe

Re: Q: weird hidraw behaviour

2013-10-10 Thread Mika Westerberg
On Thu, Oct 10, 2013 at 11:26:45AM +0200, David Herrmann wrote: Hi On Tue, Sep 24, 2013 at 10:56 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: Hi, I noticed that after commit 212a871a393 (HID: hidraw: correctly deallocate memory on device disconnect) hidraw doesn't close

[PATCH] HID: i2c-hid: add runtime PM support

2014-01-14 Thread Mika Westerberg
we are no more interested in getting events), nevertheless it allows us to save some power and works with devices that are not wake capable. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/i2c-hid/i2c-hid.c | 81 --- 1 file

Re: [PATCH] HID: i2c-hid: add runtime PM support

2014-01-28 Thread Mika Westerberg
On Mon, Jan 27, 2014 at 10:36:25PM -0500, Benjamin Tissoires wrote: On Tue, Jan 14, 2014 at 5:13 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: This patch adds runtime PM support for the HID over I2C driver. When the i2c-hid device is first opened we power it on and on the last

Re: [PATCH] HID: i2c-hid: add runtime PM support

2014-01-29 Thread Mika Westerberg
On Tue, Jan 28, 2014 at 09:19:33AM -0500, Benjamin Tissoires wrote: On Tue, Jan 28, 2014 at 4:12 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: On Mon, Jan 27, 2014 at 10:36:25PM -0500, Benjamin Tissoires wrote: On Tue, Jan 14, 2014 at 5:13 AM, Mika Westerberg mika.westerb

[PATCH v2] HID: i2c-hid: add runtime PM support

2014-01-29 Thread Mika Westerberg
with devices that are not wake capable. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- v2: - Update changelog to mention that ACPI power domain for example can power off the device on suspend. - Make i2c_hid_power to just call RPM get/put drivers/hid/i2c-hid/i2c-hid.c

Re: [PATCH] HID: i2c-hid: add runtime PM support

2014-01-30 Thread Mika Westerberg
On Wed, Jan 29, 2014 at 09:57:00AM -0500, Benjamin Tissoires wrote: That's great. I hope this will also fix my Lenovo Miix 2 (the T100 is too expensive compared to the Dell Venue pro 8 and the Lenovo one) :) I think most of my problems are ACPI related (WIFI card not powered up, SD-ext reader

Re: [PATCH] HID: i2c-hid: Support batch read of input events from fifo

2014-05-09 Thread Mika Westerberg
On Thu, May 08, 2014 at 05:34:49PM -0400, Benjamin Tissoires wrote: On Thu, May 8, 2014 at 2:10 PM, Jonathan Cameron ji...@kernel.org wrote: On May 8, 2014 3:28:23 PM GMT+01:00, Benjamin Tissoires benjamin.tissoi...@gmail.com wrote: On Thu, May 8, 2014 at 9:32 AM, Archana Patni

Re: [PATCH] i2c-hid / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM

2014-12-03 Thread Mika Westerberg
be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM in drivers/hid/i2c-hid/i2c-hid.c. Signed-off-by: Rafael J. Wysocki rafael.j.wyso...@intel.com Reviewed-by: Mika Westerberg mika.westerb...@linux.intel.com -- To unsubscribe from this list: send the line unsubscribe

Re: NULL pointer dereference in i2c-hid

2014-12-11 Thread Mika Westerberg
On Wed, Dec 10, 2014 at 06:04:51PM +0100, Gabriele Mazzotta wrote: my laptop uses a touchpad that needs hid-rmi along with i2c-hid to work. i2c-hid and hid-rmi can be loaded and unloaded independelty from each other, however since 34f439e4afcd (HID: i2c-hid: add runtime PM support) if I unload

Re: NULL pointer dereference in i2c-hid

2014-12-11 Thread Mika Westerberg
On Thu, Dec 11, 2014 at 10:58:01AM +0200, Mika Westerberg wrote: On Wed, Dec 10, 2014 at 06:04:51PM +0100, Gabriele Mazzotta wrote: my laptop uses a touchpad that needs hid-rmi along with i2c-hid to work. i2c-hid and hid-rmi can be loaded and unloaded independelty from each other, however

[PATCH] HID: i2c-hid: Do not free buffers in i2c_hid_stop()

2014-12-12 Thread Mika Westerberg
] ? system_call_fastpath+0x12/0x17 Fix this so that we only free buffers when the i2c-hid driver itself is removed. Fixes: 34f439e4afcd (HID: i2c-hid: add runtime PM support) Reported-by: Gabriele Mazzotta gabriele@gmail.com Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com Reviewed

[PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
. This is then assumed to be the GPIO that serves as an interrupt for the device. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- .../devicetree/bindings/hid/hid-over-i2c.txt | 5 +- drivers/hid/i2c-hid/i2c-hid.c | 70 -- 2 files

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 02:50:01PM +, Mark Rutland wrote: On Mon, Jan 26, 2015 at 02:47:29PM +, Mika Westerberg wrote: On Mon, Jan 26, 2015 at 02:37:24PM +, Mark Rutland wrote: On Mon, Jan 26, 2015 at 02:29:33PM +, Mika Westerberg wrote: The HID over I2C specification

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 04:01:20PM +, Mark Rutland wrote: On Mon, Jan 26, 2015 at 03:16:37PM +, Mika Westerberg wrote: On Mon, Jan 26, 2015 at 02:50:01PM +, Mark Rutland wrote: On Mon, Jan 26, 2015 at 02:47:29PM +, Mika Westerberg wrote: On Mon, Jan 26, 2015 at 02:37:24PM

[PATCH 1/2] HID: i2c-hid: The interrupt should be level sensitive

2015-01-26 Thread Mika Westerberg
also seems to do the same. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/i2c-hid/i2c-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index d43e967e7533..8f1dfc5c5d9c 100644

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-26 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 02:37:24PM +, Mark Rutland wrote: On Mon, Jan 26, 2015 at 02:29:33PM +, Mika Westerberg wrote: The HID over I2C specification allows to have the interrupt for a HID device to be GPIO instead of directly connected to the IO-APIC. Add support for this so

Re: i2c_hid: Could not register for interrupt, irq = -1 on Thinkpad Tablet 10

2015-02-02 Thread Mika Westerberg
On Mon, Feb 02, 2015 at 09:19:51PM +0800, Sebastien Bourdeauducq wrote: On Monday, February 02, 2015 06:00 PM, Mika Westerberg wrote: With this patch and IRQF_TRIGGER_LOW | IRQF_ONESHOT, I get an interrupt flood and the kernel disables the interrupt line. I have reverted

Re: i2c_hid: Could not register for interrupt, irq = -1 on Thinkpad Tablet 10

2015-02-02 Thread Mika Westerberg
On Sun, Feb 01, 2015 at 11:27:09AM +0800, Sebastien Bourdeauducq wrote: Hi, On Sunday, February 01, 2015 04:39 AM, Benjamin Tissoires wrote: Mika sent a patch recently which should solve your problem. Can you give a try to the following patch? https://patchwork.kernel.org/patch/5709961/

Re: i2c_hid: Could not register for interrupt, irq = -1 on Thinkpad Tablet 10

2015-02-02 Thread Mika Westerberg
On Mon, Feb 02, 2015 at 11:32:19PM +0800, Sébastien Bourdeauducq wrote: On 02/02/2015 09:48 PM, Mika Westerberg wrote: On Mon, Feb 02, 2015 at 09:19:51PM +0800, Sebastien Bourdeauducq wrote: With this computer nothing is normal. Every single component except the CPU, display and USB has

Re: i2c_hid: Could not register for interrupt, irq = -1 on Thinkpad Tablet 10

2015-02-03 Thread Mika Westerberg
On Tue, Feb 03, 2015 at 04:53:14PM +0800, Sébastien Bourdeauducq wrote: On 02/02/2015 11:57 PM, Mika Westerberg wrote: Maybe the interrupt should be level sensitive and enabled only after certain parts of the device initialization have taken place. The device should respond to reset

Re: About Goodix-TS on Bay Trail, and ACPI and interrupts

2015-01-20 Thread Mika Westerberg
if i2c-hid driver gets you working touch screen? Also please add i2c_hid.debug=1 to the kernel command line so we can see if it returns proper HID descriptor. From 9b7518976295978b28e1ad7a2404a139b0cd9345 Mon Sep 17 00:00:00 2001 From: Mika Westerberg mika.westerb...@linux.intel.com Date: Fri, 3 Oct

Re: About Goodix-TS on Bay Trail, and ACPI and interrupts

2015-01-21 Thread Mika Westerberg
On Tue, Jan 20, 2015 at 11:31:52AM -0500, Benjamin Tissoires wrote: What makes you think it should use the goodix driver? The fact that the 3.19-rc4 log says: [2.424370] i2c_hid i2c-GODX0911:01: unexpected HID descriptor bcdVersion (0x) Which is rather troublesome and shows that

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-27 Thread Mika Westerberg
On Tue, Jan 27, 2015 at 02:33:34PM +, Mark Rutland wrote: Ok, that allays my fear w.r.t. ordering of the resources. As I see it, the fact that we convert GpioInt entries to GPIOs rather than irqs when parsing _CRS is the issue here, and to me it makes no sense that we do so. Were we to

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-27 Thread Mika Westerberg
On Tue, Jan 27, 2015 at 10:39:25AM +, Mark Rutland wrote: If the above is not the right way to use GPIOs as interrupt, can you please tell me how it is done then? So lets say we have a device which generates an interrupt: device@f00 { compatible =

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-27 Thread Mika Westerberg
On Mon, Jan 26, 2015 at 04:39:30PM +, Mark Rutland wrote: What I don't follow is why GpioInt seems to be translated as a GPIO rather than as an interrupt which happens to be backed by a GPIO. Were it not for that, the DT and ACPI cases would align better. Because it *is* a GPIO. In my

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-27 Thread Mika Westerberg
On Tue, Jan 27, 2015 at 03:06:06PM +, Mark Rutland wrote: On Tue, Jan 27, 2015 at 02:41:27PM +, Mika Westerberg wrote: On Tue, Jan 27, 2015 at 02:33:34PM +, Mark Rutland wrote: Ok, that allays my fear w.r.t. ordering of the resources. As I see it, the fact that we convert

Re: [PATCH 2/2] HID: i2c-hid: Add support for GPIO interrupts

2015-01-27 Thread Mika Westerberg
On Tue, Jan 27, 2015 at 03:57:47PM +, Mark Rutland wrote: On Tue, Jan 27, 2015 at 03:21:27PM +, Mika Westerberg wrote: On Tue, Jan 27, 2015 at 03:06:06PM +, Mark Rutland wrote: On Tue, Jan 27, 2015 at 02:41:27PM +, Mika Westerberg wrote: On Tue, Jan 27, 2015 at 02:33:34PM

Re: About Goodix-TS on Bay Trail, and ACPI and interrupts

2015-02-09 Thread Mika Westerberg
On Fri, Feb 06, 2015 at 05:00:13PM +0100, Antonio Ospite wrote: Last doubt, now that I am fixing the DSDT I am going to add an Interrupt resource, but what is the correct way to specify its value? Pin 3 of GPO2 is mapped to IRQ 220 by the mainline kernel, so I added this: Interrupt

Re: [PATCH v2] HID: i2c-hid: Fix suspend/resume when already runtime suspended

2015-03-10 Thread Mika Westerberg
On Mon, Mar 09, 2015 at 12:44:47PM -0700, Doug Anderson wrote: If the i2c-hid device was runtime suspended and then the system suspended itself we'd end up disabling interrupts twice (in i2c_hid_runtime_suspend and i2c_hid_suspend) and not reenabling them until later when the i2c-hid device

Re: [PATCH v2] HID: i2c-hid: Fix suspend/resume when already runtime suspended

2015-03-12 Thread Mika Westerberg
On Wed, Mar 11, 2015 at 08:06:47AM -0700, Doug Anderson wrote: Mika, On Wed, Mar 11, 2015 at 4:20 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: On Tue, Mar 10, 2015 at 09:12:36AM -0700, Doug Anderson wrote: Thanks for testing! Can you do a dump_stack() here? I'm curious

Re: [PATCH v2] HID: i2c-hid: Fix suspend/resume when already runtime suspended

2015-03-11 Thread Mika Westerberg
On Tue, Mar 10, 2015 at 09:12:36AM -0700, Doug Anderson wrote: Thanks for testing! Can you do a dump_stack() here? I'm curious why it's deciding to runtime resume. Maybe something changed between 3.14 and ToT? Here you go: [ 26.711737] i2c_hid i2c-ATML1000:00: PM: i2c-hid runtime resume

Re: [PATCH v2] HID: i2c-hid: Fix suspend/resume when already runtime suspended

2015-03-12 Thread Mika Westerberg
On Thu, Mar 12, 2015 at 08:24:53AM -0700, Doug Anderson wrote: Mika, On Thu, Mar 12, 2015 at 2:10 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: That's interesting. So you have an ARM device with i2c-hid compatible device connected to it? Out of curiousity, do you use DT

Re: [PATCH v2] HID: i2c-hid: Fix suspend/resume when already runtime suspended

2015-03-12 Thread Mika Westerberg
On Thu, Mar 12, 2015 at 11:10:14AM +0200, Mika Westerberg wrote: On Wed, Mar 11, 2015 at 08:06:47AM -0700, Doug Anderson wrote: Mika, On Wed, Mar 11, 2015 at 4:20 AM, Mika Westerberg mika.westerb...@linux.intel.com wrote: On Tue, Mar 10, 2015 at 09:12:36AM -0700, Doug Anderson wrote

[PATCH 0/3] HID: Support for Lenovo Thinkpad 10 digitizer

2015-02-23 Thread Mika Westerberg
to represent GPIO/interrupt configuration and still makes current ACPI based devices to work. The first two patches are needed to get the Wacom digitizer work properly with i2c-hid. Mika Westerberg (3): HID: wacom: Add support for I2C connected devices HID: i2c-hid: Read wMaxInputLength of input

[PATCH 1/3] HID: wacom: Add support for I2C connected devices

2015-02-23 Thread Mika Westerberg
Lenovo Thinkpad 10 has wacom digitizer connected as a I2C-HID device. Add generic support for this. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/wacom_wac.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/hid/wacom_wac.c b/drivers/hid

[PATCH 3/3] HID: i2c-hid: Add support for ACPI GPIO interrupts

2015-02-23 Thread Mika Westerberg
in _CRS. If it is found we convert it to an interrupt number and use it instead. Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/i2c-hid/i2c-hid.c | 68 +++ 1 file changed, 50 insertions(+), 18 deletions(-) diff --git

[PATCH 2/3] HID: i2c-hid: Read wMaxInputLength of input report instead of bufsize

2015-02-23 Thread Mika Westerberg
if the value looks sane. Reported-by: Sébastien Bourdeauducq s...@m-labs.hk Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/i2c-hid/i2c-hid.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index

Re: [PATCH 3/7] thinkpad_acpi: Add adaptive_kbd_mode sysfs attr

2015-02-20 Thread Mika Westerberg
On Fri, Feb 20, 2015 at 03:44:22PM +0100, Bastien Nocera wrote: Add a sysfs attribute to allow privileged users to change the keyboard mode. This could be used by desktop environments to change the keyboard mode depending on the application focused, as the Windows application does. If you are

Re: [PATCH 3/7] thinkpad_acpi: Add adaptive_kbd_mode sysfs attr

2015-02-20 Thread Mika Westerberg
On Fri, Feb 20, 2015 at 04:22:07PM +0100, Bastien Nocera wrote: On Fri, 2015-02-20 at 17:20 +0200, Mika Westerberg wrote: On Fri, Feb 20, 2015 at 03:44:22PM +0100, Bastien Nocera wrote: Add a sysfs attribute to allow privileged users to change the keyboard mode. This could be used

Re: [PATCH 2/3] HID: i2c-hid: Read wMaxInputLength of input report instead of bufsize

2015-02-23 Thread Mika Westerberg
On Mon, Feb 23, 2015 at 10:26:35AM -0500, Benjamin Tissoires wrote: On Feb 23 2015 or thereabouts, Mika Westerberg wrote: Wacom digitizer (WCOM0008) on Lenovo Thinkpad 10 seems to allow reading of subsequent reports (or part of them) if we read more than wMaxInputLength of data at the time

Re: [PATCH 3/3] HID: i2c-hid: Add support for ACPI GPIO interrupts

2015-02-23 Thread Mika Westerberg
On Mon, Feb 23, 2015 at 10:35:02AM -0500, Benjamin Tissoires wrote: On Feb 23 2015 or thereabouts, Mika Westerberg wrote: The HID over I2C specification allows to have the interrupt for a HID device to be GPIO instead of directly connected to the IO-APIC. Add support for this so

Re: [PATCH 3/3] HID: i2c-hid: Add support for ACPI GPIO interrupts

2015-02-25 Thread Mika Westerberg
On Tue, Feb 24, 2015 at 10:27:05PM +0100, Antonio Ospite wrote: On Mon, 23 Feb 2015 15:52:45 +0200 Mika Westerberg mika.westerb...@linux.intel.com wrote: The HID over I2C specification allows to have the interrupt for a HID device to be GPIO instead of directly connected to the IO-APIC

Re: Hidden dependency of i2c-hid on GPIOLIB

2015-04-14 Thread Mika Westerberg
On Tue, Apr 14, 2015 at 12:55:20AM +0200, Gabriele Mazzotta wrote: Hi, my touchpad stopped working because of a485923efbb8 (HID: i2c-hid: Add support for ACPI GPIO interrupts). It turned out that I need CONFIG_GPIOLIB. I think this dependency should be made explicit or the driver should not

[PATCH] HID: i2c-hid: Do not fail probing if gpiolib is not enabled

2015-04-14 Thread Mika Westerberg
() returns -ENXIO when !CONFIG_GPIOLIB. Fix this by checking the return value against -ENXIO and 0 and only in that case fail the probe. Reported-by: Gabriele Mazzotta gabriele@gmail.com Signed-off-by: Mika Westerberg mika.westerb...@linux.intel.com --- drivers/hid/i2c-hid/i2c-hid.c | 5

Re: [PATCH] HID: i2c-hid: Do not set the ACPI companion field in the HID device

2015-06-03 Thread Mika Westerberg
acpi_bind_one uses's the companion ACPI device's wakeup flags to set the device as wake capable. Which results in power/wakeup files in sysfs for the HID device which do not do anything. Signed-off-by: Andrew Duggan adug...@synaptics.com Acked-by: Mika Westerberg mika.westerb...@linux.intel.com

Re: input: gpio_keys_polled: Request GPIO pin as input.

2015-08-18 Thread Mika Westerberg
of that the patch itself looks good, Reviewed-by: Mika Westerberg mika.westerb...@linux.intel.com -- 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: [PATCH] HID: i2c-hid: Only disable irq wake if it was successfully enabled during suspend

2015-07-28 Thread Mika Westerberg
On Mon, Jul 27, 2015 at 05:08:06PM -0700, Andrew Duggan wrote: On at least one platform the kernel prints a warning on resume saying Unbalanced IRQ 37 wake disable. This is because enable_irq_wake in the suspend function is failing. This patch checks to see if the call to enable_irq_wake

Re: [PATCH v2] HID: multitouch: Fetch feature reports on demand for Win8 devices

2015-10-08 Thread Mika Westerberg
On Wed, Oct 07, 2015 at 06:12:42PM -0700, Andrew Duggan wrote: > I can confirm that it is working on the Dell XPS 13 and the buttonpad > property is set correctly. However, I also tried it on an older non > production precision touchpad and it didn't work. It reports that it fails > to fetch

Re: [PATCH v2] HID: multitouch: Fetch feature reports on demand for Win8 devices

2015-10-09 Thread Mika Westerberg
On Thu, Oct 08, 2015 at 06:10:23PM -0700, Andrew Duggan wrote: > No, this touchpad doesn't have HID_QUIRK_NO_INIT_REPORTS set and > usbhid/hid-core.c is calling usbhid_init_reports() which is retrieving > feature 8. But, I did some additional testing and I wasn't able to reproduce > this issue on

[PATCH v2] HID: multitouch: Fetch feature reports on demand for Win8 devices

2015-10-07 Thread Mika Westerberg
this by preventing initial feature report retrieval for Win8 devices. Instead we fetch reports as needed in mt_feature_mapping(). This prevents fetching reports which might cause problems with the device in question. Suggested-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Signed-off-by: Mika West

Re: [PATCH] HID: multitouch: Fetch feature reports on demand for Win8 devices

2015-09-30 Thread Mika Westerberg
On Tue, Sep 29, 2015 at 05:04:31AM -0400, Benjamin Tissoires wrote: > > +static void mt_get_feature(struct hid_device *hdev, struct hid_report > > *report) > > +{ > > + int ret, size = hid_report_len(report); > > + u8 *buf; > > + > > + /* > > +* Only fetch the feature report if initial

[PATCH] HID: multitouch: Add suffix for HID_DG_TOUCHPAD

2015-09-28 Thread Mika Westerberg
Instead of printing "UNKNOWN" as device suffix for HID_DG_TOUCHPAD call the device as "Touchpad". Signed-off-by: Mika Westerberg <mika.westerb...@linux.intel.com> --- drivers/hid/hid-multitouch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-

[PATCH] HID: multitouch: Fetch feature reports on demand for Win8 devices

2015-09-28 Thread Mika Westerberg
this by preventing initial feature report retrieval for Win8 devices. Instead we fetch reports as needed in mt_feature_mapping(). This prevents fetching reports which might cause problems with the device in question. Suggested-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Signed-off-by: Mika West

[PATCH 2/2] HID: i2c-hid: Fill in physical device providing HID functionality

2015-09-28 Thread Mika Westerberg
cal device name. Signed-off-by: Mika Westerberg <mika.westerb...@linux.intel.com> --- drivers/hid/i2c-hid/i2c-hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c index 2871f3c81a4c..10bd8e6e4c9c 100644 --- a/drivers/hid/i2c-hid

[PATCH 1/2] HID: Show I2C bus type in hid_connect()

2015-09-28 Thread Mika Westerberg
For I2C HID devices output currently looks like: hid-multitouch ... input,hidraw0: HID v1.00 Mouse ... Add knowledge about I2C bus to hid_connect() so that it shows "I2C" correctly instead of "". Signed-off-by: Mika Westerberg <mika.westerb...@linux.intel.com> ---

[PATCH] HID: multitouch: Do not fetch initial feature reports for Win8 devices

2015-09-24 Thread Mika Westerberg
us/library/windows/hardware/dn467314(v=vs.85).aspx Signed-off-by: Mika Westerberg <mika.westerb...@linux.intel.com> --- drivers/hid/hid-multitouch.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c in

Re: [PATCH] HID: multitouch: Do not fetch initial feature reports for Win8 devices

2015-09-25 Thread Mika Westerberg
On Thu, Sep 24, 2015 at 09:16:01PM -0400, Benjamin Tissoires wrote: > > diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c > > index 426b2f1a3450..1911f7698511 100644 > > --- a/drivers/hid/hid-multitouch.c > > +++ b/drivers/hid/hid-multitouch.c > > @@ -1020,14 +1020,16 @@

Re: [RESEND] Lenovo Yoga 900 touchpad issues

2015-12-16 Thread Mika Westerberg
On Tue, Dec 15, 2015 at 11:14:32AM -0800, Nish Aravamudan wrote: > [Apologies for the resend, didn't realize I hadn't changed my GMail settings > to not use HTML.] > > I have recently purchased a Lenovo Yoga 900 and most everything is working > with a slightly modified 4.4-rc5

Re: [RESEND] Lenovo Yoga 900 touchpad issues

2015-12-18 Thread Mika Westerberg
On Wed, Dec 16, 2015 at 02:58:11PM -0800, Nish Aravamudan wrote: > With the patch applied to my patched 4.4-rc5, things seem to be > working now. I do get one "failed to reset device" message in the > logs, but then I'm guessing the second one succeeds and I don't see > the "failed to resume"

Re: [RESEND] Lenovo Yoga 900 touchpad issues

2015-12-18 Thread Mika Westerberg
On Fri, Dec 18, 2015 at 04:42:09PM +0200, Mika Westerberg wrote: > On another occasion the faulty input report was received immediatelly > after we call i2c_hid_set_power(). > > With below hack patch suspend/resume works fine but it is far from being > suitable for merging.

[PATCH] HID: i2c-hid: Prevent sending reports from racing with device reset

2015-12-21 Thread Mika Westerberg
that time. Reported-by: Nish Aravamudan <nish.aravamu...@gmail.com> Reported-by: Linus Torvalds <torva...@linux-foundation.org> Suggested-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Signed-off-by: Mika Westerberg <mika.westerb...@linux.intel.com> --- drivers/hi

Re: [RESEND] Lenovo Yoga 900 touchpad issues

2015-12-21 Thread Mika Westerberg
On Fri, Dec 18, 2015 at 05:10:31PM +0100, Benjamin Tissoires wrote: > After turning this around, I think I finally got what was going on (and > yes, it's basically a race that should have been caught long ago): > - during resume, the i2c-hid driver calls reset, which is a long (few > ms)