mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 13:52:50 +01:00
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 <[email protected]> Cc: Evgeniy Polyakov <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]>
This commit is contained in:
1 parent
e978d5271f
commit
dd2c898bc2
2 files changed
+44
-27
No files matched your search
@@ -1,27 +0,0 @@
|
||||
w1-gpio devicetree bindings
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: "w1-gpio"
|
||||
- gpios: one or two GPIO specs:
|
||||
- the first one is used as data I/O pin
|
||||
- the second one is optional. If specified, it is used as
|
||||
enable pin for an external pin pullup.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- linux,open-drain: if specified, the data pin is considered in
|
||||
open-drain mode.
|
||||
|
||||
Also refer to the generic w1.txt document.
|
||||
|
||||
Examples:
|
||||
|
||||
onewire {
|
||||
compatible = "w1-gpio";
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
|
||||
battery {
|
||||
// ...
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/w1/w1-gpio.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Bitbanged GPIO 1-Wire Bus Device Tree Bindings
|
||||
|
||||
maintainers:
|
||||
- Daniel Mack <[email protected]>
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: w1-gpio
|
||||
|
||||
gpios:
|
||||
minItems: 1
|
||||
maxItems: 2
|
||||
items:
|
||||
- description: Data I/O pin
|
||||
- description: Enable pin for an external pull-up resistor
|
||||
|
||||
linux,open-drain:
|
||||
type: boolean
|
||||
description: >
|
||||
If specified, the data pin is considered in open-drain mode.
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- gpios
|
||||
|
||||
additionalProperties:
|
||||
type: object
|
||||
|
||||
examples:
|
||||
- |
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
onewire {
|
||||
compatible = "w1-gpio";
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
...
|
||||
Reference in new issue
Block a user