Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10873149rwl; Mon, 2 Jan 2023 09:31:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRYrnvNt8oylk2/aQ4IpHHCKO5eLzFxBlof/abj1ZtO27k18SICK5iX2LOfJ4ZDMXQRZRj X-Received: by 2002:a17:902:ef8b:b0:186:6ae1:5ee with SMTP id iz11-20020a170902ef8b00b001866ae105eemr43161590plb.26.1672680689323; Mon, 02 Jan 2023 09:31:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672680689; cv=none; d=google.com; s=arc-20160816; b=MruhoHLmZTJu31vVeWkZZwA9WyhLq7/cpX6qhrkH1fZR4QwR4OeV9LJnATo8+QNrAA tZtzEVD9G6ZBJnzhRgNfGe5EM2N2hb0TllYfBCj5MKq303FbWigFRhxKldzoZMWl/d1n huqVNBo3bVPuQR18Srjj5poGvOKJQ4QRXuv8VLtZNvEsp3lMJZW305B/b2kKf0I55UaT i4i0F+WS5T3kJqI8YtBfj96MhjlMLRocUXHNyB0bYmIrolv4tAhRelhLqjW6ZHqLgsxH NGKFrGN2hS5/55fSjDeHyczdyCLPRAkbVpz6xpMjoBx92BGyFNd081KevGgr3sVsITOy xsLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=rH2zXfQtPffUZ6+7uaVyFYCQnGa5F1zxXF+zLzfqe+U=; b=jHj9QZTXD0sJAIr5JQrAYqD67r77iG/Mzg4KpcjTSeyoNvdeIK6KsLNf4jEE0wrRYQ BLoGerME6LZJtIDsSLM4q2GmpdHXAMgtw5h+BI/EqzXQSxY6nS/0pJ/6loHM8UlNcXB7 dtuOrTjLdF/hl0FhDb7QesqHKC0JMdT43OhVGLXQLA6KhWWYO7AQak7bKDGPlr6ca6D0 EdA0JoPpzMLTwFnNLpxAqZiSk1r0Nb/WL78h9GQSyt2/BQ5P5Kc+Wyax2Ac8WXBgLLmw VTuePt7t2ZhTFCLjle+P8K81eKAOiQHSssP8WPvVBG0zULQ4uKQgCFMyFdcqbAUnbHAE kB3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k3-20020a170902d58300b001927aa58c73si20538385plh.203.2023.01.02.09.31.21; Mon, 02 Jan 2023 09:31:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236069AbjABRag (ORCPT + 66 others); Mon, 2 Jan 2023 12:30:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235937AbjABRaL (ORCPT ); Mon, 2 Jan 2023 12:30:11 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45250B7D0 for ; Mon, 2 Jan 2023 09:30:10 -0800 (PST) Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pCOdJ-0003fo-Io; Mon, 02 Jan 2023 18:29:57 +0100 From: Philipp Zabel Date: Mon, 02 Jan 2023 18:29:33 +0100 Subject: [PATCH v2 1/2] dt-bindings: net: Add rfkill-gpio binding MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230102-rfkill-gpio-dt-v2-1-d1b83758c16d@pengutronix.de> References: <20230102-rfkill-gpio-dt-v2-0-d1b83758c16d@pengutronix.de> In-Reply-To: <20230102-rfkill-gpio-dt-v2-0-d1b83758c16d@pengutronix.de> To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Johannes Berg Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, kernel@pengutronix.de, Philipp Zabel X-Mailer: b4 0.11.0-dev-e429b X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Add a device tree binding document for GPIO controlled rfkill switches. The label and radio-type properties correspond to the name and type properties used for ACPI, respectively. The shutdown-gpios property is the same as defined for ACPI. Signed-off-by: Philipp Zabel --- Changes since v1: - Drop quotes from $id and $schema (Krzysztof) - Use generic label property (Rob, Krzysztof) - Rename type property to radio-type (Rob) - Reorder list of radio types alphabetically (Krzysztof) - Drop reset-gpios property (Rob, Krzysztof) - Use generic node name in example (Rob, Krzysztof) --- .../devicetree/bindings/net/rfkill-gpio.yaml | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Documentation/devicetree/bindings/net/rfkill-gpio.yaml b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml new file mode 100644 index 000000000000..9630c8466fac --- /dev/null +++ b/Documentation/devicetree/bindings/net/rfkill-gpio.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/rfkill-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GPIO controlled rfkill switch + +maintainers: + - Johannes Berg + - Philipp Zabel + +properties: + compatible: + const: rfkill-gpio + + label: + description: rfkill switch name, defaults to node name + + radio-type: + description: rfkill radio type + enum: + - bluetooth + - fm + - gps + - nfc + - ultrawideband + - wimax + - wlan + - wwan + + shutdown-gpios: + maxItems: 1 + +required: + - compatible + - radio-type + - shutdown-gpios + +additionalProperties: false + +examples: + - | + #include + + rfkill { + compatible = "rfkill-gpio"; + label = "rfkill-pcie-wlan"; + radio-type = "wlan"; + shutdown-gpios = <&gpio2 25 GPIO_ACTIVE_HIGH>; + }; -- 2.30.2