Documentation/devicetree/bindings/input/gpio-charlieplex-keypad.yaml
Source file repositories/reference/linux-study-clean/Documentation/devicetree/bindings/input/gpio-charlieplex-keypad.yaml
File Facts
- System
- Linux kernel
- Corpus path
Documentation/devicetree/bindings/input/gpio-charlieplex-keypad.yaml- Extension
.yaml- Size
- 3463 bytes
- Lines
- 109
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: configuration, schema, or hardware description
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
dt-bindings/gpio/gpio.hdt-bindings/input/input.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/gpio-charlieplex-keypad.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO charlieplex keypad
maintainers:
- Hugo Villeneuve <hvilleneuve@dimonoff.com>
description: |
The charlieplex keypad supports N^2)-N different key combinations (where N is
the number of I/O lines). Key presses and releases are detected by configuring
only one line as output at a time, and reading other line states. This process
is repeated for each line. Diodes are required to ensure current flows in only
one direction between any pair of pins, as well as pull-up or pull-down
resistors on all I/O lines.
This mechanism doesn't allow to detect simultaneous key presses.
Wiring example for 3 lines keyboard with 6 switches and 3 diodes (pull-up/down
resistors not shown but needed on L0, L1 and L2):
L0 --+---------------------+----------------------+
| | |
L1 -------+-----------+---------------------+ |
| | | | | |
L2 -------------+----------------+-----+ | |
| | | | | | | | |
| | | | | | | | |
| S1 \ S2 \ | S3 \ S4 \ | S5 \ S6 \
| | | | | | | | |
| +--+--+ | +--+--+ | +--+--+
| | | | | |
| D1 v | D2 v | D3 v
| - (k) | - (k) | - (k)
| | | | | |
+-------+ +-------+ +-------+
L: GPIO line
S: switch
D: diode (k indicates cathode)
allOf:
- $ref: input.yaml#
- $ref: /schemas/input/matrix-keymap.yaml#
properties:
compatible:
const: gpio-charlieplex-keypad
autorepeat: true
debounce-delay-ms:
default: 5
line-gpios:
description:
List of GPIOs used as lines. The gpio specifier for this property
depends on the gpio controller to which these lines are connected.
linux,keymap: true
poll-interval: true
settling-time-us: true
wakeup-source: true
Annotation
- Immediate include surface: `dt-bindings/gpio/gpio.h`, `dt-bindings/input/input.h`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.