Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: w1: Convert 1-Wire GPIO binding to a schema

Bitbanged 1-Wire buses are supported by Linux thanks to their device
tree binding.

Now that we have the DT validation in place, let's convert the device
tree bindings for that driver over to a YAML schema.

Cc: Daniel Mack <zonque@gmail.com>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210901091852.479202-39-maxime@cerno.tech
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Maxime Ripard and committed by
Rob Herring
dd2c898b e978d527

+44 -27
-27
Documentation/devicetree/bindings/w1/w1-gpio.txt
··· 1 - w1-gpio devicetree bindings 2 - 3 - Required properties: 4 - 5 - - compatible: "w1-gpio" 6 - - gpios: one or two GPIO specs: 7 - - the first one is used as data I/O pin 8 - - the second one is optional. If specified, it is used as 9 - enable pin for an external pin pullup. 10 - 11 - Optional properties: 12 - 13 - - linux,open-drain: if specified, the data pin is considered in 14 - open-drain mode. 15 - 16 - Also refer to the generic w1.txt document. 17 - 18 - Examples: 19 - 20 - onewire { 21 - compatible = "w1-gpio"; 22 - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; 23 - 24 - battery { 25 - // ... 26 - }; 27 - };
+44
Documentation/devicetree/bindings/w1/w1-gpio.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/w1/w1-gpio.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Bitbanged GPIO 1-Wire Bus Device Tree Bindings 8 + 9 + maintainers: 10 + - Daniel Mack <zonque@gmail.com> 11 + 12 + properties: 13 + compatible: 14 + const: w1-gpio 15 + 16 + gpios: 17 + minItems: 1 18 + maxItems: 2 19 + items: 20 + - description: Data I/O pin 21 + - description: Enable pin for an external pull-up resistor 22 + 23 + linux,open-drain: 24 + type: boolean 25 + description: > 26 + If specified, the data pin is considered in open-drain mode. 27 + 28 + required: 29 + - compatible 30 + - gpios 31 + 32 + additionalProperties: 33 + type: object 34 + 35 + examples: 36 + - | 37 + #include <dt-bindings/gpio/gpio.h> 38 + 39 + onewire { 40 + compatible = "w1-gpio"; 41 + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; 42 + }; 43 + 44 + ...