summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/input/adafruit,seesaw-gamepad.yaml
blob: 5e86f6de69784c410dd4ad8798e9fd8b7afe6123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/adafruit,seesaw-gamepad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Adafruit Mini I2C Gamepad with seesaw

maintainers:
  - Anshul Dalal <anshulusr@gmail.com>

description: |
  Adafruit Mini I2C Gamepad

    +-----------------------------+
    |   ___                       |
    |  /   \               (X)    |
    | |  S  |  __   __  (Y)   (A) |
    |  \___/  |ST| |SE|    (B)    |
    |                             |
    +-----------------------------+

  S -> 10-bit precision bidirectional analog joystick
  ST -> Start
  SE -> Select
  X, A, B, Y -> Digital action buttons

  Datasheet: https://cdn-learn.adafruit.com/downloads/pdf/gamepad-qt.pdf
  Product page: https://www.adafruit.com/product/5743
  Arduino Driver: https://github.com/adafruit/Adafruit_Seesaw

properties:
  compatible:
    const: adafruit,seesaw-gamepad

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1
    description:
      The gamepad's IRQ pin triggers a rising edge if interrupts are enabled.

required:
  - compatible
  - reg

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        joystick@50 {
            compatible = "adafruit,seesaw-gamepad";
            interrupts = <18 IRQ_TYPE_EDGE_RISING>;
            reg = <0x50>;
        };
    };