dt-bindings: trigger-source: add generic GPIO trigger source

Inspired by pwm-trigger, create a new binding for using a GPIO
line as a trigger source.

Link: https://lore.kernel.org/linux-iio/20250207-dlech-mainline-spi-engine-offload-2-v8-3-e48a489be48c@baylibre.com/
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Link: https://patch.msgid.link/c4a3a7c828c711b439d1893271b8376823176ea6.1749569957.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Jonathan Santos
2025-06-11 08:49:49 -03:00
committed by Jonathan Cameron
parent a8daa0a8f1
commit 0dd88eaa71
2 changed files with 42 additions and 1 deletions

View File

@@ -0,0 +1,40 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/trigger-source/gpio-trigger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic trigger source using GPIO
description: A GPIO used as a trigger source.
maintainers:
- Jonathan Santos <Jonathan.Santos@analog.com>
properties:
compatible:
const: gpio-trigger
'#trigger-source-cells':
const: 0
gpios:
maxItems: 1
description: GPIO to be used as a trigger source.
required:
- compatible
- '#trigger-source-cells'
- gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
trigger {
compatible = "gpio-trigger";
#trigger-source-cells = <0>;
gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
};

View File

@@ -25203,9 +25203,10 @@ W: https://github.com/srcres258/linux-doc
T: git git://github.com/srcres258/linux-doc.git doc-zh-tw
F: Documentation/translations/zh_TW/
TRIGGER SOURCE - PWM
TRIGGER SOURCE
M: David Lechner <dlechner@baylibre.com>
S: Maintained
F: Documentation/devicetree/bindings/trigger-source/gpio-trigger.yaml
F: Documentation/devicetree/bindings/trigger-source/pwm-trigger.yaml
TRUSTED SECURITY MODULE (TSM) INFRASTRUCTURE