diff options
author | Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> | 2015-10-13 23:39:50 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-10-16 15:32:18 -0700 |
commit | 3a341a4c30d427fd05617087db1564a595f65093 (patch) | |
tree | 84898e187b5128e1e51e9f5ed41114176181b71e /include/linux | |
parent | 648b15cb79e90d80f7b53d0184bdb14132a03754 (diff) | |
download | talos-op-linux-3a341a4c30d427fd05617087db1564a595f65093.tar.gz talos-op-linux-3a341a4c30d427fd05617087db1564a595f65093.zip |
Input: rotary-encoder - add support for quarter-period mode
Some encoders have both outputs low in stable states, others also have
a stable state with both outputs high (half-period mode) and some have
a stable state in all steps (quarter-period mode). The driver used to
support the former states and with this change it can also support the
later.
This commit also deprecates the 'half-period' property and introduces
a new property 'steps-per-period'. This property specifies the
number of steps (stable states) produced by the rotary encoder
for each GPIO period.
Signed-off-by: Guido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/rotary_encoder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h index b33f2d2a708f..fe3dc64e5aeb 100644 --- a/include/linux/rotary_encoder.h +++ b/include/linux/rotary_encoder.h @@ -8,9 +8,9 @@ struct rotary_encoder_platform_data { unsigned int gpio_b; unsigned int inverted_a; unsigned int inverted_b; + unsigned int steps_per_period; bool relative_axis; bool rollover; - bool half_period; bool wakeup_source; }; |