Thread (8 messages) 8 messages, 4 authors, 2013-10-12

Re: [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation

From: Mark Rutland <mark.rutland@arm.com>
Date: 2013-10-04 13:20:03
Also in: linux-devicetree, lkml

On Fri, Oct 04, 2013 at 01:53:23PM +0100, Ezequiel Garcia wrote:
The driver now supports a new mode to handle the interruptions generated
by the device: on this new mode an input event is generated on each step
(i.e. on each IRQ). Therefore, add a new DT property, to select the
mode: 'rotary-encoder,on-each-step'.

Cc: Daniel Mack <zonque@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Rob Herring <redacted>
Cc: devicetree@vger.kernel.org
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
I'm not at all happy with this DT binding as it's way to customized
for the current driver. For instance, if we want to support mapping
key events (or better arbitrary linux-input event types) it seems
there's no easy way to fix the binding.

Maybe a better way of handling the different 'modes' is through
compatible strings?
I'd prefer not to have more pseudo-devices in DT, and would prefer not
to have compatible strings that boil down to driver options. We end up
just embedding a tonne of Linux-specific driver configuration in the DT
rather than describing hardware.

That said, I'm not sure what the best solution is here.
quoted hunk ↗ jump to hunk
I'm not really sure, so I hope the DT guys have some comment on this.

 Documentation/devicetree/bindings/input/rotary-encoder.txt | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/input/rotary-encoder.txt b/Documentation/devicetree/bindings/input/rotary-encoder.txt
index 3315495..b89e38d 100644
--- a/Documentation/devicetree/bindings/input/rotary-encoder.txt
+++ b/Documentation/devicetree/bindings/input/rotary-encoder.txt
@@ -15,6 +15,7 @@ Optional properties:
 - rotary-encoder,rollover: Automatic rollove when the rotary value becomes
   greater than the specified steps or smaller than 0. For absolute axis only.
 - rotary-encoder,half-period: Makes the driver work on half-period mode.
+- rotary-encoder,on-each-step: Makes the driver send an event on each step.
Could this not be something requested at runtime?

Could you explain what you want to achieve with this? -- what events do
you want to occur when, to be handled in what way?

Cheers,
Mark.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help