* [PATCH 0/2] hid-mosart: small patches
@ 2010-12-13 14:59 Benjamin Tissoires
2010-12-13 14:59 ` [PATCH 1/2] hid-mosart: ignore buttons report Benjamin Tissoires
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Benjamin Tissoires @ 2010-12-13 14:59 UTC (permalink / raw)
To: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, Henrik Rydberg,
linux-input
Hi guys,
Just a few patch before introducing hid-multitouch. It would be great if
this could be in 2.6.38 (or even before...) as hid-multitouch is a bit late.
This small patch-set enhance the support of hid-mosart in the kernel:
the first patch allows X to handle it as an absolute device, and the second
one introduce suspend/resume support.
The patch work is against the branch next of Dmitry's tree.
Henrik, I think that you added a device in your ppa.
Do you want me to send it?
Cheers,
Benjamin
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/2] hid-mosart: ignore buttons report
2010-12-13 14:59 [PATCH 0/2] hid-mosart: small patches Benjamin Tissoires
@ 2010-12-13 14:59 ` Benjamin Tissoires
2010-12-13 17:51 ` Chase Douglas
2010-12-13 18:55 ` Henrik Rydberg
2010-12-13 14:59 ` [PATCH 2/2] hid-mosart: support suspend/resume Benjamin Tissoires
2010-12-13 18:52 ` [PATCH 0/2] hid-mosart: small patches Henrik Rydberg
2 siblings, 2 replies; 10+ messages in thread
From: Benjamin Tissoires @ 2010-12-13 14:59 UTC (permalink / raw)
To: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, Henrik Rydberg,
linux-input
Cc: Benjamin Tissoires
This commit allows the device to be recognized as a touchscreen, and not a
touchpad by xf86-input-evdev.
The device has 2 modes. The first one is an emulation of a touchscreen by
sending left and right button, and the second mode is the one used in
dual-touch (sending trackingID, touch and else).
That's why there is a hid report containing left and right buttons
(9000001 and 9000002). The point is that xorg relies on these fields to
determine if it's a touchpad or a touchscreen.
Clearing the report (return -1) makes xorg detecting it out of the box
as a quite pleasant (dual)touchscreen.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
drivers/hid/hid-mosart.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c
index ac5421d..acd8a49 100644
--- a/drivers/hid/hid-mosart.c
+++ b/drivers/hid/hid-mosart.c
@@ -90,6 +90,10 @@ static int mosart_input_mapping(struct hid_device *hdev, struct hid_input *hi,
case 0xff000000:
/* ignore HID features */
return -1;
+
+ case HID_UP_BUTTON:
+ /* ignore buttons */
+ return -1;
}
return 0;
--
1.7.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/2] hid-mosart: support suspend/resume
2010-12-13 14:59 [PATCH 0/2] hid-mosart: small patches Benjamin Tissoires
2010-12-13 14:59 ` [PATCH 1/2] hid-mosart: ignore buttons report Benjamin Tissoires
@ 2010-12-13 14:59 ` Benjamin Tissoires
2010-12-13 17:52 ` Chase Douglas
2010-12-13 18:56 ` Henrik Rydberg
2010-12-13 18:52 ` [PATCH 0/2] hid-mosart: small patches Henrik Rydberg
2 siblings, 2 replies; 10+ messages in thread
From: Benjamin Tissoires @ 2010-12-13 14:59 UTC (permalink / raw)
To: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, Henrik Rydberg,
linux-input
Cc: Benjamin Tissoires
The device has 2 modes. The first one is an emulation of a touchscreen
by sending left and right button, and the second mode is the one used in
dual-touch (sending trackingID, touch and else).
In case of a suspend/resume, the device switch back to the first mode
described above (with left and right buttons).
This adds a hook in .reset_resume for the device to be switched to
the correct mode (I just copied the code in mosart_probe).
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
---
drivers/hid/hid-mosart.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/hid-mosart.c b/drivers/hid/hid-mosart.c
index acd8a49..15d0381 100644
--- a/drivers/hid/hid-mosart.c
+++ b/drivers/hid/hid-mosart.c
@@ -234,6 +234,19 @@ static int mosart_probe(struct hid_device *hdev, const struct hid_device_id *id)
return ret;
}
+#ifdef CONFIG_PM
+static int mosart_reset_resume(struct hid_device *hdev)
+{
+ struct hid_report_enum *re = hdev->report_enum
+ + HID_FEATURE_REPORT;
+ struct hid_report *r = re->report_id_hash[7];
+
+ r->field[0]->value[0] = 0x02;
+ usbhid_submit_report(hdev, r, USB_DIR_OUT);
+ return 0;
+}
+#endif
+
static void mosart_remove(struct hid_device *hdev)
{
hid_hw_stop(hdev);
@@ -262,6 +275,9 @@ static struct hid_driver mosart_driver = {
.input_mapped = mosart_input_mapped,
.usage_table = mosart_grabbed_usages,
.event = mosart_event,
+#ifdef CONFIG_PM
+ .reset_resume = mosart_reset_resume,
+#endif
};
static int __init mosart_init(void)
--
1.7.3.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] hid-mosart: ignore buttons report
2010-12-13 14:59 ` [PATCH 1/2] hid-mosart: ignore buttons report Benjamin Tissoires
@ 2010-12-13 17:51 ` Chase Douglas
2010-12-13 18:55 ` Henrik Rydberg
1 sibling, 0 replies; 10+ messages in thread
From: Chase Douglas @ 2010-12-13 17:51 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, Henrik Rydberg,
linux-input
On 12/13/2010 06:59 AM, Benjamin Tissoires wrote:
> This commit allows the device to be recognized as a touchscreen, and not a
> touchpad by xf86-input-evdev.
>
> The device has 2 modes. The first one is an emulation of a touchscreen by
> sending left and right button, and the second mode is the one used in
> dual-touch (sending trackingID, touch and else).
>
> That's why there is a hid report containing left and right buttons
> (9000001 and 9000002). The point is that xorg relies on these fields to
> determine if it's a touchpad or a touchscreen.
> Clearing the report (return -1) makes xorg detecting it out of the box
> as a quite pleasant (dual)touchscreen.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Please add "Cc: stable@kernel.org" to the SOB area so this is picked up
for previous kernels too.
Thanks!
-- Chase
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] hid-mosart: support suspend/resume
2010-12-13 14:59 ` [PATCH 2/2] hid-mosart: support suspend/resume Benjamin Tissoires
@ 2010-12-13 17:52 ` Chase Douglas
2010-12-13 18:56 ` Henrik Rydberg
1 sibling, 0 replies; 10+ messages in thread
From: Chase Douglas @ 2010-12-13 17:52 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, Henrik Rydberg,
linux-input
On 12/13/2010 06:59 AM, Benjamin Tissoires wrote:
> The device has 2 modes. The first one is an emulation of a touchscreen
> by sending left and right button, and the second mode is the one used in
> dual-touch (sending trackingID, touch and else).
>
> In case of a suspend/resume, the device switch back to the first mode
> described above (with left and right buttons).
> This adds a hook in .reset_resume for the device to be switched to
> the correct mode (I just copied the code in mosart_probe).
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Please add "Cc: stable@kernel.org" here too.
Thanks!
-- Chase
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] hid-mosart: small patches
2010-12-13 14:59 [PATCH 0/2] hid-mosart: small patches Benjamin Tissoires
2010-12-13 14:59 ` [PATCH 1/2] hid-mosart: ignore buttons report Benjamin Tissoires
2010-12-13 14:59 ` [PATCH 2/2] hid-mosart: support suspend/resume Benjamin Tissoires
@ 2010-12-13 18:52 ` Henrik Rydberg
2010-12-14 10:41 ` Jiri Kosina
2 siblings, 1 reply; 10+ messages in thread
From: Henrik Rydberg @ 2010-12-13 18:52 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, linux-input
Benjamin,
Thanks for the patches, I will comment them separately.
> Just a few patch before introducing hid-multitouch. It would be great if
> this could be in 2.6.38 (or even before...) as hid-multitouch is a bit late.
The first patch looks like 2.6.37 material. I know both patches have been tested
for quite some time.
> Henrik, I think that you added a device in your ppa.
> Do you want me to send it?
Yes, please do. There is a hid-core change to go with it as well.
Jiri, I assume these will eventually go through your tree.
Thanks,
Henrik
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/2] hid-mosart: ignore buttons report
2010-12-13 14:59 ` [PATCH 1/2] hid-mosart: ignore buttons report Benjamin Tissoires
2010-12-13 17:51 ` Chase Douglas
@ 2010-12-13 18:55 ` Henrik Rydberg
1 sibling, 0 replies; 10+ messages in thread
From: Henrik Rydberg @ 2010-12-13 18:55 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, linux-input
On 12/13/2010 03:59 PM, Benjamin Tissoires wrote:
> This commit allows the device to be recognized as a touchscreen, and not a
> touchpad by xf86-input-evdev.
>
> The device has 2 modes. The first one is an emulation of a touchscreen by
> sending left and right button, and the second mode is the one used in
> dual-touch (sending trackingID, touch and else).
>
> That's why there is a hid report containing left and right buttons
> (9000001 and 9000002). The point is that xorg relies on these fields to
> determine if it's a touchpad or a touchscreen.
> Clearing the report (return -1) makes xorg detecting it out of the box
> as a quite pleasant (dual)touchscreen.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
> ---
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Thanks,
Henrik
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/2] hid-mosart: support suspend/resume
2010-12-13 14:59 ` [PATCH 2/2] hid-mosart: support suspend/resume Benjamin Tissoires
2010-12-13 17:52 ` Chase Douglas
@ 2010-12-13 18:56 ` Henrik Rydberg
1 sibling, 0 replies; 10+ messages in thread
From: Henrik Rydberg @ 2010-12-13 18:56 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Jiri Kosina, Stephane Chatty, linux-input
On 12/13/2010 03:59 PM, Benjamin Tissoires wrote:
> The device has 2 modes. The first one is an emulation of a touchscreen
> by sending left and right button, and the second mode is the one used in
> dual-touch (sending trackingID, touch and else).
>
> In case of a suspend/resume, the device switch back to the first mode
> described above (with left and right buttons).
> This adds a hook in .reset_resume for the device to be switched to
> the correct mode (I just copied the code in mosart_probe).
Defining a static function for the mode switch would be nice.
Thanks,
Henrik
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] hid-mosart: small patches
2010-12-13 18:52 ` [PATCH 0/2] hid-mosart: small patches Henrik Rydberg
@ 2010-12-14 10:41 ` Jiri Kosina
2010-12-14 21:29 ` Chase Douglas
0 siblings, 1 reply; 10+ messages in thread
From: Jiri Kosina @ 2010-12-14 10:41 UTC (permalink / raw)
To: Henrik Rydberg
Cc: Benjamin Tissoires, Dmitry Torokhov, Stephane Chatty, linux-input
On Mon, 13 Dec 2010, Henrik Rydberg wrote:
> > Henrik, I think that you added a device in your ppa.
>
> > Do you want me to send it?
>
> Yes, please do. There is a hid-core change to go with it as well.
>
> Jiri, I assume these will eventually go through your tree.
Thanks.
I have applied both Benjamin's patches now.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/2] hid-mosart: small patches
2010-12-14 10:41 ` Jiri Kosina
@ 2010-12-14 21:29 ` Chase Douglas
0 siblings, 0 replies; 10+ messages in thread
From: Chase Douglas @ 2010-12-14 21:29 UTC (permalink / raw)
To: Jiri Kosina
Cc: Henrik Rydberg, Benjamin Tissoires, Dmitry Torokhov,
Stephane Chatty, linux-input
On 12/14/2010 02:41 AM, Jiri Kosina wrote:
> I have applied both Benjamin's patches now.
Jiri,
If you haven't sent a pull request to Linus yet, can you add 'Cc:
stable@kernel.org'?
Thanks,
-- Chase
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-12-14 21:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-13 14:59 [PATCH 0/2] hid-mosart: small patches Benjamin Tissoires
2010-12-13 14:59 ` [PATCH 1/2] hid-mosart: ignore buttons report Benjamin Tissoires
2010-12-13 17:51 ` Chase Douglas
2010-12-13 18:55 ` Henrik Rydberg
2010-12-13 14:59 ` [PATCH 2/2] hid-mosart: support suspend/resume Benjamin Tissoires
2010-12-13 17:52 ` Chase Douglas
2010-12-13 18:56 ` Henrik Rydberg
2010-12-13 18:52 ` [PATCH 0/2] hid-mosart: small patches Henrik Rydberg
2010-12-14 10:41 ` Jiri Kosina
2010-12-14 21:29 ` Chase Douglas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.