* [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation [not found] ` <1380891203-17617-1-git-send-email-ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org> @ 2013-10-04 12:53 ` Ezequiel Garcia 2013-10-04 13:19 ` Mark Rutland 0 siblings, 1 reply; 4+ messages in thread From: Ezequiel Garcia @ 2013-10-04 12:53 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-input-u79uwXL29TY76Z2rM5mHXA Cc: Ezequiel Garcia, Daniel Mack, Dmitry Torokhov, Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: Dmitry Torokhov <dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Ezequiel Garcia <ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org> --- 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'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. See Documentation/input/rotary-encoder.txt for more information. -- 1.8.1.5 -- 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 related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation 2013-10-04 12:53 ` [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation Ezequiel Garcia @ 2013-10-04 13:19 ` Mark Rutland 2013-10-04 14:09 ` Ezequiel Garcia 0 siblings, 1 reply; 4+ messages in thread From: Mark Rutland @ 2013-10-04 13:19 UTC (permalink / raw) To: Ezequiel Garcia Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Daniel Mack, Dmitry Torokhov, rob.herring@calxeda.com, devicetree@vger.kernel.org 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 <rob.herring@calxeda.com> > 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. > > 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. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation 2013-10-04 13:19 ` Mark Rutland @ 2013-10-04 14:09 ` Ezequiel Garcia 2013-10-10 13:55 ` Ezequiel García 0 siblings, 1 reply; 4+ messages in thread From: Ezequiel Garcia @ 2013-10-04 14:09 UTC (permalink / raw) To: Mark Rutland Cc: Ezequiel Garcia, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Daniel Mack, Dmitry Torokhov, rob.herring@calxeda.com, devicetree On Fri, Oct 04, 2013 at 02:19:56PM +0100, Mark Rutland wrote: > 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 <rob.herring@calxeda.com> > > 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. > > > > > 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? > Sure. The different modes: * default (no option) * rotary-encoder,half-period * rotary-encoder,on-each-step Just map to different interruption handlers. I don't have any other rotary-encoder device, so I'm not at all sure what's the use of the other two cases. My particular device is detented, and produces a 'stable' event on each step (i.e on each IRQ). Regarding the runtime specification: you mean as a module parameter? That should be trivial to add, no? > Could you explain what you want to achieve with this? -- what events do > you want to occur when, to be handled in what way? > Hm.. maybe I should have added the binding to the 1/2 patch and CCed everybody involved for better context. Anyway, I hope the above is clearer, I'm not really sure how to specify the details in the DT binding, since it's a specific interruption handler for this class of encoder devices (stable on each step). That said, I really hope I'm crafting a generic solution and not some tailor-made implementation that just happens to match my use case. The input maintainer's opinion on this would be valuable. -- Ezequiel García, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation 2013-10-04 14:09 ` Ezequiel Garcia @ 2013-10-10 13:55 ` Ezequiel García 0 siblings, 0 replies; 4+ messages in thread From: Ezequiel García @ 2013-10-10 13:55 UTC (permalink / raw) To: linux-input, devicetree Cc: Mark Rutland, linux-kernel@vger.kernel.org, Daniel Mack, Dmitry Torokhov, rob.herring@calxeda.com On 4 October 2013 11:09, Ezequiel Garcia <ezequiel.garcia@free-electrons.com> wrote: > On Fri, Oct 04, 2013 at 02:19:56PM +0100, Mark Rutland wrote: >> 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 <rob.herring@calxeda.com> >> > 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. >> >> > >> > 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? >> > > Sure. The different modes: > > * default (no option) > * rotary-encoder,half-period > * rotary-encoder,on-each-step > > Just map to different interruption handlers. I don't have any other > rotary-encoder device, so I'm not at all sure what's the use of the > other two cases. > My particular device is detented, and produces a 'stable' event on each > step (i.e on each IRQ). > > Regarding the runtime specification: you mean as a module parameter? > That should be trivial to add, no? > >> Could you explain what you want to achieve with this? -- what events do >> you want to occur when, to be handled in what way? >> > > Hm.. maybe I should have added the binding to the 1/2 patch and CCed > everybody involved for better context. > > Anyway, I hope the above is clearer, I'm not really sure how to specify > the details in the DT binding, since it's a specific interruption handler > for this class of encoder devices (stable on each step). > > That said, I really hope I'm crafting a generic solution and not some > tailor-made implementation that just happens to match my use case. > > The input maintainer's opinion on this would be valuable. Any insights on this binding? If nobody objects, then I'd like to get this change accepted, together with the driver change. Thanks! -- Ezequiel García, VanguardiaSur www.vanguardiasur.com.ar -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-10 13:55 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1380891203-17617-1-git-send-email-ezequiel@vanguardiasur.com.ar> [not found] ` <1380891203-17617-1-git-send-email-ezequiel-30ULvvUtt6G51wMPkGsGjgyUoB5FGQPZ@public.gmane.org> 2013-10-04 12:53 ` [PATCH v2 2/2] input: rotary-encoder: Add 'on-each-step' to binding documentation Ezequiel Garcia 2013-10-04 13:19 ` Mark Rutland 2013-10-04 14:09 ` Ezequiel Garcia 2013-10-10 13:55 ` Ezequiel García
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).