mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 08:46:49 +07:00
6946416164
Add a driver to read group of GPIO lines and provide its status as a numerical value as input event to the system. This will help in interfacing devices, that can be connected over GPIOs, that provide input to the system by driving GPIO lines connected to them like a rotary dial or a switch. For example, a rotary switch can be connected to four GPIO lines. The status of the GPIO lines reflect the actual position of the rotary switch dial. For example, if dial points to 9, then the four GPIO lines connected to the switch will read HLLH(0b'1001 = 9). This value can be reported as an ABS_* event to the input subsystem. Signed-off-by: Vignesh R <vigneshr@ti.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
24 lines
651 B
Plaintext
24 lines
651 B
Plaintext
* GPIO Decoder DT bindings
|
|
|
|
Required Properties:
|
|
- compatible: should be "gpio-decoder"
|
|
- gpios: a spec of gpios (at least two) to be decoded to a number with
|
|
first entry representing the MSB.
|
|
|
|
Optional Properties:
|
|
- decoder-max-value: Maximum possible value that can be reported by
|
|
the gpios.
|
|
- linux,axis: the input subsystem axis to map to (ABS_X/ABS_Y).
|
|
Defaults to 0 (ABS_X).
|
|
|
|
Example:
|
|
gpio-decoder0 {
|
|
compatible = "gpio-decoder";
|
|
gpios = <&pca9536 3 GPIO_ACTIVE_HIGH>,
|
|
<&pca9536 2 GPIO_ACTIVE_HIGH>,
|
|
<&pca9536 1 GPIO_ACTIVE_HIGH>,
|
|
<&pca9536 0 GPIO_ACTIVE_HIGH>;
|
|
linux,axis = <0>; /* ABS_X */
|
|
decoder-max-value = <9>;
|
|
};
|