The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/input/rotary-encoder.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 Rotary encoder DT bindings
    2 
    3 Required properties:
    4 - gpios: a spec for at least two GPIOs to be used, most significant first
    5 
    6 Optional properties:
    7 - linux,axis: the input subsystem axis to map to this rotary encoder.
    8   Defaults to 0 (ABS_X / REL_X)
    9 - rotary-encoder,steps: Number of steps in a full turnaround of the
   10   encoder. Only relevant for absolute axis. Defaults to 24 which is a
   11   typical value for such devices.
   12 - rotary-encoder,relative-axis: register a relative axis rather than an
   13   absolute one. Relative axis will only generate +1/-1 events on the input
   14   device, hence no steps need to be passed.
   15 - rotary-encoder,rollover: Automatic rollover when the rotary value becomes
   16   greater than the specified steps or smaller than 0. For absolute axis only.
   17 - rotary-encoder,steps-per-period: Number of steps (stable states) per period.
   18   The values have the following meaning:
   19   1: Full-period mode (default)
   20   2: Half-period mode
   21   4: Quarter-period mode
   22 - wakeup-source: Boolean, rotary encoder can wake up the system.
   23 - rotary-encoder,encoding: String, the method used to encode steps.
   24   Supported are "gray" (the default and more common) and "binary".
   25 
   26 Deprecated properties:
   27 - rotary-encoder,half-period: Makes the driver work on half-period mode.
   28   This property is deprecated. Instead, a 'steps-per-period ' value should
   29   be used, such as "rotary-encoder,steps-per-period = <2>".
   30 
   31 See Documentation/input/devices/rotary-encoder.rst for more information.
   32 
   33 Example:
   34 
   35                 rotary@0 {
   36                         compatible = "rotary-encoder";
   37                         gpios = <&gpio 19 1>, <&gpio 20 0>; /* GPIO19 is inverted */
   38                         linux,axis = <0>; /* REL_X */
   39                         rotary-encoder,encoding = "gray";
   40                         rotary-encoder,relative-axis;
   41                 };
   42 
   43                 rotary@1 {
   44                         compatible = "rotary-encoder";
   45                         gpios = <&gpio 21 0>, <&gpio 22 0>;
   46                         linux,axis = <1>; /* ABS_Y */
   47                         rotary-encoder,steps = <24>;
   48                         rotary-encoder,encoding = "binary";
   49                         rotary-encoder,rollover;
   50                 };

Cache object: f327fc44bfcc7c74a98b4d41c1ef8f6b


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.