mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
dt-bindings: input: samsung,s3c6410-keypad: convert to DT Schema
Convert Samsung SoC Keypad bindings to DT schema with changes: 1. Rename "linux,keypad-no-autorepeat" property to "linux,input-no-autorepeat", because the latter was implemented in the Linux driver. 2. Add clocks and clock-names, already used by DTS and the Linux driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20240312183001.714626-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
committed by
Dmitry Torokhov
parent
2d77f70bb7
commit
0883f1d89d
@@ -0,0 +1,121 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/input/samsung,s3c6410-keypad.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Samsung SoC series Keypad Controller
|
||||
|
||||
description:
|
||||
Samsung SoC Keypad controller is used to interface a SoC with a matrix-type
|
||||
keypad device. The keypad controller supports multiple row and column lines.
|
||||
A key can be placed at each intersection of a unique row and a unique column.
|
||||
The keypad controller can sense a key-press and key-release and report the
|
||||
event using a interrupt to the cpu.
|
||||
|
||||
maintainers:
|
||||
- Krzysztof Kozlowski <krzk@kernel.org>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- samsung,s3c6410-keypad
|
||||
- samsung,s5pv210-keypad
|
||||
|
||||
reg:
|
||||
maxItems: 1
|
||||
|
||||
clocks:
|
||||
maxItems: 1
|
||||
|
||||
clock-names:
|
||||
items:
|
||||
- const: keypad
|
||||
|
||||
interrupts:
|
||||
maxItems: 1
|
||||
|
||||
wakeup-source: true
|
||||
|
||||
linux,input-no-autorepeat:
|
||||
type: boolean
|
||||
description:
|
||||
Do no enable autorepeat feature.
|
||||
|
||||
linux,input-wakeup:
|
||||
type: boolean
|
||||
deprecated: true
|
||||
|
||||
samsung,keypad-num-columns:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Number of column lines connected to the keypad controller.
|
||||
|
||||
samsung,keypad-num-rows:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description:
|
||||
Number of row lines connected to the keypad controller.
|
||||
|
||||
patternProperties:
|
||||
'^key-[0-9a-z]+$':
|
||||
type: object
|
||||
$ref: input.yaml#
|
||||
additionalProperties: false
|
||||
description:
|
||||
Each key connected to the keypad controller is represented as a child
|
||||
node to the keypad controller device node.
|
||||
|
||||
properties:
|
||||
keypad,column:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: The column number to which the key is connected.
|
||||
|
||||
keypad,row:
|
||||
$ref: /schemas/types.yaml#/definitions/uint32
|
||||
description: The row number to which the key is connected.
|
||||
|
||||
linux,code: true
|
||||
|
||||
required:
|
||||
- keypad,column
|
||||
- keypad,row
|
||||
- linux,code
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
- interrupts
|
||||
- samsung,keypad-num-columns
|
||||
- samsung,keypad-num-rows
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/clock/exynos4.h>
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
keypad@100a0000 {
|
||||
compatible = "samsung,s5pv210-keypad";
|
||||
reg = <0x100a0000 0x100>;
|
||||
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clock CLK_KEYIF>;
|
||||
clock-names = "keypad";
|
||||
|
||||
samsung,keypad-num-rows = <2>;
|
||||
samsung,keypad-num-columns = <8>;
|
||||
linux,input-no-autorepeat;
|
||||
wakeup-source;
|
||||
|
||||
key-1 {
|
||||
keypad,row = <0>;
|
||||
keypad,column = <3>;
|
||||
linux,code = <2>;
|
||||
};
|
||||
|
||||
key-2 {
|
||||
keypad,row = <0>;
|
||||
keypad,column = <4>;
|
||||
linux,code = <3>;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user