* [PATCH] Scale up touch width and height values for Intuos Pro
From: Jason Gerecke @ 2013-09-25 23:22 UTC (permalink / raw)
To: linuxwacom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
linux-input-u79uwXL29TY76Z2rM5mHXA,
pinglinux-Re5JQEeQqe8AvxtiuMwx3w,
dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w
The width and height values reported by the Intuos Pro are not in
surface units as required by the MT protocol. A simple multiplier
of 100x seems to be approximately correct based on my tests.
Signed-off-by: Jason Gerecke <killertofu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/input/tablet/wacom_wac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 9c8eded..3f75f1d 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1151,8 +1151,8 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
int width, height;
if (features->type >= INTUOSPS && features->type <= INTUOSPL) {
- width = data[5];
- height = data[6];
+ width = data[5] * 100;
+ height = data[6] * 100;
} else {
/*
* "a" is a scaled-down area which we assume is
--
1.8.4
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
^ permalink raw reply related
* Re: [BUG?] HID: uhid: add devname module alias
From: Jiri Kosina @ 2013-09-26 9:06 UTC (permalink / raw)
To: David Herrmann
Cc: Tom Gundersen, Marcel Holtmann, Kay Sievers,
linux-input@vger.kernel.org, LKML
In-Reply-To: <CANq1E4QNE7v1fV71E8EwPiKRR1A63erVKVYO07mJ0ySD+etG6g@mail.gmail.com>
On Mon, 9 Sep 2013, David Herrmann wrote:
> >
> > The above commit (60cbd53 in mainline) doesn't appear to work for me.
> > I.e., depmod does not create an entry in modules.devname and hence no
> > device node is created on boot.
> >
> > If I understand correctly, you'd also need to create the correct
> > "char-major-<MAJOR>-<MINOR>" alias (which I don't think you can do as
> > long as you are using MISC_DYNAMIC_MINOR).
> >
> > Or am I missing something?
>
> Nope, that's correct as discussed on IRC. Patch pending as:
> Subject: [PATCH] HID: uhid: allocate static minor
> Message-Id: <1378744434-10883-1-git-send-email-dh.herrmann@gmail.com>
I have now queued that one. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup
From: Jiri Kosina @ 2013-09-27 10:50 UTC (permalink / raw)
To: Joseph Salisbury
Cc: list, Haiyang Zhang, LKML, open, Dan Carpenter, HID CORE LAYER,
devel, thomas
In-Reply-To: <52432152.3030100@canonical.com>
On Wed, 25 Sep 2013, Joseph Salisbury wrote:
> After further testing reverting the following commit does in fact
> resolve the bug:
>
> commit b1a1442a23776756b254b69786848a94d92445ba
> Author: Jiri Kosina <jkosina@suse.cz>
> Date: Mon Jun 3 11:27:48 2013 +0200
>
> HID: core: fix reporting of raw events
>
> Reverting this commit in v3.12-rc2 prevents the system from locking up,
> which happens when connecting a bluetooth trackpad.
>
> Jiri, do you think we should revert this patch, or is there some further
> debugging/data collecting you would like to do?
Hi Joseph,
in this mail:
Message-ID: <5241992E.3090805@canonical.com>
Date: Tue, 24 Sep 2013 09:52:46 -0400
you said that reverting this commit doesn't prevent the lockups, so I am
rather confused ... ?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* [PATCH 1/7] Input: gpio_keys - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/gpio_keys.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 440ce32..2db1324 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -26,6 +26,7 @@
#include <linux/gpio_keys.h>
#include <linux/workqueue.h>
#include <linux/gpio.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
#include <linux/spinlock.h>
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/7] Input: gpio_keys_polled - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380282729-26669-1-git-send-email-sachin.kamat@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/gpio_keys_polled.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/keyboard/gpio_keys_polled.c b/drivers/input/keyboard/gpio_keys_polled.c
index cd5ed9e..4e42819 100644
--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -25,6 +25,7 @@
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
--
1.7.9.5
^ permalink raw reply related
* [PATCH 3/7] Input: pxa27x_keypad - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380282729-26669-1-git-send-email-sachin.kamat@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/pxa27x_keypad.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c
index a2e758d..186138c 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -27,6 +27,7 @@
#include <linux/err.h>
#include <linux/input/matrix_keypad.h>
#include <linux/slab.h>
+#include <linux/of.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
--
1.7.9.5
^ permalink raw reply related
* [PATCH 4/7] Input: pwm-beeper - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380282729-26669-1-git-send-email-sachin.kamat@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/misc/pwm-beeper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
index 2ff4d1c..940566e 100644
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -16,6 +16,7 @@
#include <linux/input.h>
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
--
1.7.9.5
^ permalink raw reply related
* [PATCH 5/7] Input: rotary_encoder - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380282729-26669-1-git-send-email-sachin.kamat@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/misc/rotary_encoder.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index 5b1aff8..f920ba7 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -24,6 +24,7 @@
#include <linux/gpio.h>
#include <linux/rotary_encoder.h>
#include <linux/slab.h>
+#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/of_gpio.h>
--
1.7.9.5
^ permalink raw reply related
* [PATCH 6/7] Input: egalax_ts - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380282729-26669-1-git-send-email-sachin.kamat@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/touchscreen/egalax_ts.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index ef5fcb0..c856fbc 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/input/mt.h>
+#include <linux/of.h>
#include <linux/of_gpio.h>
/*
--
1.7.9.5
^ permalink raw reply related
* [PATCH 7/7] Input: st1232 - Include linux/of.h header
From: Sachin Kamat @ 2013-09-27 11:52 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380282729-26669-1-git-send-email-sachin.kamat@linaro.org>
'of_match_ptr' is defined in linux/of.h. Include it explicitly.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/touchscreen/st1232.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c
index 1740a24..2f03b2f 100644
--- a/drivers/input/touchscreen/st1232.c
+++ b/drivers/input/touchscreen/st1232.c
@@ -24,6 +24,7 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/of_gpio.h>
#include <linux/pm_qos.h>
#include <linux/slab.h>
--
1.7.9.5
^ permalink raw reply related
* Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup
From: Joseph Salisbury @ 2013-09-27 14:42 UTC (permalink / raw)
To: Jiri Kosina
Cc: list, Haiyang Zhang, LKML, open, Dan Carpenter, HID CORE LAYER,
devel, thomas
In-Reply-To: <alpine.LNX.2.00.1309271250130.18703@pobox.suse.cz>
On 09/27/2013 06:50 AM, Jiri Kosina wrote:
> On Wed, 25 Sep 2013, Joseph Salisbury wrote:
>
>> After further testing reverting the following commit does in fact
>> resolve the bug:
>>
>> commit b1a1442a23776756b254b69786848a94d92445ba
>> Author: Jiri Kosina <jkosina@suse.cz>
>> Date: Mon Jun 3 11:27:48 2013 +0200
>>
>> HID: core: fix reporting of raw events
>>
>> Reverting this commit in v3.12-rc2 prevents the system from locking up,
>> which happens when connecting a bluetooth trackpad.
>>
>> Jiri, do you think we should revert this patch, or is there some further
>> debugging/data collecting you would like to do?
> Hi Joseph,
>
> in this mail:
>
> Message-ID: <5241992E.3090805@canonical.com>
> Date: Tue, 24 Sep 2013 09:52:46 -0400
>
> you said that reverting this commit doesn't prevent the lockups, so I am
> rather confused ... ?
>
> Thanks,
>
The testing was invalid. Reverting commit b1a1442 does resolve the bug
and stop the lockups.
Thanks,
Joe
^ permalink raw reply
* Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup
From: Dan Carpenter @ 2013-09-27 15:24 UTC (permalink / raw)
To: Joseph Salisbury
Cc: list, Jiri Kosina, Haiyang Zhang, LKML, open, HID CORE LAYER,
devel, thomas
In-Reply-To: <52459942.3020600@canonical.com>
On Fri, Sep 27, 2013 at 10:42:10AM -0400, Joseph Salisbury wrote:
> On 09/27/2013 06:50 AM, Jiri Kosina wrote:
> > On Wed, 25 Sep 2013, Joseph Salisbury wrote:
> >
> >> After further testing reverting the following commit does in fact
> >> resolve the bug:
> >>
> >> commit b1a1442a23776756b254b69786848a94d92445ba
> >> Author: Jiri Kosina <jkosina@suse.cz>
> >> Date: Mon Jun 3 11:27:48 2013 +0200
> >>
> >> HID: core: fix reporting of raw events
> >>
> >> Reverting this commit in v3.12-rc2 prevents the system from locking up,
> >> which happens when connecting a bluetooth trackpad.
> >>
> >> Jiri, do you think we should revert this patch, or is there some further
> >> debugging/data collecting you would like to do?
> > Hi Joseph,
> >
> > in this mail:
> >
> > Message-ID: <5241992E.3090805@canonical.com>
> > Date: Tue, 24 Sep 2013 09:52:46 -0400
> >
> > you said that reverting this commit doesn't prevent the lockups, so I am
> > rather confused ... ?
> >
> > Thanks,
> >
> The testing was invalid. Reverting commit b1a1442 does resolve the bug
> and stop the lockups.
>
It looks like magicmouse_raw_event() returns 1 on success and 0 on
failure.
regards,
dan carpenter
^ permalink raw reply
* Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup
From: Dan Carpenter @ 2013-09-27 15:59 UTC (permalink / raw)
To: Joseph Salisbury
Cc: Jiri Kosina, list, Haiyang Zhang, LKML, open, HID CORE LAYER,
devel, thomas
In-Reply-To: <20130927152412.GF6192@mwanda>
On Fri, Sep 27, 2013 at 06:24:12PM +0300, Dan Carpenter wrote:
>
> It looks like magicmouse_raw_event() returns 1 on success and 0 on
> failure.
Fixing the return codes is a good idea but it won't fix the oops.
What's the point of returning 1 and 0? In the current code no one
cares and both are treated the same.
Also if we decide to fix this instead of reverting the we could do this
cleanup as well:
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index b8470b1..868ebaa 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1417,10 +1417,8 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
ret = hdrv->raw_event(hid, report, data, size);
- if (ret < 0) {
- ret = ret < 0 ? ret : 0;
+ if (ret < 0)
goto unlock;
- }
}
ret = hid_report_raw_event(hid, type, data, size, interrupt);
^ permalink raw reply related
* [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems
From: Stefan Achatz @ 2013-09-28 3:57 UTC (permalink / raw)
To: Jiri Kosina, linux-input, linux-kernel; +Cc: Greg KH
Fixing some wrong macro stringification/concatenation.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
---
drivers/hid/hid-roccat-kone.c | 2 +-
drivers/hid/hid-roccat-koneplus.c | 4 ++--
drivers/hid/hid-roccat-kovaplus.c | 4 ++--
drivers/hid/hid-roccat-pyra.c | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
index 602c188..6101816 100644
--- a/drivers/hid/hid-roccat-kone.c
+++ b/drivers/hid/hid-roccat-kone.c
@@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp,
}
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number = { \
- .attr = { .name = "profile##number", .mode = 0660 }, \
+ .attr = { .name = "profile" #number, .mode = 0660 }, \
.size = sizeof(struct kone_profile), \
.read = kone_sysfs_read_profilex, \
.write = kone_sysfs_write_profilex, \
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c
index 5ddf605..5e99fcd 100644
--- a/drivers/hid/hid-roccat-koneplus.c
+++ b/drivers/hid/hid-roccat-koneplus.c
@@ -229,13 +229,13 @@ static ssize_t koneplus_sysfs_read_profilex_buttons(struct file *fp,
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number##_settings = { \
- .attr = { .name = "profile##number##_settings", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
.size = KONEPLUS_SIZE_PROFILE_SETTINGS, \
.read = koneplus_sysfs_read_profilex_settings, \
.private = &profile_numbers[number-1], \
}; \
static struct bin_attribute bin_attr_profile##number##_buttons = { \
- .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
.size = KONEPLUS_SIZE_PROFILE_BUTTONS, \
.read = koneplus_sysfs_read_profilex_buttons, \
.private = &profile_numbers[number-1], \
diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c
index 515bc03..0c8e1ef 100644
--- a/drivers/hid/hid-roccat-kovaplus.c
+++ b/drivers/hid/hid-roccat-kovaplus.c
@@ -257,13 +257,13 @@ static ssize_t kovaplus_sysfs_read_profilex_buttons(struct file *fp,
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number##_settings = { \
- .attr = { .name = "profile##number##_settings", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
.size = KOVAPLUS_SIZE_PROFILE_SETTINGS, \
.read = kovaplus_sysfs_read_profilex_settings, \
.private = &profile_numbers[number-1], \
}; \
static struct bin_attribute bin_attr_profile##number##_buttons = { \
- .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
.size = KOVAPLUS_SIZE_PROFILE_BUTTONS, \
.read = kovaplus_sysfs_read_profilex_buttons, \
.private = &profile_numbers[number-1], \
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c
index 5a6dbbe..1a07e07 100644
--- a/drivers/hid/hid-roccat-pyra.c
+++ b/drivers/hid/hid-roccat-pyra.c
@@ -225,13 +225,13 @@ static ssize_t pyra_sysfs_read_profilex_buttons(struct file *fp,
#define PROFILE_ATTR(number) \
static struct bin_attribute bin_attr_profile##number##_settings = { \
- .attr = { .name = "profile##number##_settings", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \
.size = PYRA_SIZE_PROFILE_SETTINGS, \
.read = pyra_sysfs_read_profilex_settings, \
.private = &profile_numbers[number-1], \
}; \
static struct bin_attribute bin_attr_profile##number##_buttons = { \
- .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \
+ .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \
.size = PYRA_SIZE_PROFILE_BUTTONS, \
.read = pyra_sysfs_read_profilex_buttons, \
.private = &profile_numbers[number-1], \
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH] HID: roccat: Fix "cannot create duplicate filename" problems
From: Greg KH @ 2013-09-28 4:02 UTC (permalink / raw)
To: Stefan Achatz; +Cc: Jiri Kosina, linux-input, linux-kernel
In-Reply-To: <1380340666.2451.4.camel@neuromancer.tessier-ashpool>
On Sat, Sep 28, 2013 at 05:57:46AM +0200, Stefan Achatz wrote:
> Fixing some wrong macro stringification/concatenation.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Stefan Achatz <erazor_de@users.sourceforge.net>
> ---
> drivers/hid/hid-roccat-kone.c | 2 +-
> drivers/hid/hid-roccat-koneplus.c | 4 ++--
> drivers/hid/hid-roccat-kovaplus.c | 4 ++--
> drivers/hid/hid-roccat-pyra.c | 4 ++--
> 4 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c
> index 602c188..6101816 100644
> --- a/drivers/hid/hid-roccat-kone.c
> +++ b/drivers/hid/hid-roccat-kone.c
> @@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp,
> }
> #define PROFILE_ATTR(number) \
> static struct bin_attribute bin_attr_profile##number = { \
> - .attr = { .name = "profile##number", .mode = 0660 }, \
> + .attr = { .name = "profile" #number, .mode = 0660 }, \
Ugh, very sorry about that, I hate macros in C at times :)
Jiri, can you take this through your tree, or I can if you want, it
needs to go in for 3.12-final.
If yours, feel free to add:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stefan, thanks for fixing my bugs, it's much appreciated.
greg k-h
^ permalink raw reply
* Re: [PATCH 6/7] Input: egalax_ts - Include linux/of.h header
From: Sachin Kamat @ 2013-09-28 12:17 UTC (permalink / raw)
To: linux-input@vger.kernel.org; +Cc: Dmitry Torokhov, Sachin Kamat
In-Reply-To: <1380282729-26669-6-git-send-email-sachin.kamat@linaro.org>
Hi Dmitry,
On 27 September 2013 17:22, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> 'of_match_ptr' is defined in linux/of.h. Include it explicitly.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
Please drop this patch. I will send a different one for this.
--
With warm regards,
Sachin
^ permalink raw reply
* [PATCH 1/6] Input: lpc32xx-keys - Remove redundant of_match_ptr
From: Sachin Kamat @ 2013-09-28 12:28 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/lpc32xx-keys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c
index 4218143..8b1b013 100644
--- a/drivers/input/keyboard/lpc32xx-keys.c
+++ b/drivers/input/keyboard/lpc32xx-keys.c
@@ -383,7 +383,7 @@ static struct platform_driver lpc32xx_kscan_driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
.pm = &lpc32xx_kscan_pm_ops,
- .of_match_table = of_match_ptr(lpc32xx_kscan_match),
+ .of_match_table = lpc32xx_kscan_match,
}
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/6] Input: nspire-keypad - Remove redundant of_match_ptr
From: Sachin Kamat @ 2013-09-28 12:28 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380371294-10289-1-git-send-email-sachin.kamat@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/nspire-keypad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c
index b3e3eda..9981928 100644
--- a/drivers/input/keyboard/nspire-keypad.c
+++ b/drivers/input/keyboard/nspire-keypad.c
@@ -267,7 +267,7 @@ static struct platform_driver nspire_keypad_driver = {
.driver = {
.name = "nspire-keypad",
.owner = THIS_MODULE,
- .of_match_table = of_match_ptr(nspire_keypad_dt_match),
+ .of_match_table = nspire_keypad_dt_match,
},
.probe = nspire_keypad_probe,
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH 3/6] Input: tegra-kbc - Remove redundant of_match_ptr
From: Sachin Kamat @ 2013-09-28 12:28 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380371294-10289-1-git-send-email-sachin.kamat@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/tegra-kbc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c
index 9cd20e6..8508879 100644
--- a/drivers/input/keyboard/tegra-kbc.c
+++ b/drivers/input/keyboard/tegra-kbc.c
@@ -614,7 +614,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
unsigned int keymap_rows;
const struct of_device_id *match;
- match = of_match_device(of_match_ptr(tegra_kbc_of_match), &pdev->dev);
+ match = of_match_device(tegra_kbc_of_match, &pdev->dev);
kbc = devm_kzalloc(&pdev->dev, sizeof(*kbc), GFP_KERNEL);
if (!kbc) {
--
1.7.9.5
^ permalink raw reply related
* [PATCH 4/6] Input: sirfsoc-onkey - Remove redundant of_match_ptr
From: Sachin Kamat @ 2013-09-28 12:28 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380371294-10289-1-git-send-email-sachin.kamat@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/misc/sirfsoc-onkey.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/misc/sirfsoc-onkey.c b/drivers/input/misc/sirfsoc-onkey.c
index 0621c36..7b8b03e 100644
--- a/drivers/input/misc/sirfsoc-onkey.c
+++ b/drivers/input/misc/sirfsoc-onkey.c
@@ -153,7 +153,7 @@ static struct platform_driver sirfsoc_pwrc_driver = {
.name = "sirfsoc-pwrc",
.owner = THIS_MODULE,
.pm = &sirfsoc_pwrc_pm_ops,
- .of_match_table = of_match_ptr(sirfsoc_pwrc_of_match),
+ .of_match_table = sirfsoc_pwrc_of_match,
}
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH 5/6] Input: egalax_ts - Remove redundant of_match_ptr
From: Sachin Kamat @ 2013-09-28 12:28 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380371294-10289-1-git-send-email-sachin.kamat@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/touchscreen/egalax_ts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index c856fbc..b4d721f 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -274,7 +274,7 @@ static struct i2c_driver egalax_ts_driver = {
.name = "egalax_ts",
.owner = THIS_MODULE,
.pm = &egalax_ts_pm_ops,
- .of_match_table = of_match_ptr(egalax_ts_dt_ids),
+ .of_match_table = egalax_ts_dt_ids,
},
.id_table = egalax_ts_id,
.probe = egalax_ts_probe,
--
1.7.9.5
^ permalink raw reply related
* [PATCH 6/6] Input: ti_am335x_tsc - Remove redundant of_match_ptr
From: Sachin Kamat @ 2013-09-28 12:28 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
In-Reply-To: <1380371294-10289-1-git-send-email-sachin.kamat@linaro.org>
The data structure of_match_ptr() protects is always compiled in.
Hence of_match_ptr() is not needed.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/touchscreen/ti_am335x_tsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c
index 24e625c..14b7390 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -511,7 +511,7 @@ static struct platform_driver ti_tsc_driver = {
.name = "TI-am335x-tsc",
.owner = THIS_MODULE,
.pm = TITSC_PM_OPS,
- .of_match_table = of_match_ptr(ti_tsc_dt_ids),
+ .of_match_table = ti_tsc_dt_ids,
},
};
module_platform_driver(ti_tsc_driver);
--
1.7.9.5
^ permalink raw reply related
* [RFC/PATCH 0/1] rotary-encoder: Add new interruption handler
From: Ezequiel Garcia @ 2013-09-28 18:26 UTC (permalink / raw)
To: linux-input; +Cc: Ezequiel Garcia, Daniel Mack, Dmitry Torokhov
Some rotary-encoder devices (such as those with detents) are capable
of producing a stable event on each step. This simple patch adds support
for this case, by implementing a new interruption handler.
The handler needs only detect the direction of the turn and generate
an event according to this detection.
We encode the previous and the current state, and then use the sum of them
to decide on the direction of the turn, according to the following simple
table:
Previous state + currrent state | Movement
==========================================
0b1101 | clockwise
0b0100 | ..
0b0010 | ..
0b1011 | ..
==========================================
0b1110 | counter-clockwise
0b0111 | ..
0b0001 | ..
0b1000 | ..
(The other sumed values are considered illegal)
This calculation is based on some previous work found at this blog:
http://bildr.org/2012/08/rotary-encoder-arduino/
The result is a seemingly very robust behavior, with a truly simple
implementation, that produces an event on each turn of the device.
I don't have much experience with this rotary-encoder devices, so I'm sending
this just as an RFC/PATCH, to get some early feedback. In particular, I got a
bit puzzled by the current implementation with 'armed' and 'dis-armed'.
Maybe there's some way of using the current driver and get an event on each turn?
If this change looks more or less acceptable, I can add device-tree bindings
(which are missing from this first patch) and re-send.
Thanks!
Ezequiel Garcia (1):
Input: rotary-encoder: Add 'stepped' irq handler
drivers/input/misc/rotary_encoder.c | 34 ++++++++++++++++++++++++++++++++++
include/linux/rotary_encoder.h | 1 +
2 files changed, 35 insertions(+)
--
1.8.1.5
^ permalink raw reply
* [PATCH 1/1] Input: rotary-encoder: Add 'stepped' irq handler
From: Ezequiel Garcia @ 2013-09-28 18:26 UTC (permalink / raw)
To: linux-input; +Cc: Ezequiel Garcia, Daniel Mack, Dmitry Torokhov
In-Reply-To: <1380392798-23345-1-git-send-email-ezequiel@vanguardiasur.com.ar>
Some rotary-encoder devices (such as those with detents) are capable
of producing a stable event on each step. This commit adds support
for this case, by implementing a new interruption handler.
The handler needs only detect the direction of the turn and generate
an event according to this detection.
Cc: Daniel Mack <zonque@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
drivers/input/misc/rotary_encoder.c | 34 ++++++++++++++++++++++++++++++++++
include/linux/rotary_encoder.h | 1 +
2 files changed, 35 insertions(+)
diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index 5b1aff8..8802221 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -117,6 +117,37 @@ static irqreturn_t rotary_encoder_irq(int irq, void *dev_id)
return IRQ_HANDLED;
}
+static irqreturn_t rotary_encoder_stepped_irq(int irq, void *dev_id)
+{
+ struct rotary_encoder *encoder = dev_id;
+ int state, sum;
+
+ state = rotary_encoder_get_state(encoder->pdata);
+
+ /*
+ * We encode the previous and the current state,
+ * in the 'sum' variable and then use a table
+ * to decide the direction of the turn.
+ */
+ sum = (encoder->last_stable << 2) + state;
+ switch (sum) {
+ case 0b1101:
+ case 0b0100:
+ case 0b0010:
+ case 0b1011:
+ encoder->dir = 0; /* clockwise */
+ break;
+ default:
+ encoder->dir = 1;
+ }
+
+ rotary_encoder_report_event(encoder);
+
+ encoder->last_stable = state;
+
+ return IRQ_HANDLED;
+}
+
static irqreturn_t rotary_encoder_half_period_irq(int irq, void *dev_id)
{
struct rotary_encoder *encoder = dev_id;
@@ -254,6 +285,9 @@ static int rotary_encoder_probe(struct platform_device *pdev)
if (pdata->half_period) {
handler = &rotary_encoder_half_period_irq;
encoder->last_stable = rotary_encoder_get_state(pdata);
+ } else if (pdata->on_each_step) {
+ handler = &rotary_encoder_stepped_irq;
+ encoder->last_stable = rotary_encoder_get_state(pdata);
} else {
handler = &rotary_encoder_irq;
}
diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h
index 3f594dc..499f6f7 100644
--- a/include/linux/rotary_encoder.h
+++ b/include/linux/rotary_encoder.h
@@ -11,6 +11,7 @@ struct rotary_encoder_platform_data {
bool relative_axis;
bool rollover;
bool half_period;
+ bool on_each_step;
};
#endif /* __ROTARY_ENCODER_H__ */
--
1.8.1.5
^ permalink raw reply related
* How write driver for gamepad, that detected by usbhid but not work correctly?
From: v1kt0p.rus @ 2013-09-29 9:22 UTC (permalink / raw)
To: linux-input
I have "Genesis to USB adapter" and two genesis gamepads. On windows it
is work correctly. On linux do not work "left" and "up" buttons on
D-pad, and two gamepads appear as one with double buttons.
At first I tried to write usb driver(usb_register), but when I connect
gamepad system choose usbhid driver not my. When I unplug gamepad system
call "probe" in my driver, but then immediately call "disconnect". Is
there a way to force the system to choose my driver first?
Than I tried to write hid driver(hid_register_driver), but "probe" is
not called. I can not find documentation describing how to make a
working driver for hid, it exists at all?
What is the correct way to write a driver for the gamepad? What am I
doing wrong?
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox