From patchwork Tue Dec 6 12:44:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edmund Berenson X-Patchwork-Id: 631762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7188DC4708E for ; Tue, 6 Dec 2022 12:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234101AbiLFMwL (ORCPT ); Tue, 6 Dec 2022 07:52:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233978AbiLFMwJ (ORCPT ); Tue, 6 Dec 2022 07:52:09 -0500 X-Greylist: delayed 405 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 06 Dec 2022 04:52:07 PST Received: from mx1.emlix.com (mx1.emlix.com [136.243.223.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A8EAE00D; Tue, 6 Dec 2022 04:52:07 -0800 (PST) Received: from mailer.emlix.com (p5098be52.dip0.t-ipconnect.de [80.152.190.82]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.emlix.com (Postfix) with ESMTPS id 9689D60725; Tue, 6 Dec 2022 13:45:18 +0100 (CET) From: Edmund Berenson Cc: Edmund Berenson , Lukasz Zemla , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: gpio: max7317: add gpio driver bindings Date: Tue, 6 Dec 2022 13:44:55 +0100 Message-Id: <20221206124456.4159-1-edmund.berenson@emlix.com> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add driver bindings for the maxim max7317 spi gpio expander. Co-developed-by: Lukasz Zemla Signed-off-by: Lukasz Zemla Signed-off-by: Edmund Berenson --- .../bindings/gpio/gpio-max7317.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-max7317.yaml diff --git a/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml b/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml new file mode 100644 index 000000000000..88f1fe02a627 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-max7317.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/gpio-max7317.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX7317 SPI-Interfaced I/O Expander + +description: | + Bindings for 10-Port Maxim MAX7317 SPI GPIO expanders. + +properties: + compatible: + const: maxim,max7317 + + reg: + maxItems: 1 + + gpio-controller: true + + '#gpio-cells': + const: 2 + + gpio-line-names: + minItems: 1 + maxItems: 10 + +required: + - compatible + - reg + - gpio-controller + - "#gpio-cells" + +additionalProperties: false + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + gpio5: gpio5@0 { + compatible = "maxim,max7317"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + spi-max-frequency = <100000>; + }; + };