Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp275278rwj; Thu, 22 Dec 2022 02:40:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsPFnemV02G+vGdPCx+kQaBxQZ89YV5zGIC0P4vNYit7sLBRbjW/ZStDQ96viX6jmEkWZ+z X-Received: by 2002:a05:6a20:b91c:b0:af:9dda:b033 with SMTP id fe28-20020a056a20b91c00b000af9ddab033mr5304586pzb.37.1671705642191; Thu, 22 Dec 2022 02:40:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671705642; cv=none; d=google.com; s=arc-20160816; b=0v7MrfXROoxM3zzeuerxwnTCA5/NXYG4xVXrD3SR7HWP12f8VgTf2ZN8WPdLXc04LO xVOFr/YmsNiM6i72XvJU/7pJsd95wrgyZiBiC2ZH99GMTTijGWXH6B4eJh9EYcYYGT3h 533tzcBOTq06GBiBmXpJUJ61zNOvZCf95D8LqBIz1XDfu4sm4iBzk5a+zsBxQqVixpRE Z1N1c6FRLlpxImQMWa2Q4vY4ubIVHsVWMyWl9hoyrpiZEShTDZZd8L4MR/hBKATPhgzG PUq6HFWNyygPciWrYA/+jbanRIaZirjQf6JN3yV7/KgfVg6gO3pLonACjImdZ1lT9ucS sdmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=zlLZ0jGDOJ3rszb9iq8jAp3wIb5IyG9uRY0jiKFoobs=; b=r96LHbdvvy/ZA1YEew1nd/Kd+cv0WlDEJGCSZqeObnsUMwAaL6N4/EuusbAppP+ggF h0WM9+2pEJOY3S6Hz07OOBw2CtVIH5lYmPjINPBsieNWb0/XNzmCYdIjzdiXF4+A5NPU Coo9ysd+oGGt3DjtelsGrK/T2xBDATiraTol9EwanOj3LxoUsyxNzbO4EbWSGVuIlkYO uzl7iRY4vk19Rz/eUV2xei3VS+URQjiLTUUk+ULyMHqI1ArRslU8JKusR4988A/J+IHL /8gz1dJaasK4OZ0RsdfksnqI389q+qXXg5JGgrlJOZgMm1xteB9gHxKcgAOFJSN6IKkJ oePg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K5jqoxof; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x32-20020a056a0018a000b0056bffcfc30csi327719pfh.249.2022.12.22.02.40.15; Thu, 22 Dec 2022 02:40:42 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K5jqoxof; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235337AbiLVKch (ORCPT + 66 others); Thu, 22 Dec 2022 05:32:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235038AbiLVKcf (ORCPT ); Thu, 22 Dec 2022 05:32:35 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D7471EC; Thu, 22 Dec 2022 02:32:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 021D7B81D11; Thu, 22 Dec 2022 10:32:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D02ABC433EF; Thu, 22 Dec 2022 10:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671705151; bh=+O2SMYuiD+a6BrGX3LWSkWDiITMpiTrVROT/YBfj4fY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=K5jqoxofMEb3CCc7H5adb+T0ZyCLaKTOMqW9tKd4XQcwjmOwq96D204V3RWPLbDM9 d5THqWIGsrIiMc1ZDf9OfXKZfLpqROudLURhOHvoZrYdnQmGDsu9ORSVCiOviofSSa 06SYFgbZdrOsYz/V7AMJ/ADhP4ZlHzXd1dbfnFflm4/bySKYjsLKADTp7xaqE+HUHf j7NQj39ICgeXy6wRfaSSqeMGURDon3tvQJzcq19Oi8n3IO6eRlU0Sfa/AU5X5Ycuct /qGr66CFc6ZigHLsP7iSolB+vbu/Ye1Ru6qpgPF5zUPdCNzt5Q7eCA89KIbo5/f0zw 1vygUMCLwoMCA== Message-ID: Date: Thu, 22 Dec 2022 11:32:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 1/2] dt-bindings: net: Add rfkill-gpio binding Content-Language: en-US To: Philipp Zabel , Rob Herring Cc: Johannes Berg , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, kernel@pengutronix.de References: <20221221104803.1693874-1-p.zabel@pengutronix.de> <20221221144505.GA2848091-robh@kernel.org> <432ed015f4ba99d6bddd0a10af72324fea1388da.camel@pengutronix.de> From: Krzysztof Kozlowski In-Reply-To: <432ed015f4ba99d6bddd0a10af72324fea1388da.camel@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On 21/12/2022 16:36, Philipp Zabel wrote: >>> + $ref: /schemas/types.yaml#/definitions/string >>> + description: rfkill switch name, defaults to node name >>> + >>> + type: >> >> Too generic. Property names should ideally have 1 type globally. I think >> 'type' is already in use. 'radio-type' instead? > > These values correspond to the 'enum rfkill_type' in Linux UAPI, but I > think in this context 'radio-type' would be better than 'rfkill-type'. Do not map Linux driver to DT, but rather describe the actual hardware. > >>> + description: rfkill radio type >>> + enum: >>> + - wlan >>> + - bluetooth >>> + - ultrawideband >>> + - wimax >>> + - wwan >>> + - gps >>> + - fm >>> + - nfc >>> + >>> + shutdown-gpios: >>> + maxItems: 1 >>> + >>> + reset-gpios: >>> + maxItems: 1 >> >> I'm lost as to why there are 2 GPIOs. > > I don't know either.  My assumption is that this is for devices that > are radio silenced by just asserting their reset pin (for example GPS > chips). The driver handles them the same. > > I could remove reset-gpios and make shutdown-gpios required. > >>> + >>> +required: >>> + - compatible >>> + - type >>> + >>> +oneOf: >>> + - required: >>> + - shutdown-gpios >>> + - required: >>> + - reset-gpios >> >> But only 1 can be present? So just define 1 GPIO name. > > The intent was that only one of them would be required. > >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + #include >>> + >>> + rfkill-pcie-wlan { >> >> Node names should be generic. > > What could be a generic name for this - is "rfkill" acceptable even > though it is a Linux subsystem name? Or would "rf-kill-switch" be > better? rfkill > > How should they be called if there are multiple of them? The same as in all other cases (leds, gpios, regulators), so rfkill-1, rfkill-2... Best regards, Krzysztof