mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 01:06:48 +07:00
3a341a4c30
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>
18 lines
362 B
C
18 lines
362 B
C
#ifndef __ROTARY_ENCODER_H__
|
|
#define __ROTARY_ENCODER_H__
|
|
|
|
struct rotary_encoder_platform_data {
|
|
unsigned int steps;
|
|
unsigned int axis;
|
|
unsigned int gpio_a;
|
|
unsigned int gpio_b;
|
|
unsigned int inverted_a;
|
|
unsigned int inverted_b;
|
|
unsigned int steps_per_period;
|
|
bool relative_axis;
|
|
bool rollover;
|
|
bool wakeup_source;
|
|
};
|
|
|
|
#endif /* __ROTARY_ENCODER_H__ */
|