Skip to contentSkip to conversation

Documentation: input - define INPUT_PROP_ACCELEROMETER behavior

PATCH In review Peter Hutterer 4 participants 4 messages Mar 27, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: input - define INPUT_PROP_ACCELEROMETER behavior

Spell out what this property means to userspace. If the property is set, all directional axes must be accelerometer axes, any other axes are left as-is. This allows an accelerometer device to e.g. have an ABS_WHEEL.

It is not permitted to mix normal directional axes and accelerometer axes on the same device node.

---
I think this is the most sensible definition of what to expect when this property is set on a device.

 Documentation/input/event-codes.txt | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/input/event-codes.txt +6 -0
index 9d13600..1756b97 100644
@@ -294,6 +294,12 @@ accordingly. This property does not affect kernel behavior.
 The kernel does not provide button emulation for such devices but treats
 them as any other INPUT_PROP_BUTTONPAD device.
 
+INPUT_PROP_ACCELEROMETER
+-------------------------
+Directional axes on this device (absolute and/or relative x, y, z) represent
+accelerometer data. All other axes retain their meaning. A device must not mix
+regular directional axes and accelerometer axes on the same event node.
+
 Guidelines:
 ==========
 The guidelines below ensure proper single-touch and multi-finger functionality.
Signature · 1 line
2.3.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Peter Hutterer

Spell out what this property means to userspace. If the property is set, all directional axes must be accelerometer axes, any other axes are left as-is. This allows an accelerometer device to e.g. have an ABS_WHEEL.

It is not permitted to mix normal directional axes and accelerometer axes on the same device node.

---
I think this is the most sensible definition of what to expect when this property is set on a device.

First, I am quilty here. I've let INPUT_PROP_ACCELEROMETER slip through my tree without Dmitry's Ack, which is what I normally require for everything touching input.h. Mea culpa maxima, I missed it, sorry for that.

This makes sense to me though. So

but let's see what Dmitry has to say.

Good thing is that this went only into 4.0-rc1, so if the whole INPUT_PROP_ACCELEROMETER turns out to be absolute no-go for some reason, we can still revert it.

Thanks, and sorry again.

Quoted 23 lines
 Documentation/input/event-codes.txt | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/input/event-codes.txt +6 -0
index 9d13600..1756b97 100644
@@ -294,6 +294,12 @@ accordingly. This property does not affect kernel behavior.
 The kernel does not provide button emulation for such devices but treats
 them as any other INPUT_PROP_BUTTONPAD device.
 
+INPUT_PROP_ACCELEROMETER
+-------------------------
+Directional axes on this device (absolute and/or relative x, y, z) represent
+accelerometer data. All other axes retain their meaning. A device must not mix
+regular directional axes and accelerometer axes on the same event node.
+
 Guidelines:
 ==========
 The guidelines below ensure proper single-touch and multi-finger functionality.
Signature · 1 line
2.3.3
Signature · 2 lines
Jiri Kosina
SUSE Labs
Reviewed-by on v1 1/1
#3 lore raw
In reply to Peter Hutterer
Quoted 11 lines · Peter Hutterer

Spell out what this property means to userspace. If the property is set, all
directional axes must be accelerometer axes, any other axes are left as-is.
This allows an accelerometer device to e.g. have an ABS_WHEEL.

It is not permitted to mix normal directional axes and accelerometer axes on
the same device node.

Looks good.

maintainer
#2 lore raw
In reply to Jiri Kosina
Quoted 20 lines · Jiri Kosina
Quoted 11 lines · Peter Hutterer

Spell out what this property means to userspace. If the property is set, all directional axes must be accelerometer axes, any other axes are left as-is. This allows an accelerometer device to e.g. have an ABS_WHEEL.

It is not permitted to mix normal directional axes and accelerometer axes on the same device node.

---
I think this is the most sensible definition of what to expect when this property is set on a device.

First, I am quilty here. I've let INPUT_PROP_ACCELEROMETER slip through my tree without Dmitry's Ack, which is what I normally require for everything touching input.h. Mea culpa maxima, I missed it, sorry for that.

This makes sense to me though. So

Quoted 7 lines

but let's see what Dmitry has to say.

Good thing is that this went only into 4.0-rc1, so if the whole INPUT_PROP_ACCELEROMETER turns out to be absolute no-go for some reason, we can still revert it.

No, I think that's fine. In the past I was hesitant of defining device types, but at least for accelerometers, given that we state that we will not be mixing them with regular directional axes, that should be fine.

I will apply this.

Thanks.

Signature · 1 line
Dmitry