* Re: [PATCH] Input: cap1106 - allow changing key mapping from userspace
From: Daniel Mack @ 2014-08-07 6:50 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20140807062033.GD651@core.coreip.homeip.net>
Hi Dmitry,
On 08/07/2014 08:20 AM, Dmitry Torokhov wrote:
> On Sun, Jul 20, 2014 at 06:20:49PM -0700, Dmitry Torokhov wrote:
>> Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings
>> from userspace.
>>
>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> ---
>>
>> Just compiled, not tested.
>
> *ping* Any chance you could give it a try? Thanks!
Oh, sorry, I didn't realize you're waiting for me on this.
Unfortunately, I can't test it myself anymore, as I had to return the
board I found this chip on. But as the change looks very straight
forward, I'd suggest you just apply that patch and I ask the vendor to
give it a quick try. In case of any problems, I'll let you know. Does
that sound feasible?
Thanks,
Daniel
>
>>
>> drivers/input/keyboard/cap1106.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/keyboard/cap1106.c b/drivers/input/keyboard/cap1106.c
>> index f7d7a0d..180b184 100644
>> --- a/drivers/input/keyboard/cap1106.c
>> +++ b/drivers/input/keyboard/cap1106.c
>> @@ -64,7 +64,7 @@ struct cap1106_priv {
>> struct input_dev *idev;
>>
>> /* config */
>> - unsigned int keycodes[CAP1106_NUM_CHN];
>> + unsigned short keycodes[CAP1106_NUM_CHN];
>> };
>>
>> static const struct reg_default cap1106_reg_defaults[] = {
>> @@ -272,6 +272,12 @@ static int cap1106_i2c_probe(struct i2c_client *i2c_client,
>> for (i = 0; i < CAP1106_NUM_CHN; i++)
>> __set_bit(priv->keycodes[i], priv->idev->keybit);
>>
>> + __clear_bit(KEY_RESERVED, priv->idev->keybit);
>> +
>> + priv->idev->keycode = priv->keycodes;
>> + priv->idev->keycodesize = sizeof(priv->keycodes[0]);
>> + priv->idev->keycodemax = ARRAY_SIZE(priv->keycodes);
>> +
>> priv->idev->id.vendor = CAP1106_MANUFACTURER_ID;
>> priv->idev->id.product = CAP1106_PRODUCT_ID;
>> priv->idev->id.version = rev;
>> --
>> 2.0.0.526.g5318336
>>
>>
>> --
>> Dmitry
>
^ permalink raw reply
* [PATCH v2 1/1] Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting
From: Javier Martinez Canillas @ 2014-08-07 7:44 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Nick Dyer, Stephen Warren, Yufeng Shen, Benson Leung,
Doug Anderson, Olof Johansson, Tomasz Figa, linux-input,
devicetree, linux-samsung-soc, linux-kernel,
Javier Martinez Canillas
The Atmel maXTouch driver assumed that the IRQ type flags will
always be passed using platform data but this is not true when
booting using Device Trees. In these setups the interrupt type
was ignored by the driver when requesting an IRQ.
This means that it will fail if a machine specified other type
than IRQ_TYPE_NONE. The right approach is to get the IRQ flags
that was parsed by OF from the "interrupt" Device Tree propery.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
This patch was first sent as a part of a two part series along
with [PATCH 2/2] Input: atmel_mxt_ts - Add keycodes array example.
But there are no dependencies between these two patches so there
is no need to resend that one with no changes for v2.
Changes since v1:
- Assign flags to pdata->irqflags in mxt_parse_dt() instead of probe().
Suggested by Tomasz Figa.
drivers/input/touchscreen/atmel_mxt_ts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 03b8571..5c8cbd3 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -22,6 +22,7 @@
#include <linux/i2c.h>
#include <linux/i2c/atmel_mxt_ts.h>
#include <linux/input/mt.h>
+#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/of.h>
#include <linux/slab.h>
@@ -2093,6 +2094,8 @@ static struct mxt_platform_data *mxt_parse_dt(struct i2c_client *client)
if (!pdata)
return ERR_PTR(-ENOMEM);
+ pdata->irqflags = irq_get_trigger_type(client->irq);
+
if (of_find_property(client->dev.of_node, "linux,gpio-keymap",
&proplen)) {
pdata->t19_num_keys = proplen / sizeof(u32);
--
2.0.0.rc2
^ permalink raw reply related
* Re: [PATCH 1/2] Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting
From: Javier Martinez Canillas @ 2014-08-07 7:49 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Tomasz Figa, Nick Dyer, Stephen Warren, Yufeng Shen, Benson Leung,
Doug Anderson, Olof Johansson, linux-input, devicetree,
linux-samsung-soc, linux-kernel
In-Reply-To: <20140807060926.GA651@core.coreip.homeip.net>
Hello Dmitry,
On 08/07/2014 08:09 AM, Dmitry Torokhov wrote:
>>
>> > irq_of_parse_and_map() already sets up IRQ trigger type based on DT
>> > data, by calling irq_create_of_mapping() which in turn calls
>> > irq_set_irq_type().
>> >
>>
>> Right but somehow when the IRQ is actually requested the type is overwritten by
>> the value passed to request_threaded_irq() and interrupts are not being
>> generated by the device without this patch.
>>
>> Do you think that this is a bug in the "interrupt-parent" irqchip driver or the
>> IRQ core? I'm not that familiar with the IRQ subsystem.
>
> No, this is clearly driver fault - it smashed previously done setup with new
> flags.
>
Thanks a lot for the clarification. That was my understanding as well but wanted
to be sure.
>> >
>> > It might be a bit cleaner to just assign the flags to pdata->irqflags in
>> > mxt_parse_dt() instead. That would also account for the fact that pdata,
>> > if provided, should have priority over DT.
>> >
>>
>> You are totally right, also this will break if CONFIG_OF is not enabled since
>> dev.of_node will not be defined. While this already is taken into account for
>> mxt_parse_dt() by defining an empty function.
>>
>> I'll change it in v2 if getting the flags from the driver is the right approach
>
> Yes, please.
>
Just posted a v2 [0] with Tomasz suggestion and the patch is indeed a lot cleaner.
Best regards,
Javier
[0]: https://lkml.org/lkml/2014/8/7/82
^ permalink raw reply
* Re: [PATCH 1/2] Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting
From: Nick Dyer @ 2014-08-07 12:20 UTC (permalink / raw)
To: Javier Martinez Canillas, Dmitry Torokhov
Cc: Stephen Warren, Yufeng Shen, Benson Leung, Doug Anderson,
Olof Johansson, linux-input, devicetree, linux-samsung-soc,
linux-kernel
In-Reply-To: <1407372486-25881-1-git-send-email-javier.martinez@collabora.co.uk>
On 07/08/14 01:48, Javier Martinez Canillas wrote:
> The Atmel maXTouch driver assumed that the IRQ type flags will
> always be passed using platform data but this is not true when
> booting using Device Trees. In these setups the interrupt type
> was ignored by the driver when requesting an IRQ.
>
> This means that it will fail if a machine specified other type
> than IRQ_TYPE_NONE. The right approach is to get the IRQ flags
> that was parsed by OF from the "interrupt" Device Tree propery.
I do not believe you are correct about this. There is a bit of code here:
http://lxr.free-electrons.com/source/kernel/irq/manage.c?v=3.16#L1172
which means that in the device tree case, if we call request_threaded_irq()
with no trigger bits set, it will trust whatever it already there. I did
test this back in July and it appeared to work correctly.
Have you tested this change is actually necessary?
^ permalink raw reply
* Re: [PATCH 2/2] Input: atmel_mxt_ts - Add keycodes array example
From: Nick Dyer @ 2014-08-07 12:38 UTC (permalink / raw)
To: Javier Martinez Canillas, Dmitry Torokhov
Cc: Stephen Warren, Yufeng Shen, Benson Leung, Doug Anderson,
Olof Johansson, linux-input, devicetree, linux-samsung-soc,
linux-kernel
In-Reply-To: <1407372486-25881-2-git-send-email-javier.martinez@collabora.co.uk>
On 07/08/14 01:48, Javier Martinez Canillas wrote:
> The Atmel maXTouch driver allows to dynamically define the
> event keycodes set that the device is capable of. This may
> not be evident when reading the DT binding document so add
> an example to make it easier to understand how this works.
>
> Also, the current documentation says that the array limit
> is four entries but the driver dynamically allocates the
> keymap array and does not limit the array size.
There is a physical limit to the number of GPIOs on the device. The number
4 is wrong, the protocol does allow for up to 8 GPIOs. But it is a hard limit.
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
> Documentation/devicetree/bindings/input/atmel,maxtouch.txt | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> index baef432..be50476 100644
> --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
> @@ -11,7 +11,7 @@ Required properties:
>
> Optional properties for main touchpad device:
>
> -- linux,gpio-keymap: An array of up to 4 entries indicating the Linux
> +- linux,gpio-keymap: An array of entries indicating the Linux
> keycode generated by each GPIO. Linux keycodes are defined in
> <dt-bindings/input/input.h>.
>
> @@ -22,4 +22,10 @@ Example:
> reg = <0x4b>;
> interrupt-parent = <&gpio>;
> interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
> + linux,gpio-keymap = < BTN_LEFT
> + BTN_TOOL_FINGER
> + BTN_TOOL_DOUBLETAP
> + BTN_TOOL_TRIPLETAP
> + BTN_TOOL_QUADTAP
> + BTN_TOOL_QUINTTAP >;
I'm afraid you have misunderstood the impact of this change to the way that
the GPIOs coming in to the touch controller are mapped to key codes. Look
at the protocol guide for T19.
The DOUBLE/TRIPLE/QUAD/QUINTTAP stuff is filled in for us by the input core
when we use INPUT_MT_POINTER, anyway.
^ permalink raw reply
* [PATCH 1/2] Input: atmel_mxt_ts - Fix double free of input device
From: nick.dyer @ 2014-08-07 14:07 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Yufeng Shen, Daniel Kurtz, Henrik Rydberg, Joonyoung Shim,
Alan Bowens, linux-input, linux-kernel, Peter Meerwald,
Benson Leung, Olof Johansson, Sekhar Nori, Stephen Warren,
Nick Dyer
In-Reply-To: <1407420438-6289-1-git-send-email-nick.dyer@itdev.co.uk>
From: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 03b8571..da497db 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1353,8 +1353,10 @@ static int mxt_get_info(struct mxt_data *data)
static void mxt_free_object_table(struct mxt_data *data)
{
- input_unregister_device(data->input_dev);
- data->input_dev = NULL;
+ if (data->input_dev) {
+ input_unregister_device(data->input_dev);
+ data->input_dev = NULL;
+ }
kfree(data->object_table);
data->object_table = NULL;
@@ -2194,7 +2196,6 @@ static int mxt_remove(struct i2c_client *client)
sysfs_remove_group(&client->dev.kobj, &mxt_attr_group);
free_irq(data->irq, data);
- input_unregister_device(data->input_dev);
mxt_free_object_table(data);
kfree(data);
--
1.9.1
^ permalink raw reply related
* Minor fixes for atmel_mxt_ts
From: nick.dyer @ 2014-08-07 14:07 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Yufeng Shen, Daniel Kurtz, Henrik Rydberg, Joonyoung Shim,
Alan Bowens, linux-input, linux-kernel, Peter Meerwald,
Benson Leung, Olof Johansson, Sekhar Nori, Stephen Warren
Hi Dmitry-
It would be good to get these minor fixes applied to atmel_mxt_ts.
regards
Nick Dyer
^ permalink raw reply
* [PATCH 2/2] Input: atmel_mxt_ts - mXT224 DMA quirk was fixed in firmware v2.0.AA
From: nick.dyer @ 2014-08-07 14:07 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Yufeng Shen, Daniel Kurtz, Henrik Rydberg, Joonyoung Shim,
Alan Bowens, linux-input, linux-kernel, Peter Meerwald,
Benson Leung, Olof Johansson, Sekhar Nori, Stephen Warren,
Nick Dyer
In-Reply-To: <1407420438-6289-1-git-send-email-nick.dyer@itdev.co.uk>
From: Nick Dyer <nick.dyer@itdev.co.uk>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index da497db..67ea728 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1424,10 +1424,12 @@ static int mxt_get_object_table(struct mxt_data *data)
switch (object->type) {
case MXT_GEN_MESSAGE_T5:
- if (data->info.family_id == 0x80) {
+ if ((data->info.family_id == 0x80)
+ && (data->info.version < 0x20)) {
/*
- * On mXT224 read and discard unused CRC byte
- * otherwise DMA reads are misaligned
+ * On mXT224 firmware versions prior to V2.0
+ * read and discard unused CRC byte otherwise
+ * DMA reads are misaligned
*/
data->T5_msg_size = mxt_obj_size(object);
} else {
--
1.9.1
^ permalink raw reply related
* Re: [PATCH 1/2] Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting
From: Dmitry Torokhov @ 2014-08-07 16:47 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Tomasz Figa, Nick Dyer, Stephen Warren, Yufeng Shen, Benson Leung,
Doug Anderson, Olof Johansson, linux-input, devicetree,
linux-samsung-soc, linux-kernel
In-Reply-To: <53E32F9D.2080705@collabora.co.uk>
On Thu, Aug 07, 2014 at 09:49:49AM +0200, Javier Martinez Canillas wrote:
> Hello Dmitry,
>
> On 08/07/2014 08:09 AM, Dmitry Torokhov wrote:
> >>
> >> > irq_of_parse_and_map() already sets up IRQ trigger type based on DT
> >> > data, by calling irq_create_of_mapping() which in turn calls
> >> > irq_set_irq_type().
> >> >
> >>
> >> Right but somehow when the IRQ is actually requested the type is overwritten by
> >> the value passed to request_threaded_irq() and interrupts are not being
> >> generated by the device without this patch.
> >>
> >> Do you think that this is a bug in the "interrupt-parent" irqchip driver or the
> >> IRQ core? I'm not that familiar with the IRQ subsystem.
> >
> > No, this is clearly driver fault - it smashed previously done setup with new
> > flags.
> >
>
> Thanks a lot for the clarification. That was my understanding as well but wanted
> to be sure.
Actually, I take this back. In mainline everything as it should: if
pdata does not specify particular trigger the flags requested end up
being IRQF_ONESHOT, which should preserve trigger bits previously set up
by the board or OF code. In Chrome kernel we have:
/* Default to falling edge if no platform data provided */
irqflags = data->pdata ? data->pdata->irqflags : IRQF_TRIGGER_FALLING;
error = request_threaded_irq(client->irq, NULL, mxt_interrupt,
irqflags | IRQF_ONESHOT,
client->name, data);
which I believe should go away. If it is needed on ACPI systems we need
to figure out how to do things we can do with OF there.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH 1/2] Input: atmel_mxt_ts - Fix double free of input device
From: Dmitry Torokhov @ 2014-08-07 16:55 UTC (permalink / raw)
To: nick.dyer
Cc: Yufeng Shen, Daniel Kurtz, Henrik Rydberg, Joonyoung Shim,
Alan Bowens, linux-input, linux-kernel, Peter Meerwald,
Benson Leung, Olof Johansson, Sekhar Nori, Stephen Warren
In-Reply-To: <1407420438-6289-2-git-send-email-nick.dyer@itdev.co.uk>
On Thu, Aug 07, 2014 at 03:07:17PM +0100, nick.dyer@itdev.co.uk wrote:
> From: Stephen Warren <swarren@wwwdotorg.org>
>
> Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
> ---
> drivers/input/touchscreen/atmel_mxt_ts.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index 03b8571..da497db 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -1353,8 +1353,10 @@ static int mxt_get_info(struct mxt_data *data)
>
> static void mxt_free_object_table(struct mxt_data *data)
> {
> - input_unregister_device(data->input_dev);
> - data->input_dev = NULL;
> + if (data->input_dev) {
> + input_unregister_device(data->input_dev);
> + data->input_dev = NULL;
> + }
>
> kfree(data->object_table);
> data->object_table = NULL;
> @@ -2194,7 +2196,6 @@ static int mxt_remove(struct i2c_client *client)
>
> sysfs_remove_group(&client->dev.kobj, &mxt_attr_group);
> free_irq(data->irq, data);
> - input_unregister_device(data->input_dev);
> mxt_free_object_table(data);
> kfree(data);
No. Let's have mxt_free_object_table() only free object table, and let's
call input_unregister_device() explicitly where needed, like we do in
mxt_remove().
Thanks.
--
Dmitry
^ permalink raw reply
* Re: Minor fixes for atmel_mxt_ts
From: Dmitry Torokhov @ 2014-08-07 16:59 UTC (permalink / raw)
To: nick.dyer
Cc: Yufeng Shen, Daniel Kurtz, Henrik Rydberg, Joonyoung Shim,
Alan Bowens, linux-input, linux-kernel, Peter Meerwald,
Benson Leung, Olof Johansson, Sekhar Nori, Stephen Warren
In-Reply-To: <1407420438-6289-1-git-send-email-nick.dyer@itdev.co.uk>
Hi Nick,
On Thu, Aug 07, 2014 at 03:07:16PM +0100, nick.dyer@itdev.co.uk wrote:
> Hi Dmitry-
>
> It would be good to get these minor fixes applied to atmel_mxt_ts.
>
I applied your 2nd batch but it will have to go in 2nd batch as I am
ready to post pull request.
BTW, did you have any issues with the 2 patches I posted a couple weeks
ago or I can apply them as well?
Thanks.
--
Dmitry
^ permalink raw reply
* [PATCH v2] Input - wacom: update the ABI doc according to latest changes
From: Benjamin Tissoires @ 2014-08-07 20:43 UTC (permalink / raw)
To: Dmitry Torokhov, Jiri Kosina, Ping Cheng, Jason Gerecke,
Przemo Firszt
Cc: linux-kernel, linux-input
Now the devices show up under hid no matter the connection (for USB
and Bluetooth, not serial nor i2c).
The USB devices can now be easily found under
/sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>
The Bluetooth devices could also be found under this path since their
inclusion (April 2010), so this patch fixes the unprecise "hidraw*" path
for them.
The ABI has been unified while setting the LEDs and OLEDs. So Bluetooth
devices lost their own LED selector but use the USB sysfs attribute.
For OLEDs, Bluetooth devices handle only 1-bit images instead of 4 for USB.
The documentation has been updated to match this.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
changes in v2:
- updated commit message to describe a little bit more the changes
- updated the dates for the new path where we can find USB/Bluetooth devices
Documentation/ABI/testing/sysfs-driver-wacom | 70 +++++++++++-----------------
1 file changed, 27 insertions(+), 43 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-driver-wacom b/Documentation/ABI/testing/sysfs-driver-wacom
index 7fc7810..c4f0fed 100644
--- a/Documentation/ABI/testing/sysfs-driver-wacom
+++ b/Documentation/ABI/testing/sysfs-driver-wacom
@@ -1,48 +1,27 @@
-WWhat: /sys/class/hidraw/hidraw*/device/oled*_img
-Date: June 2012
-Contact: linux-bluetooth@vger.kernel.org
-Description:
- The /sys/class/hidraw/hidraw*/device/oled*_img files control
- OLED mocro displays on Intuos4 Wireless tablet. Accepted image
- has to contain 256 bytes (64x32 px 1 bit colour). The format
- is the same as PBM image 62x32px without header (64 bits per
- horizontal line, 32 lines). An example of setting OLED No. 0:
- dd bs=256 count=1 if=img_file of=[path to oled0_img]/oled0_img
- The attribute is read only and no local copy of the image is
- stored.
-
-What: /sys/class/hidraw/hidraw*/device/speed
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed
Date: April 2010
Kernel Version: 2.6.35
Contact: linux-bluetooth@vger.kernel.org
Description:
- The /sys/class/hidraw/hidraw*/device/speed file controls
- reporting speed of Wacom bluetooth tablet. Reading from
- this file returns 1 if tablet reports in high speed mode
+ The /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed file
+ controls reporting speed of Wacom bluetooth tablet. Reading
+ from this file returns 1 if tablet reports in high speed mode
or 0 otherwise. Writing to this file one of these values
switches reporting speed.
-What: /sys/class/leds/0005\:056A\:00BD.0001\:selector\:*/
-Date: May 2012
-Kernel Version: 3.5
-Contact: linux-bluetooth@vger.kernel.org
-Description:
- LED selector for Intuos4 WL. There are 4 leds, but only one LED
- can be lit at a time. Max brightness is 127.
-
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/led
-Date: August 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/led
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
Attribute group for control of the status LEDs and the OLEDs.
This attribute group is only available for Intuos 4 M, L,
- and XL (with LEDs and OLEDs), Intuos 5 (LEDs only), and Cintiq
- 21UX2 and Cintiq 24HD (LEDs only). Therefore its presence
- implicitly signifies the presence of said LEDs and OLEDs on the
- tablet device.
+ and XL (with LEDs and OLEDs), Intuos 4 WL, Intuos 5 (LEDs only),
+ Intuos Pro (LEDs only) and Cintiq 21UX2 and Cintiq 24HD
+ (LEDs only). Therefore its presence implicitly signifies the
+ presence of said LEDs and OLEDs on the tablet device.
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance
-Date: August 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status0_luminance
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
Writing to this file sets the status LED luminance (1..127)
@@ -50,16 +29,16 @@ Description:
button is pressed on the stylus. This luminance level is
normally lower than the level when a button is pressed.
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status1_luminance
-Date: August 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status1_luminance
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
Writing to this file sets the status LED luminance (1..127)
when the stylus touches the tablet surface, or any button is
pressed on the stylus.
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
-Date: August 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led0_select
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
Writing to this file sets which one of the four (for Intuos 4
@@ -67,23 +46,23 @@ Description:
24HD) status LEDs is active (0..3). The other three LEDs on the
same side are always inactive.
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led1_select
-Date: September 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led1_select
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
Writing to this file sets which one of the left four (for Cintiq 21UX2
and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on
the left are always inactive.
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/buttons_luminance
-Date: August 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/buttons_luminance
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
Writing to this file sets the overall luminance level (0..15)
of all eight button OLED displays.
-What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/button<n>_rawimg
-Date: August 2011
+What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/button<n>_rawimg
+Date: August 2014
Contact: linux-input@vger.kernel.org
Description:
When writing a 1024 byte raw image in Wacom Intuos 4
@@ -93,3 +72,8 @@ Description:
byte chunk encodes the image data for two consecutive lines on
the display. The low nibble of each byte contains the first
line, and the high nibble contains the second line.
+ When the Wacom Intuos 4 is connected over Bluetooth, the
+ image has to contain 256 bytes (64x32 px 1 bit colour).
+ The format is also scrambled, like in the USB mode, and it can
+ be summarized by converting 76543210 into GECA6420.
+ HGFEDCBA HFDB7531
--
2.0.4
^ permalink raw reply related
* Re: [PATCH v2] Input - wacom: update the ABI doc according to latest changes
From: Ping Cheng @ 2014-08-07 20:54 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Dmitry Torokhov, Jiri Kosina, Jason Gerecke, Przemo Firszt,
linux-kernel@vger.kernel.org, linux-input
In-Reply-To: <1407444232-4005-1-git-send-email-benjamin.tissoires@redhat.com>
On Thu, Aug 7, 2014 at 1:43 PM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> Now the devices show up under hid no matter the connection (for USB
> and Bluetooth, not serial nor i2c).
>
> The USB devices can now be easily found under
> /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>
>
> The Bluetooth devices could also be found under this path since their
> inclusion (April 2010), so this patch fixes the unprecise "hidraw*" path
> for them.
>
> The ABI has been unified while setting the LEDs and OLEDs. So Bluetooth
> devices lost their own LED selector but use the USB sysfs attribute.
> For OLEDs, Bluetooth devices handle only 1-bit images instead of 4 for USB.
> The documentation has been updated to match this.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Ping
> Documentation/ABI/testing/sysfs-driver-wacom | 70 +++++++++++-----------------
> 1 file changed, 27 insertions(+), 43 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-driver-wacom b/Documentation/ABI/testing/sysfs-driver-wacom
> index 7fc7810..c4f0fed 100644
> --- a/Documentation/ABI/testing/sysfs-driver-wacom
> +++ b/Documentation/ABI/testing/sysfs-driver-wacom
> @@ -1,48 +1,27 @@
> -WWhat: /sys/class/hidraw/hidraw*/device/oled*_img
> -Date: June 2012
> -Contact: linux-bluetooth@vger.kernel.org
> -Description:
> - The /sys/class/hidraw/hidraw*/device/oled*_img files control
> - OLED mocro displays on Intuos4 Wireless tablet. Accepted image
> - has to contain 256 bytes (64x32 px 1 bit colour). The format
> - is the same as PBM image 62x32px without header (64 bits per
> - horizontal line, 32 lines). An example of setting OLED No. 0:
> - dd bs=256 count=1 if=img_file of=[path to oled0_img]/oled0_img
> - The attribute is read only and no local copy of the image is
> - stored.
> -
> -What: /sys/class/hidraw/hidraw*/device/speed
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed
> Date: April 2010
> Kernel Version: 2.6.35
> Contact: linux-bluetooth@vger.kernel.org
> Description:
> - The /sys/class/hidraw/hidraw*/device/speed file controls
> - reporting speed of Wacom bluetooth tablet. Reading from
> - this file returns 1 if tablet reports in high speed mode
> + The /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/speed file
> + controls reporting speed of Wacom bluetooth tablet. Reading
> + from this file returns 1 if tablet reports in high speed mode
> or 0 otherwise. Writing to this file one of these values
> switches reporting speed.
>
> -What: /sys/class/leds/0005\:056A\:00BD.0001\:selector\:*/
> -Date: May 2012
> -Kernel Version: 3.5
> -Contact: linux-bluetooth@vger.kernel.org
> -Description:
> - LED selector for Intuos4 WL. There are 4 leds, but only one LED
> - can be lit at a time. Max brightness is 127.
> -
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/led
> -Date: August 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/led
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> Attribute group for control of the status LEDs and the OLEDs.
> This attribute group is only available for Intuos 4 M, L,
> - and XL (with LEDs and OLEDs), Intuos 5 (LEDs only), and Cintiq
> - 21UX2 and Cintiq 24HD (LEDs only). Therefore its presence
> - implicitly signifies the presence of said LEDs and OLEDs on the
> - tablet device.
> + and XL (with LEDs and OLEDs), Intuos 4 WL, Intuos 5 (LEDs only),
> + Intuos Pro (LEDs only) and Cintiq 21UX2 and Cintiq 24HD
> + (LEDs only). Therefore its presence implicitly signifies the
> + presence of said LEDs and OLEDs on the tablet device.
>
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status0_luminance
> -Date: August 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status0_luminance
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> Writing to this file sets the status LED luminance (1..127)
> @@ -50,16 +29,16 @@ Description:
> button is pressed on the stylus. This luminance level is
> normally lower than the level when a button is pressed.
>
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status1_luminance
> -Date: August 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status1_luminance
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> Writing to this file sets the status LED luminance (1..127)
> when the stylus touches the tablet surface, or any button is
> pressed on the stylus.
>
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led0_select
> -Date: August 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led0_select
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> Writing to this file sets which one of the four (for Intuos 4
> @@ -67,23 +46,23 @@ Description:
> 24HD) status LEDs is active (0..3). The other three LEDs on the
> same side are always inactive.
>
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/status_led1_select
> -Date: September 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/status_led1_select
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> Writing to this file sets which one of the left four (for Cintiq 21UX2
> and Cintiq 24HD) status LEDs is active (0..3). The other three LEDs on
> the left are always inactive.
>
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/buttons_luminance
> -Date: August 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/buttons_luminance
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> Writing to this file sets the overall luminance level (0..15)
> of all eight button OLED displays.
>
> -What: /sys/bus/usb/devices/<busnum>-<devnum>:<cfg>.<intf>/wacom_led/button<n>_rawimg
> -Date: August 2011
> +What: /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>/wacom_led/button<n>_rawimg
> +Date: August 2014
> Contact: linux-input@vger.kernel.org
> Description:
> When writing a 1024 byte raw image in Wacom Intuos 4
> @@ -93,3 +72,8 @@ Description:
> byte chunk encodes the image data for two consecutive lines on
> the display. The low nibble of each byte contains the first
> line, and the high nibble contains the second line.
> + When the Wacom Intuos 4 is connected over Bluetooth, the
> + image has to contain 256 bytes (64x32 px 1 bit colour).
> + The format is also scrambled, like in the USB mode, and it can
> + be summarized by converting 76543210 into GECA6420.
> + HGFEDCBA HFDB7531
> --
> 2.0.4
>
^ permalink raw reply
* ALPS v7 touchpad
From: Dylan Thurston @ 2014-08-07 22:46 UTC (permalink / raw)
To: linux-input
[-- Attachment #1: Type: text/plain, Size: 1223 bytes --]
Hi,
I'm using an ALPS v7 touchpad on an HP Revolve 810. I just compiled
linuxnext-20140807, which has the recent patches discussed on this
list to give it support. But there's an issue: selecting text doesn't
really work, as the driver gives multiple ButtonPress and
ButtonRelease events when I attempt a click-drag.
Here's the relevant line from the current dmesg:
Aug 7 17:37:17 tulip kernel: [ 4.092326] input: AlpsPS/2 ALPS DualPoint TouchPad as /devices/platform/i8042/serio4/input/input11
Since that's maybe not so informative, here's an older kernel that didn't recognize it:
Aug 7 17:23:28 tulip kernel: [ 3.671749] psmouse serio4: alps: ALPS touchpad: E7=73 03 0a, EC=88 b3 18
I've attached some xev output where I attempted a click-drag. In the
first I clicked with my index finger and then moved it; in the second
I clicked with my thumb, then put down my index finger and attempted
to drag. The first log gives only a single ButtonPress event, but it's
really difficult to execute.
Any help is greatly appreciated! I had previously been using a patch
from Elaine Chen that she wrote back in January-February; she
indicated there are slightly different versions of the firmware.
--Dylan Thurston
[-- Attachment #2: xev-1 --]
[-- Type: text/plain, Size: 21395 bytes --]
Outer window is 0x2600001, inner window is 0x2600002
PropertyNotify event, serial 8, synthetic NO, window 0x2600001,
atom 0x27 (WM_NAME), time 3867426, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x2600001,
atom 0x22 (WM_COMMAND), time 3867426, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x2600001,
atom 0x28 (WM_NORMAL_HINTS), time 3867426, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x2600001,
parent 0x2600001, window 0x2600002, (10,10), width 50, height 50
border_width 4, override NO
PropertyNotify event, serial 14, synthetic NO, window 0x2600001,
atom 0x14e (WM_PROTOCOLS), time 3867426, state PropertyNewValue
MapNotify event, serial 15, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600002, override NO
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x15c (_NET_WM_STATE), time 3867427, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x156 (_NET_WM_DESKTOP), time 3867427, state PropertyNewValue
ConfigureNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, (0,0), width 178, height 178,
border_width 0, above 0x220106c, override NO
ReparentNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, parent 0x1805c6a,
(1,22), override NO
ConfigureNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, (1,22), width 178, height 178,
border_width 0, above 0x1805c79, override NO
ConfigureNotify event, serial 18, synthetic YES, window 0x2600001,
event 0x2600001, window 0x2600001, (612,304), width 178, height 178,
border_width 0, above 0x1805c6a, override NO
MapNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, override NO
VisibilityNotify event, serial 18, synthetic NO, window 0x2600001,
state VisibilityUnobscured
Expose event, serial 18, synthetic NO, window 0x2600001,
(0,0), width 178, height 10, count 3
Expose event, serial 18, synthetic NO, window 0x2600001,
(0,10), width 10, height 58, count 2
Expose event, serial 18, synthetic NO, window 0x2600001,
(68,10), width 110, height 58, count 1
Expose event, serial 18, synthetic NO, window 0x2600001,
(0,68), width 178, height 110, count 0
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x187 (WM_STATE), time 3867432, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x1b9 (_NET_WM_ALLOWED_ACTIONS), time 3867433, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x15c (_NET_WM_STATE), time 3867433, state PropertyNewValue
FocusIn event, serial 18, synthetic NO, window 0x2600001,
mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 18, synthetic NO, window 0x0,
keys: 4294967227 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x153 (_NET_FRAME_EXTENTS), time 3867433, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x15c (_NET_WM_STATE), time 3867433, state PropertyNewValue
KeyRelease event, serial 20, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3867439, (167,-8), root:(779,296),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
XLookupString gives 1 bytes: (0d) "
"
XFilterEvent returns: False
PropertyNotify event, serial 36, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3867450, state PropertyNewValue
PropertyNotify event, serial 37, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3867450, state PropertyNewValue
EnterNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868128, (154,2), root:(766,306),
mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
focus YES, state 0
KeymapNotify event, serial 37, synthetic NO, window 0x0,
keys: 92 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868333, (154,2), root:(766,306),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868345, (153,4), root:(765,308),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868359, (152,7), root:(764,311),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868371, (150,10), root:(762,314),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868383, (147,13), root:(759,317),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868395, (145,15), root:(757,319),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868407, (142,17), root:(754,321),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868419, (140,20), root:(752,324),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868431, (137,22), root:(749,326),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868443, (135,25), root:(747,329),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868454, (133,28), root:(745,332),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868466, (130,31), root:(742,335),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868478, (129,34), root:(741,338),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868490, (127,36), root:(739,340),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868502, (126,38), root:(738,342),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868514, (125,40), root:(737,344),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868526, (124,41), root:(736,345),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868538, (123,42), root:(735,346),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868552, (122,44), root:(734,348),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868564, (121,46), root:(733,350),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868576, (119,48), root:(731,352),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868588, (117,50), root:(729,354),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868602, (115,52), root:(727,356),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868614, (112,53), root:(724,357),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868626, (111,54), root:(723,358),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868638, (110,55), root:(722,359),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3868652, (110,56), root:(722,360),
state 0x0, is_hint 0, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3869751, (110,56), root:(722,360),
state 0x0, button 1, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3869851, (110,56), root:(722,360),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3869863, (110,56), root:(722,360),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3869946, (110,56), root:(722,360),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870078, (110,55), root:(722,359),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870090, (110,54), root:(722,358),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870104, (110,53), root:(722,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870124, (110,53), root:(722,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870136, (111,53), root:(723,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870149, (112,53), root:(724,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870161, (112,53), root:(724,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870173, (113,53), root:(725,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870185, (113,53), root:(725,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870197, (114,53), root:(726,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870209, (115,53), root:(727,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870221, (116,53), root:(728,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870233, (118,53), root:(730,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870245, (119,53), root:(731,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870257, (120,53), root:(732,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870269, (120,53), root:(732,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870281, (121,53), root:(733,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870295, (121,53), root:(733,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870307, (121,53), root:(733,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870345, (122,53), root:(734,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870363, (122,53), root:(734,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870377, (122,53), root:(734,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870388, (123,53), root:(735,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870402, (123,53), root:(735,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870414, (124,53), root:(736,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870426, (124,53), root:(736,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870438, (124,53), root:(736,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870485, (124,53), root:(736,357),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870498, (128,52), root:(740,356),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870510, (132,49), root:(744,353),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870522, (136,45), root:(748,349),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870534, (142,41), root:(754,345),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870548, (146,38), root:(758,342),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870568, (149,37), root:(761,341),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870580, (151,36), root:(763,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870594, (151,36), root:(763,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870629, (151,36), root:(763,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870641, (151,36), root:(763,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870665, (152,36), root:(764,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870690, (152,36), root:(764,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870703, (152,36), root:(764,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870787, (152,36), root:(764,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870833, (153,36), root:(765,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870868, (153,36), root:(765,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870880, (153,36), root:(765,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870895, (153,36), root:(765,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870906, (153,36), root:(765,340),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870918, (154,34), root:(766,338),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870930, (156,32), root:(768,336),
state 0x100, is_hint 0, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870944, (156,32), root:(768,336),
state 0x100, button 1, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870964, (157,32), root:(769,336),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870976, (157,32), root:(769,336),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3870989, (159,31), root:(771,335),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3871002, (160,31), root:(772,335),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3871014, (161,31), root:(773,335),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3871026, (162,31), root:(774,335),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3871039, (170,31), root:(782,335),
state 0x0, is_hint 0, same_screen YES
KeyPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3872075, (170,31), root:(782,335),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 37, synthetic NO, window 0x2600001,
mode NotifyGrab, detail NotifyAncestor
LeaveNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3872269, (170,31), root:(782,335),
mode NotifyGrab, detail NotifyAncestor, same_screen YES,
focus YES, state 64
VisibilityNotify event, serial 37, synthetic NO, window 0x2600001,
state VisibilityPartiallyObscured
Expose event, serial 37, synthetic NO, window 0x2600001,
(71,145), width 24, height 33, count 1
Expose event, serial 37, synthetic NO, window 0x2600001,
(100,145), width 78, height 33, count 0
Expose event, serial 37, synthetic NO, window 0x2600001,
(95,0), width 5, height 15, count 1
Expose event, serial 37, synthetic NO, window 0x2600001,
(95,145), width 5, height 33, count 0
FocusOut event, serial 37, synthetic NO, window 0x2600001,
mode NotifyWhileGrabbed, detail NotifyNonlinear
Expose event, serial 37, synthetic NO, window 0x2600001,
(0,15), width 10, height 53, count 2
Expose event, serial 37, synthetic NO, window 0x2600001,
(68,15), width 27, height 53, count 1
Expose event, serial 37, synthetic NO, window 0x2600001,
(0,68), width 95, height 77, count 0
PropertyNotify event, serial 37, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3872459, state PropertyNewValue
PropertyNotify event, serial 37, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3872459, state PropertyNewValue
[-- Attachment #3: xev-2 --]
[-- Type: text/plain, Size: 20109 bytes --]
Outer window is 0x2600001, inner window is 0x2600002
PropertyNotify event, serial 8, synthetic NO, window 0x2600001,
atom 0x27 (WM_NAME), time 3980006, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x2600001,
atom 0x22 (WM_COMMAND), time 3980006, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x2600001,
atom 0x28 (WM_NORMAL_HINTS), time 3980006, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x2600001,
parent 0x2600001, window 0x2600002, (10,10), width 50, height 50
border_width 4, override NO
PropertyNotify event, serial 14, synthetic NO, window 0x2600001,
atom 0x14e (WM_PROTOCOLS), time 3980007, state PropertyNewValue
MapNotify event, serial 15, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600002, override NO
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x15c (_NET_WM_STATE), time 3980009, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x156 (_NET_WM_DESKTOP), time 3980009, state PropertyNewValue
ConfigureNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, (0,0), width 178, height 178,
border_width 0, above 0x220106c, override NO
ReparentNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, parent 0x18061c2,
(1,22), override NO
ConfigureNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, (1,22), width 178, height 178,
border_width 0, above 0x18061d1, override NO
ConfigureNotify event, serial 18, synthetic YES, window 0x2600001,
event 0x2600001, window 0x2600001, (612,304), width 178, height 178,
border_width 0, above 0x18061c2, override NO
MapNotify event, serial 18, synthetic NO, window 0x2600001,
event 0x2600001, window 0x2600001, override NO
VisibilityNotify event, serial 18, synthetic NO, window 0x2600001,
state VisibilityUnobscured
Expose event, serial 18, synthetic NO, window 0x2600001,
(0,0), width 178, height 10, count 3
Expose event, serial 18, synthetic NO, window 0x2600001,
(0,10), width 10, height 58, count 2
Expose event, serial 18, synthetic NO, window 0x2600001,
(68,10), width 110, height 58, count 1
Expose event, serial 18, synthetic NO, window 0x2600001,
(0,68), width 178, height 110, count 0
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x187 (WM_STATE), time 3980016, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x1b9 (_NET_WM_ALLOWED_ACTIONS), time 3980016, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x15c (_NET_WM_STATE), time 3980016, state PropertyNewValue
FocusIn event, serial 18, synthetic NO, window 0x2600001,
mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 18, synthetic NO, window 0x0,
keys: 4294967227 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x153 (_NET_FRAME_EXTENTS), time 3980016, state PropertyNewValue
PropertyNotify event, serial 18, synthetic NO, window 0x2600001,
atom 0x15c (_NET_WM_STATE), time 3980016, state PropertyNewValue
PropertyNotify event, serial 33, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3980036, state PropertyNewValue
PropertyNotify event, serial 33, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3980036, state PropertyNewValue
KeyRelease event, serial 34, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3980038, (281,248), root:(893,552),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
XLookupString gives 1 bytes: (0d) "
"
XFilterEvent returns: False
EnterNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3981944, (167,176), root:(779,480),
mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
focus YES, state 0
KeymapNotify event, serial 37, synthetic NO, window 0x0,
keys: 83 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982003, (167,176), root:(779,480),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982015, (166,174), root:(778,478),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982027, (164,172), root:(776,476),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982039, (162,171), root:(774,475),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982053, (160,169), root:(772,473),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982064, (158,168), root:(770,472),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982076, (155,167), root:(767,471),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982091, (153,166), root:(765,470),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982102, (151,166), root:(763,470),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982114, (148,166), root:(760,470),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982126, (146,165), root:(758,469),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982138, (144,165), root:(756,469),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982150, (142,164), root:(754,468),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982162, (140,163), root:(752,467),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982174, (138,162), root:(750,466),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982186, (136,161), root:(748,465),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982198, (135,160), root:(747,464),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982210, (134,159), root:(746,463),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3982222, (133,159), root:(745,463),
state 0x0, is_hint 0, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983252, (133,159), root:(745,463),
state 0x0, button 1, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983373, (133,159), root:(745,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983385, (133,159), root:(745,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983397, (133,159), root:(745,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983410, (133,159), root:(745,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983433, (132,159), root:(744,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983445, (132,159), root:(744,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983457, (132,159), root:(744,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983469, (131,159), root:(743,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983495, (131,159), root:(743,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983507, (130,159), root:(742,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983519, (130,159), root:(742,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983531, (129,159), root:(741,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983543, (129,159), root:(741,463),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983555, (129,159), root:(741,463),
state 0x100, is_hint 0, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983566, (129,159), root:(741,463),
state 0x100, button 1, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983580, (129,159), root:(741,463),
state 0x0, button 1, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983617, (129,159), root:(741,463),
state 0x100, button 1, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983629, (129,159), root:(741,463),
state 0x0, button 1, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983736, (129,158), root:(741,462),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983748, (130,157), root:(742,461),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983760, (130,156), root:(742,460),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983772, (131,154), root:(743,458),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983784, (131,152), root:(743,456),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983796, (131,150), root:(743,454),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983808, (131,148), root:(743,452),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983820, (131,146), root:(743,450),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983832, (131,144), root:(743,448),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983843, (131,143), root:(743,447),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983855, (131,142), root:(743,446),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983867, (131,141), root:(743,445),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983879, (131,141), root:(743,445),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983892, (131,139), root:(743,443),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983903, (132,137), root:(744,441),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983915, (132,134), root:(744,438),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983927, (133,131), root:(745,435),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983939, (133,129), root:(745,433),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983951, (133,129), root:(745,433),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983963, (134,129), root:(746,433),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983975, (134,129), root:(746,433),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3983987, (134,129), root:(746,433),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984035, (134,128), root:(746,432),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984047, (135,127), root:(747,431),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984059, (135,127), root:(747,431),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984071, (135,126), root:(747,430),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984085, (136,125), root:(748,429),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984096, (136,125), root:(748,429),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984120, (136,125), root:(748,429),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984156, (136,125), root:(748,429),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984168, (136,124), root:(748,428),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984180, (137,123), root:(749,427),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984192, (138,122), root:(750,426),
state 0x100, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984204, (138,122), root:(750,426),
state 0x100, is_hint 0, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984395, (138,122), root:(750,426),
state 0x100, button 1, same_screen YES
ButtonPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984407, (138,122), root:(750,426),
state 0x0, button 1, same_screen YES
ButtonRelease event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984457, (138,122), root:(750,426),
state 0x100, button 1, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984778, (141,122), root:(753,426),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984790, (147,122), root:(759,426),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984802, (155,122), root:(767,426),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984814, (163,122), root:(775,426),
state 0x0, is_hint 0, same_screen YES
MotionNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984826, (170,122), root:(782,426),
state 0x0, is_hint 0, same_screen YES
LeaveNotify event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3984458, (180,122), root:(792,426),
mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
focus YES, state 0
KeyPress event, serial 37, synthetic NO, window 0x2600001,
root 0xa5, subw 0x0, time 3985628, (298,144), root:(910,448),
state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 37, synthetic NO, window 0x2600001,
mode NotifyGrab, detail NotifyAncestor
VisibilityNotify event, serial 37, synthetic NO, window 0x2600001,
state VisibilityPartiallyObscured
Expose event, serial 37, synthetic NO, window 0x2600001,
(71,145), width 24, height 33, count 1
Expose event, serial 37, synthetic NO, window 0x2600001,
(100,145), width 78, height 33, count 0
Expose event, serial 37, synthetic NO, window 0x2600001,
(95,0), width 5, height 15, count 1
Expose event, serial 37, synthetic NO, window 0x2600001,
(95,145), width 5, height 33, count 0
FocusOut event, serial 37, synthetic NO, window 0x2600001,
mode NotifyWhileGrabbed, detail NotifyNonlinear
Expose event, serial 37, synthetic NO, window 0x2600001,
(0,15), width 10, height 53, count 2
Expose event, serial 37, synthetic NO, window 0x2600001,
(68,15), width 27, height 53, count 1
Expose event, serial 37, synthetic NO, window 0x2600001,
(0,68), width 95, height 77, count 0
PropertyNotify event, serial 37, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3986184, state PropertyNewValue
PropertyNotify event, serial 37, synthetic NO, window 0x2600001,
atom 0x1bc (_NET_WM_ICON_GEOMETRY), time 3986184, state PropertyNewValue
^ permalink raw reply
* [git pull] Input updates for 3.17-rc0
From: Dmitry Torokhov @ 2014-08-08 6:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linux-input, Jiri Kosina
[-- Attachment #1: Type: text/plain, Size: 11129 bytes --]
Hi Linus,
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus
or
master.kernel.org:/pub/scm/linux/kernel/git/dtor/input.git for-linus
to receive updates for the input subsystem. You will get a bit update to
Wacom driver by Benjamin Tissoires, converting it to HID infrastructure
and unifying USB and Bluetooth models. You will also get a large update
to ALPS driver by Hans de Goede, which adds support for newer touchpad
models as well as cleans up and restructures the code, more changes to
Atmel MXT driver, including device tree support, a new driver for iPaq
x3xxx touchscreen, a driver for serial Wacom tablets, a driver for
Microchip's CAP1106, and assorted cleanups and improvements to existing
drover and input core.
Thanks!
Changelog:
---------
Benjamin Tissoires (35):
Input: Revert "wacom - testing result shows get_report is unnecessary."
Input: wacom - assign phys field from struct wacom into input_dev
Input: wacom - create a separate input device for pads
Input: wacom - split out the pad device for Intuos/Cintiq
Input: wacom - split out the pad device for Bamboos
Input: wacom - split out the pad device for DTUS
Input: wacom - split out the pad device for Graphire G4 and MO
Input: wacom - split out the pad device for the wireless receiver
Input: wacom - include and use linux/hid.h
Input: wacom - switch from an USB driver to a HID driver
Input: wacom - use hid communication instead of plain usb
Input: wacom - use HID core to actually fetch the report descriptor
Input: wacom - compute the HID report size to get the actual packet size
Input: wacom - install LED/OLED sysfs files in the HID device instead of USB
Input: wacom - register the input devices on top of the HID one
Input: wacom - remove usb dependency for siblings devices
Input: wacom - register power device at the HID level
Input: wacom - use hid_info instead of plain dev_info
Input: wacom - use in-kernel HID parser
Input: wacom - use hidinput_calc_abs_res instead of duplicating its code
Input: wacom - remove field pktlen declaration in the list of devices
Input: wacom - keep wacom_ids ordered
Input: wacom - move the USB (now hid) Wacom driver in drivers/hid
Input: wacom - put a flag when the led are initialized
Input: wacom - enhance Wireless Receiver battery reporting
Input: wacom - use a uniq name for the battery device
Input: wacom - register an ac power supply for wireless devices
Input: wacom - prepare the driver to include BT devices
Input: wacom - handle Graphire BT tablets in wacom.ko
Input: wacom - handle Intuos 4 BT in wacom.ko
Input: wacom - check for bluetooth protocol while setting OLEDs
Input: wacom - add copyright note and bump version to 2.0
Input: HID - remove hid-wacom Bluetooth driver
Input: wacom - only register once the MODULE_* macros
Input: wacom - update the ABI doc according to latest changes
Benson Leung (1):
Input: atmel_mxt_ts - set pointer emulation on touchpads
Daniel Mack (1):
Input: add driver for Microchip's CAP1106
David Herrmann (2):
Input: uinput - uinput_validate_absbits() cleanup
Input: uinput - add UI_GET_VERSION ioctl
Dexuan Cui (1):
Input: hyperv-keyboard - register as a wakeup source
Dmitry Artamonow (1):
Input: driver for touchscreen on iPaq h3xxx
Dmitry Torokhov (2):
Input: ipaq-micro-ts - introduce open/close
Input: wacom_serial4 - prepare for wacom USB moving to HID
Fabian Frederick (2):
Input: keyspan_remote - remove unnecessary break after goto
Input: edt-ft5x06 - remove unnecessary null test
Fabio Estevam (3):
Input: mcs5000_ts - protect PM functions with CONFIG_PM_SLEEP
Input: mcs5000_ts - remove ifdef around power management methods
Input: imx_keypad - remove ifdef round PM methods
Hans de Goede (14):
Input: add support for Wacom protocol 4 serial tablets
Input: alps - improve 2-finger reporting on v3 models
Input: alps - process_bitmap: don't invert the Y-axis on Rushmore
Input: alps - process_bitmap: add alps_get_bitmap_points() helper function
Input: alps - process_bitmap: fix counting of high point bits
Input: alps - process_bitmap: round down when spreading adjescent fingers over 2 points
Input: alps - use struct input_mt_pos to track coordinates
Input: alps - use standard contact tracking instead of DIY
Input: alps - use single touch data when v3 mt data contains only one finger
Input: alps - add an alps_report_semi_mt_data function
Input: alps - report 2 touches when we've > 2 fingers
Input: alps - change decode function prototype to return an int
Input: alps - cache firmware version
Input: alps - Rushmore and v7 resolution support
Heiko Stuebner (1):
Input: zforce - add regulator handling
Himangi Saraogi (1):
Input: max7359 - introduce the use of managed interfaces
Jason Gerecke (2):
Input: wacom - support up to 2048 pressure levels with ISDv4
Input: wacom - add support for 0x12C ISDv4 sensor
Nick Dyer (13):
Input: atmel_mxt_ts - initialise IRQ before probing
Input: atmel_mxt_ts - move input device init into separate function
Input: atmel_mxt_ts - download device config using firmware loader
Input: atmel_mxt_ts - calculate and check CRC in config file
Input: atmel_mxt_ts - handle APP_CRC_FAIL on startup
Input: atmel_mxt_ts - handle bootloader previously unlocked
Input: atmel_mxt_ts - add bootloader addresses for new chips
Input: atmel_mxt_ts - recover from bootloader on probe
Input: atmel_mxt_ts - add support for dynamic message size
Input: atmel_mxt_ts - decode T6 status messages
Input: atmel_mxt_ts - split message handler into separate functions
Input: atmel_mxt_ts - implement T44 message handling
Input: atmel_mxt_ts - use deep sleep mode when stopped
Pramod Gurav (4):
Input: soc_button_array - add missing memory allocation check
Input: ads7846 - release resources on failure for clean exit
Input: jornada720_ts - switch to using managed resources
Input: jornada720_ts - get rid of space indentation and use tab
Przemo Firszt (1):
Input: wacom - remove passing id for wacom_set_report
Roger Quadros (5):
Input: pixcir_i2c_ts - use Type-B Multi-Touch protocol
Input: pixcir_i2c_ts - support up to 5 fingers and hardware tracking IDs
Input: pixcir_i2c_ts - add device tree support
ARM: dts: am43x-epos-evm: Update binding for touchscreen size
ARM: dts: am437x-gp-evm: Update binding for touchscreen size
Stephen Warren (1):
Input: atmel_mxt_ts - implement device tree support
Vasily Khoruzhick (1):
Input: s3c2410_ts - fix preparing/enabling clock
Yunkang Tang (2):
Input: alps - fix rushmore packet decoding
Input: alps - add support for v7 devices
Diffstat:
--------
Documentation/ABI/testing/sysfs-driver-wacom | 70 +-
.../devicetree/bindings/input/atmel,maxtouch.txt | 25 +
.../devicetree/bindings/input/cap1106.txt | 53 +
.../bindings/input/touchscreen/pixcir_i2c_ts.txt | 26 +
.../bindings/input/touchscreen/zforce_ts.txt | 4 +
.../devicetree/bindings/vendor-prefixes.txt | 1 +
MAINTAINERS | 7 +
arch/arm/boot/dts/am437x-gp-evm.dts | 4 +-
arch/arm/boot/dts/am43x-epos-evm.dts | 4 +-
drivers/hid/Kconfig | 13 +-
drivers/hid/Makefile | 4 +-
drivers/hid/hid-core.c | 12 +-
drivers/hid/hid-wacom.c | 973 ---------------
drivers/{input/tablet => hid}/wacom.h | 27 +-
drivers/{input/tablet => hid}/wacom_sys.c | 1229 +++++++++---------
drivers/{input/tablet => hid}/wacom_wac.c | 1176 ++++++++++-------
drivers/{input/tablet => hid}/wacom_wac.h | 22 +-
drivers/input/keyboard/Kconfig | 10 +
drivers/input/keyboard/Makefile | 1 +
drivers/input/keyboard/cap1106.c | 335 +++++
drivers/input/keyboard/imx_keypad.c | 6 +-
drivers/input/keyboard/max7359_keypad.c | 45 +-
drivers/input/misc/keyspan_remote.c | 1 -
drivers/input/misc/soc_button_array.c | 3 +
drivers/input/misc/uinput.c | 47 +-
drivers/input/mouse/alps.c | 691 ++++++----
drivers/input/mouse/alps.h | 60 +-
drivers/input/serio/hyperv-keyboard.c | 13 +
drivers/input/tablet/Kconfig | 18 +-
drivers/input/tablet/Makefile | 4 +-
drivers/input/tablet/wacom_serial4.c | 620 +++++++++
drivers/input/touchscreen/Kconfig | 12 +
drivers/input/touchscreen/Makefile | 1 +
drivers/input/touchscreen/ads7846.c | 6 +-
drivers/input/touchscreen/atmel_mxt_ts.c | 1315 +++++++++++++++-----
drivers/input/touchscreen/edt-ft5x06.c | 3 +-
drivers/input/touchscreen/ipaq-micro-ts.c | 166 +++
drivers/input/touchscreen/jornada720_ts.c | 70 +-
drivers/input/touchscreen/mcs5000_ts.c | 6 +-
drivers/input/touchscreen/pixcir_i2c_ts.c | 250 +++-
drivers/input/touchscreen/s3c2410_ts.c | 4 +-
drivers/input/touchscreen/zforce_ts.c | 31 +
drivers/platform/chrome/chromeos_laptop.c | 4 -
include/linux/hid.h | 5 +
include/linux/i2c/atmel_mxt_ts.h | 3 -
include/linux/input/pixcir_ts.h | 12 +
include/uapi/linux/serio.h | 1 +
include/uapi/linux/uinput.h | 9 +
48 files changed, 4516 insertions(+), 2886 deletions(-)
create mode 100644 Documentation/devicetree/bindings/input/atmel,maxtouch.txt
create mode 100644 Documentation/devicetree/bindings/input/cap1106.txt
create mode 100644 Documentation/devicetree/bindings/input/touchscreen/pixcir_i2c_ts.txt
delete mode 100644 drivers/hid/hid-wacom.c
rename drivers/{input/tablet => hid}/wacom.h (89%)
rename drivers/{input/tablet => hid}/wacom_sys.c (51%)
rename drivers/{input/tablet => hid}/wacom_wac.c (74%)
rename drivers/{input/tablet => hid}/wacom_wac.h (88%)
create mode 100644 drivers/input/keyboard/cap1106.c
create mode 100644 drivers/input/tablet/wacom_serial4.c
create mode 100644 drivers/input/touchscreen/ipaq-micro-ts.c
--
Dmitry
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply
* Re: [PATCH v2] Input - wacom: update the ABI doc according to latest changes
From: Dmitry Torokhov @ 2014-08-08 6:40 UTC (permalink / raw)
To: Ping Cheng
Cc: Benjamin Tissoires, Jiri Kosina, Jason Gerecke, Przemo Firszt,
linux-kernel@vger.kernel.org, linux-input
In-Reply-To: <CAF8JNhJuWMPMQzur2rHOSNVSsa6-sM5kZDA2pBNT5ABws340vg@mail.gmail.com>
On Thu, Aug 07, 2014 at 01:54:22PM -0700, Ping Cheng wrote:
> On Thu, Aug 7, 2014 at 1:43 PM, Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
> > Now the devices show up under hid no matter the connection (for USB
> > and Bluetooth, not serial nor i2c).
> >
> > The USB devices can now be easily found under
> > /sys/bus/hid/devices/<bus>:<vid>:<pid>.<n>
> >
> > The Bluetooth devices could also be found under this path since their
> > inclusion (April 2010), so this patch fixes the unprecise "hidraw*" path
> > for them.
> >
> > The ABI has been unified while setting the LEDs and OLEDs. So Bluetooth
> > devices lost their own LED selector but use the USB sysfs attribute.
> > For OLEDs, Bluetooth devices handle only 1-bit images instead of 4 for USB.
> > The documentation has been updated to match this.
> >
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> Reviewed-by: Ping Cheng <pingc@wacom.com>
Applied, thank you.
--
Dmitry
^ permalink raw reply
* Re: [PATCH] Input: cap1106 - allow changing key mapping from userspace
From: Dmitry Torokhov @ 2014-08-08 6:50 UTC (permalink / raw)
To: Daniel Mack; +Cc: linux-input, linux-kernel
In-Reply-To: <53E321B0.9040701@gmail.com>
On Thu, Aug 07, 2014 at 08:50:24AM +0200, Daniel Mack wrote:
> Hi Dmitry,
>
> On 08/07/2014 08:20 AM, Dmitry Torokhov wrote:
> > On Sun, Jul 20, 2014 at 06:20:49PM -0700, Dmitry Torokhov wrote:
> >> Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings
> >> from userspace.
> >>
> >> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> >> ---
> >>
> >> Just compiled, not tested.
> >
> > *ping* Any chance you could give it a try? Thanks!
>
> Oh, sorry, I didn't realize you're waiting for me on this.
>
> Unfortunately, I can't test it myself anymore, as I had to return the
> board I found this chip on. But as the change looks very straight
> forward, I'd suggest you just apply that patch and I ask the vendor to
> give it a quick try. In case of any problems, I'll let you know. Does
> that sound feasible?
OK, I'll put you down as reviewed-by then so we can share the glory (and the
blame ;))
Thanks.
--
Dmitry
^ permalink raw reply
* [PATCH 1/2] Input: da9055_onkey: Remove unnecessary OOM meassage
From: Kiran Padwal @ 2014-08-08 7:14 UTC (permalink / raw)
To: support.opensource, dmitry.torokhov
Cc: anthony.olech.opensource, david.chen, kiran.padwal21, linux-input,
linux-kernel, Kiran Padwal
There is no need to print out-of-memory errors since this is already
done by the memory management subsystem which even calls dump_stack().
Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
---
drivers/input/misc/da9055_onkey.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
index 4765799..ed6eaa9 100644
--- a/drivers/input/misc/da9055_onkey.c
+++ b/drivers/input/misc/da9055_onkey.c
@@ -87,10 +87,8 @@ static int da9055_onkey_probe(struct platform_device *pdev)
}
onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL);
- if (!onkey) {
- dev_err(&pdev->dev, "Failed to allocate memory\n");
+ if (!onkey)
return -ENOMEM;
- }
input_dev = input_allocate_device();
if (!input_dev) {
--
1.7.9.5
^ permalink raw reply related
* [PATCH 2/2] Input: da9055_onkey: convert to use devm_*
From: Kiran Padwal @ 2014-08-08 7:16 UTC (permalink / raw)
To: support.opensource, dmitry.torokhov
Cc: anthony.olech.opensource, david.chen, kiran.padwal21, linux-input,
linux-kernel, Kiran Padwal
Converting to devm functions can make the code smaller and cleaner.
Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
---
drivers/input/misc/da9055_onkey.c | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
index ed6eaa9..1a1e760 100644
--- a/drivers/input/misc/da9055_onkey.c
+++ b/drivers/input/misc/da9055_onkey.c
@@ -90,9 +90,9 @@ static int da9055_onkey_probe(struct platform_device *pdev)
if (!onkey)
return -ENOMEM;
- input_dev = input_allocate_device();
+ input_dev = devm_input_allocate_device(&pdev->dev);
if (!input_dev) {
- dev_err(&pdev->dev, "Failed to allocate memory\n");
+ dev_err(&pdev->dev, "Failed to allocate input device\n");
return -ENOMEM;
}
@@ -107,43 +107,33 @@ static int da9055_onkey_probe(struct platform_device *pdev)
INIT_DELAYED_WORK(&onkey->work, da9055_onkey_work);
- err = request_threaded_irq(irq, NULL, da9055_onkey_irq,
+ err = devm_request_threaded_irq(&pdev->dev, irq, NULL, da9055_onkey_irq,
IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
"ONKEY", onkey);
if (err < 0) {
dev_err(&pdev->dev,
"Failed to register ONKEY IRQ %d, error = %d\n",
irq, err);
- goto err_free_input;
+ return err;
}
err = input_register_device(input_dev);
if (err) {
dev_err(&pdev->dev, "Unable to register input device, %d\n",
err);
- goto err_free_irq;
+ cancel_delayed_work_sync(&onkey->work);
+ return err;
}
platform_set_drvdata(pdev, onkey);
return 0;
-
-err_free_irq:
- free_irq(irq, onkey);
- cancel_delayed_work_sync(&onkey->work);
-err_free_input:
- input_free_device(input_dev);
-
- return err;
}
static int da9055_onkey_remove(struct platform_device *pdev)
{
struct da9055_onkey *onkey = platform_get_drvdata(pdev);
- int irq = platform_get_irq_byname(pdev, "ONKEY");
- irq = regmap_irq_get_virq(onkey->da9055->irq_data, irq);
- free_irq(irq, onkey);
cancel_delayed_work_sync(&onkey->work);
input_unregister_device(onkey->input);
--
1.7.9.5
^ permalink raw reply related
* [PATCH] Input: da9052_onkey: convert to use devm_*
From: Kiran Padwal @ 2014-08-08 7:18 UTC (permalink / raw)
To: support.opensource, dmitry.torokhov
Cc: anthony.olech.opensource, david.chen, kiran.padwal21, linux-input,
linux-kernel, Kiran Padwal
Converting to devm functions can make the code smaller and cleaner.
Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
---
drivers/input/misc/da9052_onkey.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/input/misc/da9052_onkey.c b/drivers/input/misc/da9052_onkey.c
index 184c8f2..909441e 100644
--- a/drivers/input/misc/da9052_onkey.c
+++ b/drivers/input/misc/da9052_onkey.c
@@ -84,12 +84,14 @@ static int da9052_onkey_probe(struct platform_device *pdev)
return -EINVAL;
}
- onkey = kzalloc(sizeof(*onkey), GFP_KERNEL);
- input_dev = input_allocate_device();
- if (!onkey || !input_dev) {
- dev_err(&pdev->dev, "Failed to allocate memory\n");
- error = -ENOMEM;
- goto err_free_mem;
+ onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL);
+ if (!onkey)
+ return -ENOMEM;
+
+ input_dev = devm_input_allocate_device(&pdev->dev);
+ if (!input_dev) {
+ dev_err(&pdev->dev, "Failed to allocate input device\n");
+ return -ENOMEM;
}
onkey->input = input_dev;
@@ -108,7 +110,7 @@ static int da9052_onkey_probe(struct platform_device *pdev)
if (error < 0) {
dev_err(onkey->da9052->dev,
"Failed to register ONKEY IRQ: %d\n", error);
- goto err_free_mem;
+ return error;
}
error = input_register_device(onkey->input);
@@ -124,9 +126,6 @@ static int da9052_onkey_probe(struct platform_device *pdev)
err_free_irq:
da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey);
cancel_delayed_work_sync(&onkey->work);
-err_free_mem:
- input_free_device(input_dev);
- kfree(onkey);
return error;
}
@@ -139,7 +138,6 @@ static int da9052_onkey_remove(struct platform_device *pdev)
cancel_delayed_work_sync(&onkey->work);
input_unregister_device(onkey->input);
- kfree(onkey);
return 0;
}
--
1.7.9.5
^ permalink raw reply related
* Re: [PATCH 2/2] Input: da9055_onkey: convert to use devm_*
From: Dmitry Torokhov @ 2014-08-08 7:42 UTC (permalink / raw)
To: Kiran Padwal
Cc: support.opensource, anthony.olech.opensource, david.chen,
kiran.padwal21, linux-input, linux-kernel
In-Reply-To: <1407482212-17669-1-git-send-email-kiran.padwal@smartplayin.com>
Hi Kiran,
On Fri, Aug 08, 2014 at 12:46:52PM +0530, Kiran Padwal wrote:
> Converting to devm functions can make the code smaller and cleaner.
Unfortunately it also makes it incorrect. As presented this conversion
introduces race on driver removal. Before doing any more devm conversions
please try to spot it or ping me back in a couple of days if you'd like it
explained.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH] Input: cap1106 - allow changing key mapping from userspace
From: Daniel Mack @ 2014-08-08 10:27 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20140808065038.GC8103@core.coreip.homeip.net>
On 08/08/2014 08:50 AM, Dmitry Torokhov wrote:
> On Thu, Aug 07, 2014 at 08:50:24AM +0200, Daniel Mack wrote:
>> Hi Dmitry,
>>
>> On 08/07/2014 08:20 AM, Dmitry Torokhov wrote:
>>> On Sun, Jul 20, 2014 at 06:20:49PM -0700, Dmitry Torokhov wrote:
>>>> Wire up support for EVIOC{G|S}KEYCODE to allow users change key mappings
>>>> from userspace.
>>>>
>>>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>>>> ---
>>>>
>>>> Just compiled, not tested.
>>>
>>> *ping* Any chance you could give it a try? Thanks!
>>
>> Oh, sorry, I didn't realize you're waiting for me on this.
>>
>> Unfortunately, I can't test it myself anymore, as I had to return the
>> board I found this chip on. But as the change looks very straight
>> forward, I'd suggest you just apply that patch and I ask the vendor to
>> give it a quick try. In case of any problems, I'll let you know. Does
>> that sound feasible?
>
> OK, I'll put you down as reviewed-by then so we can share the glory (and the
> blame ;))
Alright, thanks :)
Thanks,
Daniel
^ permalink raw reply
* Re: [PATCH 1/2] Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting
From: Javier Martinez Canillas @ 2014-08-08 13:24 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Tomasz Figa, Nick Dyer, Stephen Warren, Yufeng Shen, Benson Leung,
Doug Anderson, Olof Johansson, linux-input, devicetree,
linux-samsung-soc, linux-kernel
In-Reply-To: <20140807164725.GA22421@core.coreip.homeip.net>
Hello,
On 08/07/2014 06:47 PM, Dmitry Torokhov wrote:
>
> Actually, I take this back. In mainline everything as it should: if
> pdata does not specify particular trigger the flags requested end up
> being IRQF_ONESHOT, which should preserve trigger bits previously set up
> by the board or OF code. In Chrome kernel we have:
>
In theory it should work as Dmitry and Nick said since if no trigger flags are
set then whatever was set before (by OF, platform code, ACPI) should be used.
I also verified what Tomasz mentioned that the IRQ trigger type is parsed and
set correctly by OF:
irq_of_parse_and_map()
irq_create_of_mapping()
irq_set_irq_type()
__irq_set_trigger()
chip->irq_set_type()
exynos_irq_set_type()
But for some reason it doesn't work for me unless I set the trigger type in the
flags passed to request_threaded_irq().
I found that what makes it to work is the logic in __setup_irq() [0] that Nick
pointed out on a previous email:
/* Setup the type (level, edge polarity) if configured: */
if (new->flags & IRQF_TRIGGER_MASK) {
ret = __irq_set_trigger(desc, irq,
new->flags & IRQF_TRIGGER_MASK);
if (ret)
goto out_mask;
}
So __irq_set_trigger() is only executed if the struct irqaction flags has a
trigger flag which makes sense since this shouldn't be necessary with DT due
__irq_set_trigger() being called from irq_create_of_mapping() before when the
"interrupts" property is parsed.
But for some reason it is necessary for me... I checked that struct irq_data
state_use_accessors value is correct and even tried setting that value to
new->flags after the mentioned code block but it makes no difference. Input
events are not reported by evtest and AFAICT interrupts are not being generated.
It works though if the trigger type is passed to request_threaded_irq() like
$subject does or if new->flags are set before the new->flags & IRQF_TRIGGER_MASK
conditional.
For example, with the following changes interrupts are fired correctly:
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 3dc6a61..2d8adbb 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1169,6 +1169,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc,
struct irqaction *new)
init_waitqueue_head(&desc->wait_for_threads);
+ if (!(new->flags & IRQF_TRIGGER_MASK))
+ new->flags |= irqd_get_trigger_type(desc);
+
/* Setup the type (level, edge polarity) if configured: */
if (new->flags & IRQF_TRIGGER_MASK) {
ret = __irq_set_trigger(desc, irq,
Any ideas what could be wrong here?
> /* Default to falling edge if no platform data provided */
> irqflags = data->pdata ? data->pdata->irqflags : IRQF_TRIGGER_FALLING;
> error = request_threaded_irq(client->irq, NULL, mxt_interrupt,
> irqflags | IRQF_ONESHOT,
> client->name, data);
>
Exactly, that's how I found the issue. When I compared both drivers I noticed
that the Chrome OS driver did that and since all the supported platforms are DT
based, the above is equivalent to just IRQF_TRIGGER_FALLING | IRQF_ONESHOT.
So according to my explanation, new->flags & IRQF_TRIGGER_MASK is true so
__irq_set_trigger() is executed and that's why it works with the Chrome OS driver.
In fact the Chrome OS DTS does not set a trigger type in the "interrupts" property:
trackpad@4b {
reg=<0x4b>;
compatible="atmel,atmel_mxt_tp";
interrupts=<1 0>;
interrupt-parent=<&gpx1>;
wakeup-source;
};
> which I believe should go away. If it is needed on ACPI systems we need
> to figure out how to do things we can do with OF there.
>
The above code should not be related to ACPI systems since whatever code that
parses an ACPI table should just call irq_set_irq_type() like is made by OF, so
request_threaded_irq() should just work with ACPI too.
I agree it should go away but first I want to understand why is needed in the
first place. Unfortunately commit:
031f136 ("Input: atmel_mxt_ts - Set default irqflags when there is no pdata")
from the Chrome OS 3.8 does not explain why this is needed, instead of adding
this information in the DTS (e.g: interrupts=<1 IRQ_TYPE_EDGE_FALLING>).
> Thanks.
>
Best regards,
Javier
[0]: http://lxr.free-electrons.com/source/kernel/irq/manage.c#L1172
^ permalink raw reply related
* Re: [RFC RESEND 5/5] Input: evdev - add new EVIOCGABSRANGE ioctl
From: David Herrmann @ 2014-08-08 13:26 UTC (permalink / raw)
To: Peter Hutterer, Benjamin Tissoires
Cc: open list:HID CORE LAYER, Dmitry Torokhov, Dmitry Torokhov
In-Reply-To: <20140806013519.GA11429@jelly.redhat.com>
Hi
On Wed, Aug 6, 2014 at 3:35 AM, Peter Hutterer <peter.hutterer@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 the slotted MT ABS extensions, we didn't take care to
>> make SYN_DROPPED recoverable. Imagine a client recevies a SYN_DROPPED and
>> syncs its current state via EVIOCGABS. It has to call this ioctl for each
>> and every ABS code separately. Besides being horribly slow, this series
>> of ioctl-calls is not atomic. The kernel might queue new ABS events while
>> the client fetches the data.
>>
>> Now for normal ABS codes this is negligible as ABS values provide absolute
>> data. That is, there is usually no need to resync ABS codes as we don't
>> need previous values to interpret the next ABS code. Furthermore, most ABS
>> codes are also sent pretty frequently so a refresh is usually useless.
>>
>> However, with the introduction of slotted ABS axes we added a relative
>> component: ABS_MT_SLOT. If a client syncs all ABS codes via EVIOCGABS
>> while the kernel has ABS-events and an ABS_MT_SLOT event queued, the
>> client will think any read ABS-event is for the retrieved SLOT, however,
>> this is not true as all events until the next ABS_MT_SLOT event are for
>> the previously active slot:
>>
>> Kernel queue is: { ABS_DROPPED,
>
> shouldn't this be SYN_DROPPED?
Whoops, indeed.
>> ABS_MT_POSITION_X(slot: 0),
>> ABS_MT_SLOT(slot: 1),
>> ABS_MT_POSITION_X(slot: 1) }
>> Client reads ABS_DROPPED from queue.
>
> here too
Yep!
>> Client syncs all ABS values:
>> As part of that, client syncs ABS_MT_SLOT, which is 1 in the current
>> view of the kernel.
>> Client reads ABS_MT_POSITION_X and attributes it to slot 1 instead of
>> slot 0, as the slot-value is not explicit.
>>
>> This is just a simple example how the relative information provided by the
>> ABS_MT_SLOT axis can be problematic to clients.
>>
>> Now there are many ways to fix this:
>> * Make ABS_MT_SLOT a per-evdev-client attribute. On each
>> EVIOCGABS(ABS_MT_SLOT) we can add fake ABS_MT_SLOT events to the queue.
>> => Ugly and overkill
>> * Flush all ABS events when clients read ABS_MT_SLOT.
>> => Ugly hack and client might loose important ABS_MT_* events
>> * Provide atomic EVIOCGABS API.
>> => Sounds good!
>>
>> This patch introduces EVIOCGABSRANGE. Unlike EVIOCGABS, this ioctl only
>> fetches ABS values, rather than the whole "struct input_absinfo" set.
>> However, the new ioctl can fetch a range of ABS axes atomically and will
>> flush matching events from the client's receive queue. Moreover, you can
>> fetch all axes for *all* slots with a single call.
>>
>> This way, a client can simply run EVIOCGABSRANGE(0, ABS_CNT) and it will
>> receive a consistent view of the whole ABS state, while the kernel flushes
>> the receive-buffer for a consistent view.
>> While most clients probably only need
>> EVIOCGABSRANGE(ABS_MT_SLOT, ABS_MT_TOOL_y - ABS_MT_SLOT + 1), the ioctl
>> allows to receive an arbitrary range of axes.
>>
>> Signed-off-by: David Herrmann <dh.herrmann@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 b/drivers/input/evdev.c
>> index 6386882..7a25a7a 100644
>> --- a/drivers/input/evdev.c
>> +++ b/drivers/input/evdev.c
>> @@ -175,8 +175,9 @@ static bool __evdev_is_filtered(struct evdev_client *client,
>> return mask && !test_bit(code, mask);
>> }
>>
>> -/* flush queued events of type @type, caller must hold client->buffer_lock */
>> -static void __evdev_flush_queue(struct evdev_client *client, unsigned int type)
>> +/* flush queued, matching events, caller must hold client->buffer_lock */
>> +static void __evdev_flush_queue(struct evdev_client *client, unsigned int type,
>> + unsigned int code_first, unsigned int code_last)
>> {
>> unsigned int i, head, num;
>> unsigned int mask = client->bufsize - 1;
>> @@ -195,7 +196,9 @@ static void __evdev_flush_queue(struct evdev_client *client, unsigned int type)
>> ev = &client->buffer[i];
>> is_report = ev->type == EV_SYN && ev->code == SYN_REPORT;
>>
>> - if (ev->type == type) {
>> + if (ev->type == type &&
>> + ev->code >= code_first &&
>> + ev->code <= code_last) {
>> /* drop matched entry */
>> continue;
>> } else if (is_report && !num) {
>> @@ -786,6 +789,172 @@ static int handle_eviocgbit(struct input_dev *dev,
>> return bits_to_user(bits, len, size, p, compat_mode);
>> }
>>
>> +static inline void free_absrange(s32 **pages, size_t page_cnt)
>> +{
>> + if (page_cnt > 1) {
>> + while (page_cnt > 0) {
>> + if (!pages[--page_cnt])
>> + break;
>> + __free_page(virt_to_page(pages[page_cnt]));
>> + }
>> + kfree(pages);
>> + } else if (page_cnt == 1) {
>> + kfree(pages);
>> + }
>> +}
>> +
>> +static inline s32 *absrange_ptr(s32 **pages, size_t page_cnt, size_t slots,
>> + size_t i_code, size_t j_slot)
>> +{
>> + size_t idx, off;
>> +
>> + idx = (i_code * slots + j_slot) / (PAGE_SIZE / sizeof(s32));
>> + off = (i_code * slots + j_slot) % (PAGE_SIZE / sizeof(s32));
>> +
>> + if (page_cnt == 1)
>> + return &((s32*)pages)[off];
>> + else
>> + return &pages[idx][off];
>> +}
>> +
>> +static inline ssize_t fetch_absrange(struct evdev_client *client,
>> + struct input_dev *dev, size_t start,
>> + size_t count, size_t slots, s32 ***out)
>> +{
>> + size_t size, page_cnt, i, j;
>> + unsigned long flags;
>> + s32 **pages;
>> +
>> + /*
>> + * Fetch data atomically from the device and flush buffers. We need to
>> + * allocate a temporary buffer as copy_to_user() is not allowed while
>> + * holding spinlocks. However, to-be-copied data might be huge and
>> + * high-order allocations should be avoided. Therefore, do the
>> + * page-allocation manually.
>> + */
>> +
>> + BUILD_BUG_ON(PAGE_SIZE % sizeof(s32) != 0);
>> +
>> + size = sizeof(s32) * count * slots;
>> + page_cnt = DIV_ROUND_UP(size, PAGE_SIZE);
>> + if (page_cnt < 1) {
>> + return 0;
>> + } else if (page_cnt == 1) {
>> + pages = kzalloc(size, GFP_TEMPORARY);
>> + if (!pages)
>> + return -ENOMEM;
>> + } else {
>> + pages = kzalloc(sizeof(*pages) * page_cnt, GFP_TEMPORARY);
>> + if (!pages)
>> + return -ENOMEM;
>> +
>> + for (i = 0; i < page_cnt; ++i) {
>> + pages[i] = (void*)get_zeroed_page(GFP_TEMPORARY);
>> + if (!pages[i]) {
>> + free_absrange(pages, page_cnt);
>> + return -ENOMEM;
>> + }
>> + }
>> + }
>> +
>> + spin_lock_irqsave(&dev->event_lock, flags);
>> + spin_lock(&client->buffer_lock);
>> +
>> + for (i = 0; i < count; ++i) {
>> + __u16 code;
>> + bool is_mt;
>> +
>> + code = start + i;
>> + is_mt = input_is_mt_value(code);
>> + if (is_mt && !dev->mt)
>> + continue;
>> +
>> + for (j = 0; j < slots; ++j) {
>> + __s32 v;
>> +
>> + if (is_mt)
>> + v = input_mt_get_value(&dev->mt->slots[j],
>> + code);
>> + else
>> + v = dev->absinfo[code].value;
>> +
>> + *absrange_ptr(pages, page_cnt, slots, i, j) = v;
>> +
>> + if (!is_mt)
>> + break;
>> + }
>> + }
>> +
>> + spin_unlock(&client->buffer_lock);
>> + __evdev_flush_queue(client, EV_ABS, start, start + count - 1);
>> + spin_unlock_irqrestore(&dev->event_lock, flags);
>> +
>> + *out = pages;
>> + return page_cnt;
>> +}
>> +
>> +static int evdev_handle_get_absrange(struct evdev_client *client,
>> + struct input_dev *dev,
>> + struct input_absrange __user *p)
>> +{
>> + size_t slots, code, count, i, j;
>> + struct input_absrange absbuf;
>> + s32 **vals = NULL;
>> + ssize_t val_cnt;
>> + s32 __user *b;
>> + int retval;
>> +
>> + if (!dev->absinfo)
>> + return -EINVAL;
>> + if (copy_from_user(&absbuf, p, sizeof(absbuf)))
>> + return -EFAULT;
>> +
>> + slots = min_t(size_t, dev->mt ? dev->mt->num_slots : 1, absbuf.slots);
>> + code = min_t(size_t, absbuf.code, ABS_CNT);
>> + count = min_t(size_t, absbuf.count, ABS_CNT);
>> +
>> + /* first fetch data atomically from device */
>> +
>> + if (code + count > ABS_CNT)
>> + count = ABS_CNT - code;
>> +
>> + if (!slots || !count) {
>> + val_cnt = 0;
>> + } else {
>> + val_cnt = fetch_absrange(client, dev, code, count,
>> + slots, &vals);
>> + if (val_cnt < 0)
>> + return val_cnt;
>> + }
>> +
>> + /* now copy data to user-space */
>> +
>> + b = (void __user*)(unsigned long)absbuf.buffer;
>> + for (i = 0; i < absbuf.count; ++i) {
>> + for (j = 0; j < absbuf.slots; ++j, ++b) {
>> + s32 v;
>> +
>> + if (i >= count || j >= slots)
>> + v = 0;
>> + else
>> + v = *absrange_ptr(vals, val_cnt, slots, i, j);
>> +
>> + if (put_user(v, b)) {
>> + retval = -EFAULT;
>> + goto out;
>> + }
>> + }
>> + }
>> +
>> + retval = 0;
>> +
>> +out:
>> + free_absrange(vals, val_cnt);
>> + if (retval < 0)
>> + evdev_queue_syn_dropped(client);
>> + return retval;
>> +}
>> +
>> static int evdev_handle_get_keycode(struct input_dev *dev, void __user *p)
>> {
>> struct input_keymap_entry ke = {
>> @@ -889,7 +1058,7 @@ static int evdev_handle_get_val(struct evdev_client *client,
>>
>> spin_unlock(&dev->event_lock);
>>
>> - __evdev_flush_queue(client, type);
>> + __evdev_flush_queue(client, type, 0, UINT_MAX);
>>
>> spin_unlock_irq(&client->buffer_lock);
>>
>> @@ -1006,6 +1175,9 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
>> else
>> return evdev_revoke(evdev, client, file);
>>
>> + case EVIOCGABSRANGE:
>> + return evdev_handle_get_absrange(client, dev, p);
>> +
>> case EVIOCGMASK:
>> if (copy_from_user(&mask, p, sizeof(mask)))
>> return -EFAULT;
>> diff --git a/include/uapi/linux/input.h b/include/uapi/linux/input.h
>> index f6ace0e..9f851d4 100644
>> --- a/include/uapi/linux/input.h
>> +++ b/include/uapi/linux/input.h
>> @@ -32,7 +32,7 @@ struct input_event {
>> * Protocol version.
>> */
>>
>> -#define EV_VERSION 0x010001
>> +#define EV_VERSION 0x010002
>>
>> /*
>> * IOCTLs (0x00 - 0x7f)
>> @@ -210,6 +210,48 @@ struct input_mask {
>> */
>> #define EVIOCSMASK _IOW('E', 0x93, struct input_mask) /* Set event-masks */
>>
>> +struct input_absrange {
>> + __u16 slots;
>> + __u16 code;
>> + __u32 count;
>> + __u64 buffer;
>> +};
>> +
>> +/**
>> + * EVIOCGABSRANGE - Fetch range of ABS values
>> + *
>> + * This fetches the current values of a range of ABS codes atomically. The range
>> + * of codes to fetch and the buffer-types are passed as "struct input_absrange",
>> + * which has the following fields:
>> + * slots: Number of MT slots to fetch data for.
>> + * code: First ABS axis to query.
>> + * count: Number of ABS axes to query starting at @code.
>> + * buffer: Pointer to a receive buffer where to store the fetched ABS
>> + * values. This buffer must be an array of __s32 with at least
>> + * (@slots * @code) elements. The buffer is interpreted as two
>> + * dimensional __s32 array, declared as: __s32[slots][codes]
>
> tbh this seems more complicated than necessary. Have you thought about
> just dumping the events into the client buffer as if they came fresh in from
> the device? So to sync, the client calls the ioctl with a buffer and a
> buffer size, and the kernel simply writes a series of struct input_events
> into that buffer, with ABS_MT_SLOT as required for all slots, (optionally?)
> followed by a SYN_DROPPED. So the buffer afterwards could look like this:
> EV_ABS ABS_X 30
> EV_ABS ABS_X 1202
> EV_ABS ABS_MT_SLOT 0
> EV_ABS ABS_MT_POSITION_X 30
> EV_ABS ABS_MT_POSITION_Y 1202
> EV_ABS ABS_MT_SLOT 1
> EV_ABS ABS_MT_POSITION_X 80
> EV_ABS ABS_MT_POSITION_Y 1800
> EV_SYN SYN_REPORT 0
>
> the client can then go through and just process the events on-by-one as it
> would otherwise with real events.
>
> This approach could be even extended to include EV_KEY, etc. providing a
> single ioctl to sync the whole state of the device atomically.
>
> comments?
So you mean instead of passing a __32 array we pass a "struct
input_event" array and write it there? So bypassing the receive-queue?
That does sound quite nice, indeed. We could replace all the other
"sync" ioctls and just provide a way to receive all the events
directly.
Something like:
EVIOCQUERY(struct input_query)
struct input_query {
__u16 type;
__u16 start_code;
__u16 end_code;
__u16 slots;
struct input_event buffer[];
};
This way, you specify the event type as "type", the start/end code and
the kernel copies the queried events into "buffer". For ABS we need
the extra "slots" variable, so you can query all slots atomically.
I think I will give it a try. I like the generic touch it has.
Btw., I wonder whether it is cheaper to use get_user_pages() on the
receive buffer instead of allocating temporary pages, and then mapping
them temporarily for direct access. Hm... stupid huge buffers..
Thanks
David
^ permalink raw reply
* Re: [PATCH v2 1/1] Input: atmel_mxt_ts - Get IRQ edge/level flags on DT booting
From: Nick Dyer @ 2014-08-08 14:07 UTC (permalink / raw)
To: Javier Martinez Canillas, Dmitry Torokhov
Cc: Stephen Warren, Yufeng Shen, Benson Leung, Doug Anderson,
Olof Johansson, Tomasz Figa, linux-input-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1407397492-17475-1-git-send-email-javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
On 07/08/14 08:44, Javier Martinez Canillas wrote:
> The Atmel maXTouch driver assumed that the IRQ type flags will
> always be passed using platform data but this is not true when
> booting using Device Trees. In these setups the interrupt type
> was ignored by the driver when requesting an IRQ.
>
> This means that it will fail if a machine specified other type
> than IRQ_TYPE_NONE. The right approach is to get the IRQ flags
> that was parsed by OF from the "interrupt" Device Tree propery.
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
I'm happy for this to go in if Dmitry will accept it. It does seem to be a
quirk of some platforms that it is necessary, but it's only one line.
Thanks for spending so much time debugging this.
Signed-off-by: Nick Dyer <nick.dyer-8YpZQSjhsQH10XsdtD+oqA@public.gmane.org>
> ---
>
> This patch was first sent as a part of a two part series along
> with [PATCH 2/2] Input: atmel_mxt_ts - Add keycodes array example.
>
> But there are no dependencies between these two patches so there
> is no need to resend that one with no changes for v2.
>
> Changes since v1:
> - Assign flags to pdata->irqflags in mxt_parse_dt() instead of probe().
> Suggested by Tomasz Figa.
>
> drivers/input/touchscreen/atmel_mxt_ts.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index 03b8571..5c8cbd3 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -22,6 +22,7 @@
> #include <linux/i2c.h>
> #include <linux/i2c/atmel_mxt_ts.h>
> #include <linux/input/mt.h>
> +#include <linux/irq.h>
> #include <linux/interrupt.h>
> #include <linux/of.h>
> #include <linux/slab.h>
> @@ -2093,6 +2094,8 @@ static struct mxt_platform_data *mxt_parse_dt(struct i2c_client *client)
> if (!pdata)
> return ERR_PTR(-ENOMEM);
>
> + pdata->irqflags = irq_get_trigger_type(client->irq);
> +
> if (of_find_property(client->dev.of_node, "linux,gpio-keymap",
> &proplen)) {
> pdata->t19_num_keys = proplen / sizeof(u32);
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ 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