From patchwork Thu Mar 25 16:47:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408839 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700112jai; Thu, 25 Mar 2021 09:48:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1rXYVtbIr7/xl33NXVemd7E0n1osBRo2ZcbF9Wnpb08PCFq7cGLuTT7+ICkiyJPzNAIyw X-Received: by 2002:a50:ee10:: with SMTP id g16mr9699182eds.215.1616690905541; Thu, 25 Mar 2021 09:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690905; cv=none; d=google.com; s=arc-20160816; b=sglHudJxZs1qFhXOWxgFoERiSKLhiciNGkmQjDtrZ1TBZWufZTV9V29gvgouhR9z4q IeEBc1OMyHLHQ9WovvFJ1zcw9TLf5XGohCOX0F3uu84d6dCVVv5J1QiJqYrHI0a29WwK dxXPLsn597fYTL27YhRGhu6dcFs+DlJsImXhz0otdcqt/5O8li0alHor29Rlj7b7VIjz h3vzaYXyKDqAR2pCiQMEJbUOto8Q17fG7A4Y88IkrQJvSA6yZ4/Zf296/IsGK6DRI5Rg YchAwCBEGsNrDfIPolsbLrVRZe5E6jVXRd5U35UJKD66CDR5bG3w5QG8UzrGT2aJrfeP HJhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bFFWeBhKbBRq7bfBXvZhpXaSQSynL7MnfXgS4NCGGZQ=; b=fn7K7FlL3PJALEEuiaCXXgzeAWNsex37WGvTaOwTUlwjLGlJbiF0qYV+zWyj7GqTmp 0yFzaQ4iLNP79cl3xm84N/0HIKMchiUfNvYoA2X/Vig6w3gBpF5nb+e1SIzGoIVGmJ60 nPwQM5AxZ7naNHoz/NNXpUvLmkttkS0XIxMig7MYB0LgxGJeK0kQU2NkZ7YevayI77gX l1/4scYaAAN0uKmCNLttpbG1ZW02CcmBKNql6TVmGv2+5rWIFX6atjAxBEIF+FCvV3tB 5x+ZixdZG4ZeP5Ci0sLbhnUh/54yQ2UyQk+/o8AogFwlPy8x4haQQIcztxlWT1J+4klN plLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.25; Thu, 25 Mar 2021 09:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229919AbhCYQrw (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:52 -0400 Received: from mail-io1-f48.google.com ([209.85.166.48]:35707 "EHLO mail-io1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbhCYQr0 (ORCPT ); Thu, 25 Mar 2021 12:47:26 -0400 Received: by mail-io1-f48.google.com with SMTP id x17so2570433iog.2; Thu, 25 Mar 2021 09:47:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bFFWeBhKbBRq7bfBXvZhpXaSQSynL7MnfXgS4NCGGZQ=; b=VWHcZ/Z/398Mn+/3IQ8j6qHX4qZRHMlwZEBQ5hOcajQWXrzwM+QVuGlle2Dm9voamL ByRAEebexzMgu2tp0wSmi+V34iPrE8ahTvSvJw7p0vVLHzCAuULJHF5uHAIqNt0iQ9MZ JEr9sP2oJ6hgRN5hBdwgJxz9B5qQtyo4BztV5XTmfNxV5fwKQfnvLsHKM4b7mYz6q98T 7JgYaeEIj13ajwYj5pq1rXZOvCUiGdjtg+swkFLPfhBxKMieO2JbhdvsfTRO7nvKC2OE yk6wleYBAR5xMnqa6AgvBrsVvdB6sHZpQ9VYytyXh6UmKDT+zu/uamSy7k5507VvWDfR aeqQ== X-Gm-Message-State: AOAM531KzIrdaYumPgvLtVeqvROVsjEcWxoxG54D7p63Ect0sMlCmu4U d4C/74ausvJ+I1jvyULKksmxbsnzmg== X-Received: by 2002:a6b:7f4d:: with SMTP id m13mr7072312ioq.134.1616690845065; Thu, 25 Mar 2021 09:47:25 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:24 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 1/8] dt-bindings: Fix reference in submitting-patches.rst to the DT ABI doc Date: Thu, 25 Mar 2021 10:47:06 -0600 Message-Id: <20210325164713.1296407-2-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org submitting-patches.rst has a stale reference to ABI.txt. Fix this with a proper rSt link. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/submitting-patches.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/Documentation/devicetree/bindings/submitting-patches.rst b/Documentation/devicetree/bindings/submitting-patches.rst index 68129ff09967..42e86f978be2 100644 --- a/Documentation/devicetree/bindings/submitting-patches.rst +++ b/Documentation/devicetree/bindings/submitting-patches.rst @@ -84,7 +84,7 @@ II. For kernel maintainers III. Notes ========== - 0) Please see ...bindings/ABI.txt for details regarding devicetree ABI. + 0) Please see :doc:`ABI` for details regarding devicetree ABI. 1) This document is intended as a general familiarization with the process as decided at the 2013 Kernel Summit. When in doubt, the current word of the From patchwork Thu Mar 25 16:47:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408841 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700128jai; Thu, 25 Mar 2021 09:48:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyExfEn5fwhtAi/afwb/o+5mQgyx2pDRud62A+ORlkE135SCrwBY0goWVwNt0jy9pKRuCZD X-Received: by 2002:a17:906:26d4:: with SMTP id u20mr5523157ejc.114.1616690907027; Thu, 25 Mar 2021 09:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690907; cv=none; d=google.com; s=arc-20160816; b=I5S/ms/YEb1O4xANGp5r2hxubJquwQjg5cpkufqPIIR0T3KuDyO89M5+0bNJ9urXHP gSgO9qfGD0p3gXl1Q+wWNyx99kOM0WT28GYNBzPtfa+Gz5tXIP3lzUQbaAYdsmf+hrxG CSo4Tm14+4CaxBq8fwj4m++cQIvxCLgS7F08in3sFPAMZ01YpHTc9rJnEBDle2EwUfCp Ftu5Vj9nsvDFS4MHOfArwYJi4RiD7jJR9sexySXDXfk4AwhVKNkqjloS5T5YOoFf5NWS 9ow39M33Qmkuxe9DaREo3t2KxMdrXb96lEzqvNe60RAXfj54t38NLxOLPxofc0fwOT/m FAAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HVnVN03MoHYDxmuTNrFMILoKYIQFoiOcDb3ed6T1M/A=; b=M1UyJuWg4VXs4K8psZuEpNHIr+1ERB+xy+c+OIYSgHTywRfksg4A6m9UHSrcjOhPBM LATgyOx1HXfrGjHPribwJagKyVin44Tix1XXJmrjCCMzukuoOGc2Z21UyczCQdyRVE/3 2Mz8mKedxkaE8Cbofzo1eYZZPvTqO34OTYTk0LnGdqCxE2KJoBg4GIAVl2ukxLRPIBrC 4NaraFo60w4sD4CkE/6rcn9PaLjTQHDmogguZymOrC5sW3P+ra74PxtQ0GFN6hyHyo22 TgWao9FveYFVIF+/i6SCkyPjdvy1jHAOTqqZ7TbWYw6tr9jB2dQdC8KyhCoTgfKxYAhb bVlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.26; Thu, 25 Mar 2021 09:48:27 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229940AbhCYQrw (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:52 -0400 Received: from mail-il1-f181.google.com ([209.85.166.181]:37832 "EHLO mail-il1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbhCYQr3 (ORCPT ); Thu, 25 Mar 2021 12:47:29 -0400 Received: by mail-il1-f181.google.com with SMTP id z9so2678190ilb.4; Thu, 25 Mar 2021 09:47:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HVnVN03MoHYDxmuTNrFMILoKYIQFoiOcDb3ed6T1M/A=; b=t6Axj6Ce5ZYisFhzb/BDCcsyXnQ9M/nrxIS53G0Klw4/S99ETvIed5NZkdxYKZfGsw WO/OobNUiUOXoRGdORslbUNnP4X2WTfypTs6dSk8lUxw8LjBXAF59msS+LbkPy4GHPvH s+mlYSwPqTgiZFvTjht8ubbwTNNXD1c4DW1T+Z2yLwn/191hXWDNZ+LQvESgfZElqNc0 zoxRESFFzpuQffiSG4vC+R3HWf+WawpIq5eYoQLJYe5K5+uVCSJ9/MvWeZBD8Llu40jf 0AbtwdpwywrLFGFw+Dsqh5flPFRa0aBw24sUNBYuIGwk6cyJIUtsDieMOSa/p8Sk2ybt thJA== X-Gm-Message-State: AOAM530c9+ifYI5KI5UsUpxS2agzhBIe5O0zHEuNtlNO4aUVDYrkYx+3 JtdqJ6i9k4u2hxkiEE1NwiSHIiM5Lw== X-Received: by 2002:a05:6e02:925:: with SMTP id o5mr2552083ilt.307.1616690848259; Thu, 25 Mar 2021 09:47:28 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:26 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 2/8] docs: dt: writing-schema: Remove spurious indentation Date: Thu, 25 Mar 2021 10:47:07 -0600 Message-Id: <20210325164713.1296407-3-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 'allOf' and 'properties' have a leading space which causes them to be indented in the doc output. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Documentation/devicetree/writing-schema.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst index 16f21e182ff6..03e279d8fd6a 100644 --- a/Documentation/devicetree/writing-schema.rst +++ b/Documentation/devicetree/writing-schema.rst @@ -46,12 +46,12 @@ select schema. By default without 'select', nodes are matched against their possible compatible string values or node name. Most bindings should not need select. - allOf +allOf Optional. A list of other schemas to include. This is used to include other schemas the binding conforms to. This may be schemas for a particular class of devices such as I2C or SPI controllers. - properties +properties A set of sub-schema defining all the DT properties for the binding. The exact schema syntax depends on whether properties are known, common properties (e.g. 'interrupts') or are binding/vendor specific properties. From patchwork Thu Mar 25 16:47:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408842 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700135jai; Thu, 25 Mar 2021 09:48:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQP70DhMK4cjQnFiT+HDFW57zgTJTB5LirGTvEke5j0Q7D0CDYwb9GLwJxEZUtdFFEPOr0 X-Received: by 2002:a17:906:6c4:: with SMTP id v4mr10297582ejb.198.1616690907910; Thu, 25 Mar 2021 09:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690907; cv=none; d=google.com; s=arc-20160816; b=D7bsmAeWEPZd8yB54CCPAgsJfSzksLfAI+8Sel+XQFtkq9xMKM+uzaM94ziqJA9cJ+ sgMlFDTO+zD3ttQvabDKC8cpR3SxVZ7Aba8l9IumWBRgp52+u8gsFnGAbJMvgMwEE0Wv 6OHWY2OMQOwda1/kqxxu8MEk4S7WRO2OI04H5nrIA5/wqlpqn9GsntshTD9sGq7grwIx /BeW4RHGbT/g7jSQjNUbGTKeOtbYQJzlzV4OHUD/HadRytFwhMcKuiA8mEmbRO+h0EpO /k/IdBnz5/Bq2mDC8T0C8Ed5bXp5flAvmDVKaV+dAbUv9h9BLAMwi1PTYuet8AGpOwEo bbnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WsN7Xqa0H0sw8FyvyboT6y25R/zqs9xa7Bq93vO2pFM=; b=eDxkdc4m29FjqsOpLBQGipYwYDj7oRpPFJKLRAc5AJhtOLbUvRIExUl65TS7SdQ7hL 1QrM413qJydYP1Lao3TkzNrE5F4ObVpr8Xn6qQpHGUoXwTZx8NSSLKo6G+yi6Tjd24/5 97qvSm+Sy8ilgeVf04nJzH4TlejZFKT3tBGyOh8l9oSysAFfE/UWM140Vjk2K4B7wsbm 71RTSvuJ0rDo2rnHish+ByVEm/7jR3VcXXK5V9fkdWVsPaG1G3KwMRXFb0CjWaqmL59W qI34Gmb5SH0jQnhaQXud/mPXEs5bOYMg6yJBVUznMbJAgno01aVqVmxc5cs/OkT3sgOd ULyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.27; Thu, 25 Mar 2021 09:48:27 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229946AbhCYQrx (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:53 -0400 Received: from mail-il1-f182.google.com ([209.85.166.182]:33466 "EHLO mail-il1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229812AbhCYQrc (ORCPT ); Thu, 25 Mar 2021 12:47:32 -0400 Received: by mail-il1-f182.google.com with SMTP id u10so2733854ilb.0; Thu, 25 Mar 2021 09:47:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WsN7Xqa0H0sw8FyvyboT6y25R/zqs9xa7Bq93vO2pFM=; b=m0vchpT8M6/4ID1oOxKCSRruHlMfar9Y2E7b1sE7HUoO5B+7MnfeTjRoFpzn0rfS56 4z8wG4pa3YJaXm3jKzKyTeBH6hUWQYv7jvVNS0xrtSBkCjz3u6Am9GSG02fxbpc6OivD xCWM4YGJglV+cRyizqNxr5gCMSH0CFCcKUwRVqLZF0jv6Kz+9BUIptfnweN+aRZLCA71 KdGJhesIrQYSc6qIR5AoVs2PMuDSsw+nteMe2Z/Wj+3SLxzUt5yMpn8FfrYLoeJHLUL9 VwZxlbY3FIP5jN8Hi8xgsmOEHxYrQgXQt9SkPW0f+et0rQT6oqvfgJxB/0kBKvpM7HHF 5ERg== X-Gm-Message-State: AOAM532+7rr0ptHqDcKbJMIE/plpabPsCrnkRoE3LPnuzU7MGNuI+7Bm e2AGThXK8NNAIGJPJrqZa+yAAcsM4w== X-Received: by 2002:a92:b703:: with SMTP id k3mr7597536ili.185.1616690851216; Thu, 25 Mar 2021 09:47:31 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:29 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 3/8] docs: dt: writing-schema: Include the example schema in the doc build Date: Thu, 25 Mar 2021 10:47:08 -0600 Message-Id: <20210325164713.1296407-4-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The example-schema.yaml file serves as documentation, so let's include it from writing-schema.rst. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Documentation/devicetree/writing-schema.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst index 03e279d8fd6a..be14dbed6081 100644 --- a/Documentation/devicetree/writing-schema.rst +++ b/Documentation/devicetree/writing-schema.rst @@ -8,6 +8,8 @@ written in a JSON compatible subset of YAML. YAML is used instead of JSON as it is considered more human readable and has some advantages such as allowing comments (Prefixed with '#'). +Also see :ref:`example-schema`. + Schema Contents --------------- @@ -170,3 +172,12 @@ json-schema Resources `JSON-Schema Specifications `_ `Using JSON Schema Book `_ + +.. _example-schema: + +Annotated Example Schema +------------------------ + +Also available as a separate file: :download:`example-schema.yaml` + +.. literalinclude:: example-schema.yaml From patchwork Thu Mar 25 16:47:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408840 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700123jai; Thu, 25 Mar 2021 09:48:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4i8AddI0t1JnMXPEodwtAsL0sbqOPRowov5sVSdogczw9b5Y32wjtBw9cgs08Ah0lVnDA X-Received: by 2002:a17:907:75c7:: with SMTP id jl7mr10885643ejc.191.1616690906660; Thu, 25 Mar 2021 09:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690906; cv=none; d=google.com; s=arc-20160816; b=c19q4lVgMi7Wk7KkRXdPqDnwt/UNEabmxTyPNdY0OQlXSuQY7XeWImwvWMfkEt17XU 30Wj/74tS0tO8L0otQAb4vP6+PXXzwHuO4b6dcOStbxYP8YP8fXKmvJdsBOUEYrWjdSL kBKiGtudDnOXFhae2+aRwD4IHjaTX1HZmFPlkZ1a2cpQMGyRQHLC8fYQsjpYoPXyCqkx PTJM+AqYRkT2+1yzzSvSB+96bzftwEk9WBfhVAmzuBYvbZd2xXojCLISIBfURfJndXf5 l2gfWQrRowGLGM+ZaNalYjr7wG5p3/XzZADq8fGeEaO5bfQqcapkX3rNqls5kXf4Lhyg qS2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oGVgOlWWlf7S8lKrv2KpxPAfeld5uIAqgdnxqJDADHQ=; b=Gqd1X33mzWcpmGjGYQMZN3qCCiaOXgiUK4TpeoehylKG8lrg/JzTkDlRrlXQEg/y3K SlW4JR4CEl9uR7TkUUXt1c9M/YrPNQrSz3pSeAX5yAK53LPTUDizWfBU1eph8mRVBiXU JHiYu80io+lJtE/1CiV7OpB+PyxpxbXUHxku9lj1Aq0ZWmsO5Po0mlZGZhZvXW3iVYDC 3/tUegWwu6vP5uiZxb/iBCsaRaIBY8w2YLejgSNEWbhOYRi6wNnSbdkoJb7fdIkUd1D9 5ldYug79nPJXW4qywwYgZy8gW0F5BLQStjc0i4oanPHIUmSLy2QVKoCoZDjoasa1EITP 9ZDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.26; Thu, 25 Mar 2021 09:48:26 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229957AbhCYQry (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:54 -0400 Received: from mail-io1-f41.google.com ([209.85.166.41]:36538 "EHLO mail-io1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbhCYQrg (ORCPT ); Thu, 25 Mar 2021 12:47:36 -0400 Received: by mail-io1-f41.google.com with SMTP id f19so2571477ion.3; Thu, 25 Mar 2021 09:47:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oGVgOlWWlf7S8lKrv2KpxPAfeld5uIAqgdnxqJDADHQ=; b=h172az+ji3DfI/JM5AGf2215bFOoNsTKWgbP+y1ByBMNCKV/hiv8UXqkcPEiu9LAUs ce51MrHe80HPGQw4Nd8Otl3qu2wOFZ2tT3ydcwIY+Sfe0ng07L5YaDxUfB7T3irMf1Bp 0jlL7XIa3/kagqIoBntC6Gh9gxwQea9/PBW0gZNDL58ozGgopNiP5gEaMTdjmWDh4QtY GaTo26Q8LUaVOaYfoTBd3ZI08TteJpO7p2LZPR02FbjmaD0PYEIG5hKAwkLFrdW6kGVF MgBEUx5JRa2bZNgh3ENR8umbxlYY8iiQdrJIcupg/FLh6iDOPqlRJmqlzW+54d0KdLps H68g== X-Gm-Message-State: AOAM533fXCFJO8/RbEDUbAF30L8EwEkNodoGQx431odvnq0goyw3rHDM owLY4I1o8AKEsT7sWeBn5ruhbpe76g== X-Received: by 2002:a5e:8d09:: with SMTP id m9mr6902992ioj.29.1616690854878; Thu, 25 Mar 2021 09:47:34 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:32 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 4/8] docs: dt: Make 'Devicetree' wording more consistent Date: Thu, 25 Mar 2021 10:47:09 -0600 Message-Id: <20210325164713.1296407-5-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org There's a variety of ways 'Devicetree' has been written. This is most evident in the documentation build contents where we have 'Device Tree', 'DeviceTree', etc. The DT spec has somewhat standardized on 'Devicetree', so let's use that. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/submitting-patches.rst | 2 +- Documentation/devicetree/changesets.rst | 8 ++++---- Documentation/devicetree/dynamic-resolution-notes.rst | 8 ++++---- Documentation/devicetree/index.rst | 2 +- Documentation/devicetree/of_unittest.rst | 6 +++--- Documentation/devicetree/overlay-notes.rst | 8 ++++---- Documentation/devicetree/usage-model.rst | 8 ++++---- Documentation/devicetree/writing-schema.rst | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/Documentation/devicetree/bindings/submitting-patches.rst b/Documentation/devicetree/bindings/submitting-patches.rst index 42e86f978be2..51c459909575 100644 --- a/Documentation/devicetree/bindings/submitting-patches.rst +++ b/Documentation/devicetree/bindings/submitting-patches.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 ========================================== -Submitting devicetree (DT) binding patches +Submitting Devicetree (DT) binding patches ========================================== I. For patch submitters diff --git a/Documentation/devicetree/changesets.rst b/Documentation/devicetree/changesets.rst index c7fd8cd6a270..2091468d4837 100644 --- a/Documentation/devicetree/changesets.rst +++ b/Documentation/devicetree/changesets.rst @@ -1,10 +1,10 @@ .. SPDX-License-Identifier: GPL-2.0 -============= -DT Changesets -============= +===================== +Devicetree Changesets +===================== -A DT changeset is a method which allows one to apply changes +A Devicetree changeset is a method which allows one to apply changes in the live tree in such a way that either the full set of changes will be applied, or none of them will be. If an error occurs partway through applying the changeset, then the tree will be rolled back to the diff --git a/Documentation/devicetree/dynamic-resolution-notes.rst b/Documentation/devicetree/dynamic-resolution-notes.rst index 570b7e1f39eb..f81ad8daa36f 100644 --- a/Documentation/devicetree/dynamic-resolution-notes.rst +++ b/Documentation/devicetree/dynamic-resolution-notes.rst @@ -1,11 +1,11 @@ .. SPDX-License-Identifier: GPL-2.0 -================================== -Device Tree Dynamic Resolver Notes -================================== +================================= +Devicetree Dynamic Resolver Notes +================================= This document describes the implementation of the in-kernel -Device Tree resolver, residing in drivers/of/resolver.c +DeviceTree resolver, residing in drivers/of/resolver.c How the resolver works ---------------------- diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst index 54026763916d..32509e8de8da 100644 --- a/Documentation/devicetree/index.rst +++ b/Documentation/devicetree/index.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 ============================= -Open Firmware and Device Tree +Open Firmware and Devicetree ============================= .. toctree:: diff --git a/Documentation/devicetree/of_unittest.rst b/Documentation/devicetree/of_unittest.rst index dea05214f3ad..2afe41a37148 100644 --- a/Documentation/devicetree/of_unittest.rst +++ b/Documentation/devicetree/of_unittest.rst @@ -1,8 +1,8 @@ .. SPDX-License-Identifier: GPL-2.0 -================================== -Open Firmware Device Tree Unittest -================================== +================================= +Open Firmware Devicetree Unittest +================================= Author: Gaurav Minocha diff --git a/Documentation/devicetree/overlay-notes.rst b/Documentation/devicetree/overlay-notes.rst index c67cc676bbd2..b2b8db765b8c 100644 --- a/Documentation/devicetree/overlay-notes.rst +++ b/Documentation/devicetree/overlay-notes.rst @@ -1,8 +1,8 @@ .. SPDX-License-Identifier: GPL-2.0 -========================= -Device Tree Overlay Notes -========================= +======================== +Devicetree Overlay Notes +======================== This document describes the implementation of the in-kernel device tree overlay functionality residing in drivers/of/overlay.c and is a @@ -11,7 +11,7 @@ companion document to Documentation/devicetree/dynamic-resolution-notes.rst[1] How overlays work ----------------- -A Device Tree's overlay purpose is to modify the kernel's live tree, and +A Devicetree's overlay purpose is to modify the kernel's live tree, and have the modification affecting the state of the kernel in a way that is reflecting the changes. Since the kernel mainly deals with devices, any new device node that result diff --git a/Documentation/devicetree/usage-model.rst b/Documentation/devicetree/usage-model.rst index 1eb83496ca1e..b6a287955ee5 100644 --- a/Documentation/devicetree/usage-model.rst +++ b/Documentation/devicetree/usage-model.rst @@ -1,8 +1,8 @@ .. SPDX-License-Identifier: GPL-2.0 -========================= -Linux and the Device Tree -========================= +======================== +Linux and the Devicetree +======================== The Linux usage model for device tree data @@ -14,7 +14,7 @@ at devicetree.org\ [1]_. .. [1] https://www.devicetree.org/specifications/ -The "Open Firmware Device Tree", or simply Device Tree (DT), is a data +The "Open Firmware Device Tree", or simply Devicetree (DT), is a data structure and language for describing hardware. More specifically, it is a description of hardware that is readable by an operating system so that the operating system doesn't need to hard code details of the diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/writing-schema.rst index be14dbed6081..23d6579aea2c 100644 --- a/Documentation/devicetree/writing-schema.rst +++ b/Documentation/devicetree/writing-schema.rst @@ -1,6 +1,6 @@ .. SPDX-License-Identifier: GPL-2.0 -Writing DeviceTree Bindings in json-schema +Writing Devicetree Bindings in json-schema ========================================== Devicetree bindings are written using json-schema vocabulary. Schema files are From patchwork Thu Mar 25 16:47:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408843 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700155jai; Thu, 25 Mar 2021 09:48:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGBRGh387sdZaZijl1T16wZ5WxA3xQh+zB8YITuQYc7/UAUqaM/xSxXV3nu101hZRuIQM4 X-Received: by 2002:a50:cdd1:: with SMTP id h17mr10170505edj.178.1616690909017; Thu, 25 Mar 2021 09:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690909; cv=none; d=google.com; s=arc-20160816; b=DwAXgLojVRnWGgAQ9PVOZks630Gpdmxrv9NC7gJIRS41ZqRQasf6NvDdFQzBFVKHgy VmQRfNVwMvhnVcn8dCDKSPa3Len+/ZyEX5IXqqQIOlLVkoZmuIoglPBga/zJGtGXBrD9 vpiZK2yxXDzZT+amuvnsNo1re2hp4usHcSecX3vTiUPepElkK5TqoewztWk5Nm4tfh9N NJqoZV6Xh/9WMdt6iigTcVDBGpN8nFIMu4/W15cVAuW1sxjl9Be3rIQNZbIFcbU0okUj wmmjuZ7jJIfqCKRdcBgDUKD8UdG7z43hgGXlssaW6R2B4377XlD6kF/5gK4dGPtINUhx qeVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=a7sJu5rhLqNCGvoHbFMmH4l9oipcNGbXw2wa6pIJXQE=; b=O9RNgLQkcHQUAfYipa66kGKhD3zUvKBiepVZywpUflPHQYiOZ6Y3NjSZqlgYBwYFoO tEDFXEXenl8fyVQ9DgnpuTJs9i5ELSlfilE0JZRyNcjcce3IfVZEenWnkXBlj4U3Elt3 U9HpkE1hKzhzMid9SN+fTWdsmNvTpR77YvaNzXTWyHCpnVaFUasaEnX7fPaL3bn+onar a60qD4Ow1HPxblIGdnwdUG9sVJSIoij6drKV6zhEkj/pckKJYDXIVcJe4mEbf4PJXrQm Sl+3aLB22GRaZFvCS7m0hbZEbGtq6cSQq90uyjIfQMoJ8DjJrpfEzfT4Kjwex+T+KwkN kwyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.28; Thu, 25 Mar 2021 09:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229972AbhCYQrz (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:55 -0400 Received: from mail-io1-f50.google.com ([209.85.166.50]:42734 "EHLO mail-io1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbhCYQri (ORCPT ); Thu, 25 Mar 2021 12:47:38 -0400 Received: by mail-io1-f50.google.com with SMTP id r193so2540319ior.9; Thu, 25 Mar 2021 09:47:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a7sJu5rhLqNCGvoHbFMmH4l9oipcNGbXw2wa6pIJXQE=; b=oGkshcRd+iNDJbkC6OGhVGaiA9AiHBfikpsdCpC+48JPh4UB88Httuk9+v5Lpba6fp czVAY6gYohz73pcL5Ny0mIAG+KFKQa3s5Wqmmu5Wn6EDy9uk+Mr8CE8tUawfPSxe+llu w6rDNPkAeXy4ZEaNgAX+frf8OljiID2Teeb33r5IRkSfqEcqH6lQp3p/mqZDD8A+EzOx xhPtgUi3v1BLDxO4jC3rKNIH7LWWOpboa4gHGAHKHnYiSZZD1+chlZu1MFAAXgZMrIDH +wkrDzchGy4+K0J3i+P0zedsiLdT2xXakRNisaet7qs4Gb2YcOH0pmfBZCdryVK/V8aa sZuA== X-Gm-Message-State: AOAM532peCgj7hQbEoyWFtv1KRSbFwCqp6QPyIS97QoQW9ZAPACtE8GG IMViOMhJRYrAfmi0NuRdgR1TABC4mg== X-Received: by 2002:a5d:9659:: with SMTP id d25mr7345782ios.146.1616690857349; Thu, 25 Mar 2021 09:47:37 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:36 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 5/8] docs: dt: Group DT docs into relevant sub-sections Date: Thu, 25 Mar 2021 10:47:10 -0600 Message-Id: <20210325164713.1296407-6-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The DT docs are currently all just lumped together in the doc build. Let's organize the documents by kernel specifics, overlays and bindings. As writing-schema.rst is about bindings, let's move it to the bindings directory. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Documentation/devicetree/bindings/index.rst | 7 ++----- .../devicetree/{ => bindings}/writing-schema.rst | 0 Documentation/devicetree/index.rst | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 7 deletions(-) rename Documentation/devicetree/{ => bindings}/writing-schema.rst (100%) -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/Documentation/devicetree/bindings/index.rst b/Documentation/devicetree/bindings/index.rst index 3837b17c234f..d9002a3a0abb 100644 --- a/Documentation/devicetree/bindings/index.rst +++ b/Documentation/devicetree/bindings/index.rst @@ -1,12 +1,9 @@ .. SPDX-License-Identifier: GPL-2.0 -=========== -Device Tree -=========== - .. toctree:: :maxdepth: 1 ABI - submitting-patches writing-bindings + writing-schema + submitting-patches diff --git a/Documentation/devicetree/writing-schema.rst b/Documentation/devicetree/bindings/writing-schema.rst similarity index 100% rename from Documentation/devicetree/writing-schema.rst rename to Documentation/devicetree/bindings/writing-schema.rst diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst index 32509e8de8da..70b5dcdbcf07 100644 --- a/Documentation/devicetree/index.rst +++ b/Documentation/devicetree/index.rst @@ -4,14 +4,26 @@ Open Firmware and Devicetree ============================= +Kernel Devicetree Usage +======================= .. toctree:: :maxdepth: 1 usage-model - writing-schema + of_unittest + +Devicetree Overlays +=================== +.. toctree:: + :maxdepth: 1 + changesets dynamic-resolution-notes - of_unittest overlay-notes +Devicetree Bindings +=================== +.. toctree:: + :maxdepth: 1 + bindings/index From patchwork Thu Mar 25 16:47:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408846 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700205jai; Thu, 25 Mar 2021 09:48:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoFSkafBRvcwHRd039i3eqQdBs8+r32H1TqKzCJozk+JabjqYFtVVbRKd4WDC40jQzMcNZ X-Received: by 2002:a17:907:33cd:: with SMTP id zk13mr10438011ejb.224.1616690912937; Thu, 25 Mar 2021 09:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690912; cv=none; d=google.com; s=arc-20160816; b=HsdWkQDBS1hIllzuwWJ9QkbxGTtM8BSH9DY0SpnhMN2TjZIbHcb9om8h4DTjDNlQdW Nf7dUbAYjiIYGJCDRmzfyxqf3uqLBwaVd303yuQ1bCSfx6wg/48/oOkQgO2ndiwUPar5 A9HXufh96efPvRYjkqFHFLod3NSNY21TzovWz+sKErs5JrSyuJE8a5ovK7M9Y/lny0mg OmDGYLx4RHIWaHjM8lp8QVeJwv/ODI+j0kaz0s8xwCk5VRw9y6wd39+fXuxstcOs04xd TbDFCCsnwlBYhy5P/+HBJF6DvHPNJxOMfGUCDLSix/kNRGXFGrC+D8isROJwsRvmPbUj jlJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=B+6Y/cobi5su9c2bhOqXxYIvs0Eb9dT8GgSbEmZKcCA=; b=vVJ8ZXs0zfG6oO6Mxs//OmMOgVMWbTDf8rd2mFzFPHrfrRMrFnux4hwo1HQaQ7e+Fn Th74nd+Fe4vaIxzFfTF65HhLtLU0Cx+d+eEHMLtNsKH/ZES9b5TsMZR2yWjw1/K/Y8+K PEKhVlmik9lGrlrchFhboDddmQRLhTauG2NVwFWLx9dSAAif4b6NAGXpQdOXDXLrzInf Isauc/y2E4gtxjbdoS9RJNYtUTjkylyVnY1HTPr/MB5I7JPYxbNx0LtSHDT1jcGLvBSj goM0JdgXSYj2VGvUxK6cLMOMFiT2doVSP0B5H5xiUagWNb9e785yLeacNOexAu38q2gH KdGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.32; Thu, 25 Mar 2021 09:48:32 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229662AbhCYQrz (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:55 -0400 Received: from mail-io1-f52.google.com ([209.85.166.52]:43932 "EHLO mail-io1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbhCYQrn (ORCPT ); Thu, 25 Mar 2021 12:47:43 -0400 Received: by mail-io1-f52.google.com with SMTP id z136so2532556iof.10; Thu, 25 Mar 2021 09:47:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B+6Y/cobi5su9c2bhOqXxYIvs0Eb9dT8GgSbEmZKcCA=; b=gMXuTFbMUwVuzWmOnjiVe7nLeM3j76t1RM5ig8sXIiAw8hPh4ga6IVL4mjmOEWRNnQ eGiWP3HOvUjOi9nk1I5aphNuRmKAOiOlEcuQxNfRAJNGo5GPmQZgM73r9v4vIRpPPrrq 8HlIv9v62WoZF7/ZkGRXICzvmkr3daJat68Y95DlI+vBgtCQEZregiFAWm82wAcy6UcH Ghj9Hz1cpP8/2QZeeVYnwHyVDtQDRUg+hvwryz6EI5m2VS/wfQdn9L3qXyzKA2FN+JZp KVJLtREs6KAHUfhmMP80OvVBCSqOoridu+65jmUGy5qrZZLUHHCF8nRWvEnGbPn6cU2o qJJg== X-Gm-Message-State: AOAM531NvPWLSJlnFTO2WTwxPbmoZbs68abFknzEE8aQcOw2QarrIrDQ pcMPF2QLPD3Wzje5244xFGmhvzF2Lw== X-Received: by 2002:a6b:8b16:: with SMTP id n22mr7184339iod.79.1616690861409; Thu, 25 Mar 2021 09:47:41 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:38 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 6/8] of: Fix kerneldoc output formatting Date: Thu, 25 Mar 2021 10:47:11 -0600 Message-Id: <20210325164713.1296407-7-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The indentation of the kerneldoc comments affects the output formatting. Leading tabs in particular don't work, and sections need to be indented under the section header. The example snippets for DT source in the comments still have some formatting issues, but there doesn't seem to be any way to do multi-line literal blocks in kerneldoc. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Note the dts examples still cause warnings. I couldn't find any way to do a literal block and fix them. Minimally, there needs to be a way to escape ':' and not create sections: Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1466: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1470: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1474: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1517: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1521: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1526: WARNING: Unexpected indentation. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1528: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1529: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1533: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/devicetree/kernel-api:11: ../drivers/of/base.c:1705: WARNING: Definition list ends without a blank line; unexpected unindent. drivers/of/base.c | 284 +++++++++++++++++++++++----------------------- drivers/of/fdt.c | 9 +- 2 files changed, 145 insertions(+), 148 deletions(-) -- 2.27.0 diff --git a/drivers/of/base.c b/drivers/of/base.c index 457d1ec27300..b06bcb3f001a 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -651,11 +651,11 @@ bool of_device_is_big_endian(const struct device_node *device) EXPORT_SYMBOL(of_device_is_big_endian); /** - * of_get_parent - Get a node's parent if any - * @node: Node to get parent + * of_get_parent - Get a node's parent if any + * @node: Node to get parent * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_get_parent(const struct device_node *node) { @@ -673,15 +673,15 @@ struct device_node *of_get_parent(const struct device_node *node) EXPORT_SYMBOL(of_get_parent); /** - * of_get_next_parent - Iterate to a node's parent - * @node: Node to get parent of + * of_get_next_parent - Iterate to a node's parent + * @node: Node to get parent of * - * This is like of_get_parent() except that it drops the - * refcount on the passed node, making it suitable for iterating - * through a node's parents. + * This is like of_get_parent() except that it drops the + * refcount on the passed node, making it suitable for iterating + * through a node's parents. * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_get_next_parent(struct device_node *node) { @@ -719,13 +719,13 @@ static struct device_node *__of_get_next_child(const struct device_node *node, child = __of_get_next_child(parent, child)) /** - * of_get_next_child - Iterate a node childs - * @node: parent node - * @prev: previous child of the parent node, or NULL to get first + * of_get_next_child - Iterate a node childs + * @node: parent node + * @prev: previous child of the parent node, or NULL to get first * - * Returns a node pointer with refcount incremented, use of_node_put() on - * it when done. Returns NULL when prev is the last child. Decrements the - * refcount of prev. + * Return: A node pointer with refcount incremented, use of_node_put() on + * it when done. Returns NULL when prev is the last child. Decrements the + * refcount of prev. */ struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev) @@ -741,12 +741,12 @@ struct device_node *of_get_next_child(const struct device_node *node, EXPORT_SYMBOL(of_get_next_child); /** - * of_get_next_available_child - Find the next available child node - * @node: parent node - * @prev: previous child of the parent node, or NULL to get first + * of_get_next_available_child - Find the next available child node + * @node: parent node + * @prev: previous child of the parent node, or NULL to get first * - * This function is like of_get_next_child(), except that it - * automatically skips any disabled nodes (i.e. status = "disabled"). + * This function is like of_get_next_child(), except that it + * automatically skips any disabled nodes (i.e. status = "disabled"). */ struct device_node *of_get_next_available_child(const struct device_node *node, struct device_node *prev) @@ -772,12 +772,12 @@ struct device_node *of_get_next_available_child(const struct device_node *node, EXPORT_SYMBOL(of_get_next_available_child); /** - * of_get_next_cpu_node - Iterate on cpu nodes - * @prev: previous child of the /cpus node, or NULL to get first + * of_get_next_cpu_node - Iterate on cpu nodes + * @prev: previous child of the /cpus node, or NULL to get first * - * Returns a cpu node pointer with refcount incremented, use of_node_put() - * on it when done. Returns NULL when prev is the last child. Decrements - * the refcount of prev. + * Return: A cpu node pointer with refcount incremented, use of_node_put() + * on it when done. Returns NULL when prev is the last child. Decrements + * the refcount of prev. */ struct device_node *of_get_next_cpu_node(struct device_node *prev) { @@ -834,15 +834,15 @@ struct device_node *of_get_compatible_child(const struct device_node *parent, EXPORT_SYMBOL(of_get_compatible_child); /** - * of_get_child_by_name - Find the child node by name for a given parent - * @node: parent node - * @name: child name to look for. + * of_get_child_by_name - Find the child node by name for a given parent + * @node: parent node + * @name: child name to look for. * - * This function looks for child node for given matching name + * This function looks for child node for given matching name * - * Returns a node pointer if found, with refcount incremented, use - * of_node_put() on it when done. - * Returns NULL if node is not found. + * Return: A node pointer if found, with refcount incremented, use + * of_node_put() on it when done. + * Returns NULL if node is not found. */ struct device_node *of_get_child_by_name(const struct device_node *node, const char *name) @@ -893,22 +893,22 @@ struct device_node *__of_find_node_by_full_path(struct device_node *node, } /** - * of_find_node_opts_by_path - Find a node matching a full OF path - * @path: Either the full path to match, or if the path does not - * start with '/', the name of a property of the /aliases - * node (an alias). In the case of an alias, the node - * matching the alias' value will be returned. - * @opts: Address of a pointer into which to store the start of - * an options string appended to the end of the path with - * a ':' separator. - * - * Valid paths: - * /foo/bar Full path - * foo Valid alias - * foo/bar Valid alias + relative path - * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * of_find_node_opts_by_path - Find a node matching a full OF path + * @path: Either the full path to match, or if the path does not + * start with '/', the name of a property of the /aliases + * node (an alias). In the case of an alias, the node + * matching the alias' value will be returned. + * @opts: Address of a pointer into which to store the start of + * an options string appended to the end of the path with + * a ':' separator. + * + * Valid paths: + * * /foo/bar Full path + * * foo Valid alias + * * foo/bar Valid alias + relative path + * + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_find_node_opts_by_path(const char *path, const char **opts) { @@ -958,15 +958,15 @@ struct device_node *of_find_node_opts_by_path(const char *path, const char **opt EXPORT_SYMBOL(of_find_node_opts_by_path); /** - * of_find_node_by_name - Find a node by its "name" property - * @from: The node to start searching from or NULL; the node + * of_find_node_by_name - Find a node by its "name" property + * @from: The node to start searching from or NULL; the node * you pass will not be searched, only the next one * will. Typically, you pass what the previous call * returned. of_node_put() will be called on @from. - * @name: The name string to match against + * @name: The name string to match against * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_find_node_by_name(struct device_node *from, const char *name) @@ -985,16 +985,16 @@ struct device_node *of_find_node_by_name(struct device_node *from, EXPORT_SYMBOL(of_find_node_by_name); /** - * of_find_node_by_type - Find a node by its "device_type" property - * @from: The node to start searching from, or NULL to start searching + * of_find_node_by_type - Find a node by its "device_type" property + * @from: The node to start searching from, or NULL to start searching * the entire device tree. The node you pass will not be * searched, only the next one will; typically, you pass * what the previous call returned. of_node_put() will be * called on from for you. - * @type: The type string to match against + * @type: The type string to match against * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_find_node_by_type(struct device_node *from, const char *type) @@ -1013,18 +1013,18 @@ struct device_node *of_find_node_by_type(struct device_node *from, EXPORT_SYMBOL(of_find_node_by_type); /** - * of_find_compatible_node - Find a node based on type and one of the + * of_find_compatible_node - Find a node based on type and one of the * tokens in its "compatible" property - * @from: The node to start searching from or NULL, the node - * you pass will not be searched, only the next one - * will; typically, you pass what the previous call - * returned. of_node_put() will be called on it - * @type: The type string to match "device_type" or NULL to ignore - * @compatible: The string to match to one of the tokens in the device - * "compatible" list. - * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * @from: The node to start searching from or NULL, the node + * you pass will not be searched, only the next one + * will; typically, you pass what the previous call + * returned. of_node_put() will be called on it + * @type: The type string to match "device_type" or NULL to ignore + * @compatible: The string to match to one of the tokens in the device + * "compatible" list. + * + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_find_compatible_node(struct device_node *from, const char *type, const char *compatible) @@ -1044,16 +1044,16 @@ struct device_node *of_find_compatible_node(struct device_node *from, EXPORT_SYMBOL(of_find_compatible_node); /** - * of_find_node_with_property - Find a node which has a property with - * the given name. - * @from: The node to start searching from or NULL, the node - * you pass will not be searched, only the next one - * will; typically, you pass what the previous call - * returned. of_node_put() will be called on it - * @prop_name: The name of the property to look for. - * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * of_find_node_with_property - Find a node which has a property with + * the given name. + * @from: The node to start searching from or NULL, the node + * you pass will not be searched, only the next one + * will; typically, you pass what the previous call + * returned. of_node_put() will be called on it + * @prop_name: The name of the property to look for. + * + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_find_node_with_property(struct device_node *from, const char *prop_name) @@ -1102,10 +1102,10 @@ const struct of_device_id *__of_match_node(const struct of_device_id *matches, /** * of_match_node - Tell if a device_node has a matching of_match structure - * @matches: array of of device match structures to search in - * @node: the of device structure to match against + * @matches: array of of device match structures to search in + * @node: the of device structure to match against * - * Low level utility function used by device matching. + * Low level utility function used by device matching. */ const struct of_device_id *of_match_node(const struct of_device_id *matches, const struct device_node *node) @@ -1121,17 +1121,17 @@ const struct of_device_id *of_match_node(const struct of_device_id *matches, EXPORT_SYMBOL(of_match_node); /** - * of_find_matching_node_and_match - Find a node based on an of_device_id - * match table. - * @from: The node to start searching from or NULL, the node - * you pass will not be searched, only the next one - * will; typically, you pass what the previous call - * returned. of_node_put() will be called on it - * @matches: array of of device match structures to search in - * @match: Updated to point at the matches entry which matched - * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. + * of_find_matching_node_and_match - Find a node based on an of_device_id + * match table. + * @from: The node to start searching from or NULL, the node + * you pass will not be searched, only the next one + * will; typically, you pass what the previous call + * returned. of_node_put() will be called on it + * @matches: array of of device match structures to search in + * @match: Updated to point at the matches entry which matched + * + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. */ struct device_node *of_find_matching_node_and_match(struct device_node *from, const struct of_device_id *matches, @@ -1462,20 +1462,20 @@ EXPORT_SYMBOL(of_parse_phandle); * * Example: * - * phandle1: node1 { + * phandle1: node1 { * #list-cells = <2>; - * } + * }; * - * phandle2: node2 { + * phandle2: node2 { * #list-cells = <1>; - * } + * }; * - * node3 { + * node3 { * list = <&phandle1 1 2 &phandle2 3>; - * } + * }; * - * To get a device_node of the `node2' node you may call this: - * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); + * To get a device_node of the ``node2`` node you may call this: + * of_parse_phandle_with_args(node3, "list", "#list-cells", 1, &args); */ int of_parse_phandle_with_args(const struct device_node *np, const char *list_name, const char *cells_name, int index, @@ -1513,29 +1513,28 @@ EXPORT_SYMBOL(of_parse_phandle_with_args); * pointer. * * Example: - * - * phandle1: node1 { - * #list-cells = <2>; - * } - * - * phandle2: node2 { - * #list-cells = <1>; - * } - * - * phandle3: node3 { - * #list-cells = <1>; - * list-map = <0 &phandle2 3>, - * <1 &phandle2 2>, - * <2 &phandle1 5 1>; - * list-map-mask = <0x3>; - * }; - * - * node4 { - * list = <&phandle1 1 2 &phandle3 0>; - * } - * - * To get a device_node of the `node2' node you may call this: - * of_parse_phandle_with_args(node4, "list", "list", 1, &args); + * phandle1: node1 { + * #list-cells = <2>; + * }; + * + * phandle2: node2 { + * #list-cells = <1>; + * }; + * + * phandle3: node3 { + * #list-cells = <1>; + * list-map = <0 &phandle2 3>, + * <1 &phandle2 2>, + * <2 &phandle1 5 1>; + * list-map-mask = <0x3>; + * }; + * + * node4 { + * list = <&phandle1 1 2 &phandle3 0>; + * }; + * + * To get a device_node of the ``node2`` node you may call this: + * of_parse_phandle_with_args(node4, "list", "list", 1, &args); */ int of_parse_phandle_with_args_map(const struct device_node *np, const char *list_name, @@ -1696,18 +1695,18 @@ EXPORT_SYMBOL(of_parse_phandle_with_args_map); * * Example: * - * phandle1: node1 { - * } + * phandle1: node1 { + * }; * - * phandle2: node2 { - * } + * phandle2: node2 { + * }; * - * node3 { - * list = <&phandle1 0 2 &phandle2 2 3>; - * } + * node3 { + * list = <&phandle1 0 2 &phandle2 2 3>; + * }; * - * To get a device_node of the `node2' node you may call this: - * of_parse_phandle_with_fixed_args(node3, "list", 2, 1, &args); + * To get a device_node of the ``node2`` node you may call this: + * of_parse_phandle_with_fixed_args(node3, "list", 2, 1, &args); */ int of_parse_phandle_with_fixed_args(const struct device_node *np, const char *list_name, int cell_count, @@ -1952,13 +1951,12 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np, /** * of_alias_scan - Scan all properties of the 'aliases' node + * @dt_alloc: An allocator that provides a virtual address to memory + * for storing the resulting tree * * The function scans all the properties of the 'aliases' node and populates * the global lookup table with the properties. It returns the * number of alias properties found, or an error code in case of failure. - * - * @dt_alloc: An allocator that provides a virtual address to memory - * for storing the resulting tree */ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) { @@ -2153,12 +2151,12 @@ bool of_console_check(struct device_node *dn, char *name, int index) EXPORT_SYMBOL_GPL(of_console_check); /** - * of_find_next_cache_node - Find a node's subsidiary cache - * @np: node of type "cpu" or "cache" + * of_find_next_cache_node - Find a node's subsidiary cache + * @np: node of type "cpu" or "cache" * - * Returns a node pointer with refcount incremented, use - * of_node_put() on it when done. Caller should hold a reference - * to np. + * Return: A node pointer with refcount incremented, use + * of_node_put() on it when done. Caller should hold a reference + * to np. */ struct device_node *of_find_next_cache_node(const struct device_node *np) { diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 4d6d195e089a..ba53da9c3895 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -349,11 +349,6 @@ static int unflatten_dt_nodes(const void *blob, /** * __unflatten_device_tree - create tree of device_nodes from flat blob - * - * unflattens a device-tree, creating the - * tree of struct device_node. It also fills the "name" and "type" - * pointers of the nodes so the normal device-tree walking functions - * can be used. * @blob: The blob to expand * @dad: Parent device node * @mynodes: The device_node tree created by the call @@ -361,6 +356,10 @@ static int unflatten_dt_nodes(const void *blob, * for the resulting tree * @detached: if true set OF_DETACHED on @mynodes * + * unflattens a device-tree, creating the tree of struct device_node. It also + * fills the "name" and "type" pointers of the nodes so the normal device-tree + * walking functions can be used. + * * Returns NULL on failure or the memory chunk containing the unflattened * device tree on success. */ From patchwork Thu Mar 25 16:47:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408845 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700173jai; Thu, 25 Mar 2021 09:48:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj7jS9lTwqOWxDPxhj2Rq6RLUZdpU47IiPsBqktFrU14FMw0/ciPBmDer+IrvLYlx6Dhny X-Received: by 2002:a17:907:7745:: with SMTP id kx5mr10392382ejc.3.1616690910212; Thu, 25 Mar 2021 09:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690910; cv=none; d=google.com; s=arc-20160816; b=NhNwCOPsZ2WYBz4ULgQQL+G2iW5vxIRkDKCJeq+pt4UOYgqW1X6rvrS6lqrDIe/mG3 1uYu9U4cXsZ5IkDHZe9/u7G2Wikrk/0xxjYOBfz1mK3LgnEHDTZ2NFE+xefJHdTkVGWD 7npjvcwlJNUaVVv+n9zYQ0S8urag4kPfnwHdhUzoeG5UUHoHzavk5Ju33lvXYzVStj2z C3t9RRnyAXIUst76eebRydvyUl3I6nz5ZRbNz7zwJ2FWdaERuoUsMzZR5AB8OZh2aynC yVSoh8DsTUPhk2i2XFNeePzwTW7ViacyrAXD2lEdMU0YI2YPb8pHf1sjK8RdYCsMoqA4 Hiaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KBYoERx0ba+tILGow9NRBaJoRdq1lnJM67cm++2N4QA=; b=oal474Fupafy4J5b3TEXAHDONJAsDUbirS9VBpR4mFqShXIz5OFB+QRzKlAPrw3G2J SRIPqTRDgWqZChcIz9b6i+6240PK8GH40fdNpc70kVIFDUacBzv6EPoCqHA/7/OaPKa0 xz7cR1zPdfSPtaleJbnmLhb7ANNA33SLevBYMqFlSyjF8Q0LjjchMpngcV/sMF8WAojZ mmsaK1dJjNmUU5mb7KC07JzjuyRro/LP7CdEYPnhuCeTBKnam6vu78UoV+OwGwKUSUUP txhanJLOGsRBkl3S+n0dDoBpLF8SCXkfQN5HySVdjDEovbZSzWv6FgyD4UJcdu/1rlbE sw7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.29; Thu, 25 Mar 2021 09:48:30 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229991AbhCYQr4 (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:56 -0400 Received: from mail-io1-f44.google.com ([209.85.166.44]:44902 "EHLO mail-io1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbhCYQrs (ORCPT ); Thu, 25 Mar 2021 12:47:48 -0400 Received: by mail-io1-f44.google.com with SMTP id v26so2534017iox.11; Thu, 25 Mar 2021 09:47:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KBYoERx0ba+tILGow9NRBaJoRdq1lnJM67cm++2N4QA=; b=b96lKvQragKOF+mUreYqFbv1U11Jnw1rXy8GL2vDtDOqgHLn+mf0ZJPq24C+6Pl7Ii v6igby0Wob/mn2AvrROl2OqOpL2Frn3bZCd142JoEA5E4KVIR3BJiP1bj6JRjlvOP9q6 aSpfINx8QtomihlxxmxlPePZ5CvREzy8KHa3jHe3PC6cSUBxPEqHHd0oqME0KlsXnIaE 4MoBYPch5Ig+DRfPTyKngZZc8ewJgOSztEqdjzzA+gmhX3qhMCN5U3Nu9+avojJTd6zu p8hWZlXE/k25Jr3hKT7wS5y0RCySWb9ky1cJ40mfc0XFRRD8TeWd+mu/cdwz5o9TtzZC KGRQ== X-Gm-Message-State: AOAM533S9/KwBfs99sYAybL/Y+HuB+HXqtqxrMTR3mQ5LQ5UcZK1fora XrgrPLaLSNyFuifTfn7li37XunHEPA== X-Received: by 2002:a6b:b7cd:: with SMTP id h196mr6928415iof.59.1616690865811; Thu, 25 Mar 2021 09:47:45 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:43 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 7/8] of: Add missing 'Return' section in kerneldoc comments Date: Thu, 25 Mar 2021 10:47:12 -0600 Message-Id: <20210325164713.1296407-8-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Many of the DT kerneldoc comments are lacking a 'Return' section. Let's add the section in cases we have a description of return values. There's still some cases where the return values are not documented. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- drivers/of/base.c | 39 +++++++++++++------------ drivers/of/dynamic.c | 19 ++++++++----- drivers/of/fdt.c | 8 +++--- drivers/of/irq.c | 14 ++++----- drivers/of/overlay.c | 16 +++++------ drivers/of/platform.c | 10 +++---- drivers/of/property.c | 66 +++++++++++++++++++++++++++---------------- include/linux/of.h | 63 ++++++++++++++++++++++++++--------------- 8 files changed, 140 insertions(+), 95 deletions(-) -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/drivers/of/base.c b/drivers/of/base.c index b06bcb3f001a..3bf189d394bd 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -244,7 +244,7 @@ struct device_node *__of_find_all_nodes(struct device_node *prev) * @prev: Previous node or NULL to start iteration * of_node_put() will be called on it * - * Returns a node pointer with refcount incremented, use + * Return: A node pointer with refcount incremented, use * of_node_put() on it when done. */ struct device_node *of_find_all_nodes(struct device_node *prev) @@ -374,7 +374,7 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun, * before booting secondary cores. This function uses arch_match_cpu_phys_id * which can be overridden by architecture specific implementation. * - * Returns a node pointer for the logical cpu with refcount incremented, use + * Return: A node pointer for the logical cpu with refcount incremented, use * of_node_put() on it when done. Returns NULL if not found. */ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) @@ -394,8 +394,8 @@ EXPORT_SYMBOL(of_get_cpu_node); * * @cpu_node: Pointer to the device_node for CPU. * - * Returns the logical CPU number of the given CPU device_node. - * Returns -ENODEV if the CPU is not found. + * Return: The logical CPU number of the given CPU device_node or -ENODEV if the + * CPU is not found. */ int of_cpu_node_to_id(struct device_node *cpu_node) { @@ -427,7 +427,7 @@ EXPORT_SYMBOL(of_cpu_node_to_id); * bindings. This function check for both and returns the idle state node for * the requested index. * - * In case an idle state node is found at @index, the refcount is incremented + * Return: An idle state node if found at @index. The refcount is incremented * for it, so call of_node_put() on it when done. Returns NULL if not found. */ struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, @@ -561,7 +561,7 @@ int of_device_compatible_match(struct device_node *device, * of_machine_is_compatible - Test root of device tree for a given compatible value * @compat: compatible string to look for in root node's compatible property. * - * Returns a positive integer if the root node has the given value in its + * Return: A positive integer if the root node has the given value in its * compatible property. */ int of_machine_is_compatible(const char *compat) @@ -583,7 +583,7 @@ EXPORT_SYMBOL(of_machine_is_compatible); * * @device: Node to check for availability, with locks already held * - * Returns true if the status property is absent or set to "okay" or "ok", + * Return: True if the status property is absent or set to "okay" or "ok", * false otherwise */ static bool __of_device_is_available(const struct device_node *device) @@ -611,7 +611,7 @@ static bool __of_device_is_available(const struct device_node *device) * * @device: Node to check for availability * - * Returns true if the status property is absent or set to "okay" or "ok", + * Return: True if the status property is absent or set to "okay" or "ok", * false otherwise */ bool of_device_is_available(const struct device_node *device) @@ -632,7 +632,7 @@ EXPORT_SYMBOL(of_device_is_available); * * @device: Node to check for endianness * - * Returns true if the device has a "big-endian" property, or if the kernel + * Return: True if the device has a "big-endian" property, or if the kernel * was compiled for BE *and* the device has a "native-endian" property. * Returns false otherwise. * @@ -816,7 +816,7 @@ EXPORT_SYMBOL(of_get_next_cpu_node); * Lookup child node whose compatible property contains the given compatible * string. * - * Returns a node pointer with refcount incremented, use of_node_put() on it + * Return: a node pointer with refcount incremented, use of_node_put() on it * when done; or NULL if not found. */ struct device_node *of_get_compatible_child(const struct device_node *parent, @@ -1170,7 +1170,7 @@ EXPORT_SYMBOL(of_find_matching_node_and_match); * It does this by stripping the manufacturer prefix (as delimited by a ',') * from the first entry in the compatible list property. * - * This routine returns 0 on success, <0 on failure. + * Return: This routine returns 0 on success, <0 on failure. */ int of_modalias_node(struct device_node *node, char *modalias, int len) { @@ -1190,7 +1190,7 @@ EXPORT_SYMBOL_GPL(of_modalias_node); * of_find_node_by_phandle - Find a node given a phandle * @handle: phandle of the node to find * - * Returns a node pointer with refcount incremented, use + * Return: A node pointer with refcount incremented, use * of_node_put() on it when done. */ struct device_node *of_find_node_by_phandle(phandle handle) @@ -1426,7 +1426,7 @@ static int __of_parse_phandle_with_args(const struct device_node *np, * @index: For properties holding a table of phandles, this is the index into * the table * - * Returns the device_node pointer with refcount incremented. Use + * Return: The device_node pointer with refcount incremented. Use * of_node_put() on it when done. */ struct device_node *of_parse_phandle(const struct device_node *np, @@ -1725,7 +1725,7 @@ EXPORT_SYMBOL(of_parse_phandle_with_fixed_args); * @list_name: property name that contains a list * @cells_name: property name that specifies phandles' arguments count * - * Returns the number of phandle + argument tuples within a property. It + * Return: The number of phandle + argument tuples within a property. It * is a typical pattern to encode a list of phandle and variable * arguments into a single property. The number of arguments is encoded * by a property in the phandle-target node. For example, a gpios @@ -2025,7 +2025,9 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) * @stem: Alias stem of the given device_node * * The function travels the lookup table to get the alias id for the given - * device_node and alias stem. It returns the alias id if found. + * device_node and alias stem. + * + * Return: The alias id if found. */ int of_alias_get_id(struct device_node *np, const char *stem) { @@ -2134,8 +2136,9 @@ EXPORT_SYMBOL_GPL(of_alias_get_highest_id); * @index: Index to use for preferred console. * * Check if the given device node matches the stdout-path property in the - * /chosen node. If it does then register it as the preferred console and return - * TRUE. Otherwise return FALSE. + * /chosen node. If it does then register it as the preferred console. + * + * Return: TRUE if console successfully setup. Otherwise return FALSE. */ bool of_console_check(struct device_node *dn, char *name, int index) { @@ -2186,7 +2189,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np) * * @cpu: cpu number(logical index) for which the last cache level is needed * - * Returns the the level at which the last cache is present. It is exactly + * Return: The the level at which the last cache is present. It is exactly * same as the total number of cache levels for the given logical cpu. */ int of_find_last_cache_level(unsigned int cpu) diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 1d7a22e44d78..cd3821a6444f 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -27,7 +27,7 @@ static struct device_node *kobj_to_device_node(struct kobject *kobj) * @node: Node to inc refcount, NULL is supported to simplify writing of * callers * - * Returns node. + * Return: The node with refcount incremented. */ struct device_node *of_node_get(struct device_node *node) { @@ -104,7 +104,8 @@ int of_reconfig_notify(unsigned long action, struct of_reconfig_data *p) * @arg - argument of the of notifier * * Returns the new state of a device based on the notifier used. - * Returns 0 on device going from enabled to disabled, 1 on device + * + * Return: 0 on device going from enabled to disabled, 1 on device * going from disabled to enabled and -1 on no change. */ int of_reconfig_get_state_change(unsigned long action, struct of_reconfig_data *pr) @@ -374,7 +375,8 @@ void of_node_release(struct kobject *kobj) * property structure and the property name & contents. The property's * flags have the OF_DYNAMIC bit set so that we can differentiate between * dynamically allocated properties and not. - * Returns the newly allocated property or NULL on out of memory error. + * + * Return: The newly allocated property or NULL on out of memory error. */ struct property *__of_prop_dup(const struct property *prop, gfp_t allocflags) { @@ -417,7 +419,7 @@ struct property *__of_prop_dup(const struct property *prop, gfp_t allocflags) * another node. The node data are dynamically allocated and all the node * flags have the OF_DYNAMIC & OF_DETACHED bits set. * - * Returns the newly allocated node or NULL on out of memory error. + * Return: The newly allocated node or NULL on out of memory error. */ struct device_node *__of_node_dup(const struct device_node *np, const char *full_name) @@ -783,7 +785,8 @@ static int __of_changeset_apply(struct of_changeset *ocs) * Any side-effects of live tree state changes are applied here on * success, like creation/destruction of devices and side-effects * like creation of sysfs properties and directories. - * Returns 0 on success, a negative error value in case of an error. + * + * Return: 0 on success, a negative error value in case of an error. * On error the partially applied effects are reverted. */ int of_changeset_apply(struct of_changeset *ocs) @@ -877,7 +880,8 @@ static int __of_changeset_revert(struct of_changeset *ocs) * was before the application. * Any side-effects like creation/destruction of devices and * removal of sysfs properties and directories are applied. - * Returns 0 on success, a negative error value in case of an error. + * + * Return: 0 on success, a negative error value in case of an error. */ int of_changeset_revert(struct of_changeset *ocs) { @@ -905,7 +909,8 @@ EXPORT_SYMBOL_GPL(of_changeset_revert); * + OF_RECONFIG_ADD_PROPERTY * + OF_RECONFIG_REMOVE_PROPERTY, * + OF_RECONFIG_UPDATE_PROPERTY - * Returns 0 on success, a negative error value in case of an error. + * + * Return: 0 on success, a negative error value in case of an error. */ int of_changeset_action(struct of_changeset *ocs, unsigned long action, struct device_node *np, struct property *prop) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index ba53da9c3895..134c7fb43a14 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -282,7 +282,7 @@ static void reverse_nodes(struct device_node *parent) * @dad: Parent struct device_node * @nodepp: The device_node tree created by the call * - * It returns the size of unflattened device tree or error code + * Return: The size of unflattened device tree or error code */ static int unflatten_dt_nodes(const void *blob, void *mem, @@ -360,7 +360,7 @@ static int unflatten_dt_nodes(const void *blob, * fills the "name" and "type" pointers of the nodes so the normal device-tree * walking functions can be used. * - * Returns NULL on failure or the memory chunk containing the unflattened + * Return: NULL on failure or the memory chunk containing the unflattened * device tree on success. */ void *__unflatten_device_tree(const void *blob, @@ -441,7 +441,7 @@ static DEFINE_MUTEX(of_fdt_unflatten_mutex); * pointers of the nodes so the normal device-tree walking functions * can be used. * - * Returns NULL on failure or the memory chunk containing the unflattened + * Return: NULL on failure or the memory chunk containing the unflattened * device tree on success. */ void *of_fdt_unflatten_tree(const unsigned long *blob, @@ -716,7 +716,7 @@ const void *__init of_get_flat_dt_prop(unsigned long node, const char *name, * @node: node to test * @compat: compatible string to compare with compatible list. * - * On match, returns a non-zero value with smaller values returned for more + * Return: a non-zero value on match with smaller values returned for more * specific compatible values. */ static int of_fdt_is_compatible(const void *blob, diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 25d17b8a1a1a..352e14b007e7 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -48,7 +48,7 @@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map); * of_irq_find_parent - Given a device node, find its interrupt parent node * @child: pointer to device node * - * Returns a pointer to the interrupt parent node, or NULL if the interrupt + * Return: A pointer to the interrupt parent node, or NULL if the interrupt * parent could not be determined. */ struct device_node *of_irq_find_parent(struct device_node *child) @@ -81,14 +81,14 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent); * @addr: address specifier (start of "reg" property of the device) in be32 format * @out_irq: structure of_phandle_args updated by this function * - * Returns 0 on success and a negative number on error - * * This function is a low-level interrupt tree walking function. It * can be used to do a partial walk with synthetized reg and interrupts * properties, for example when resolving PCI interrupts when no device * node exist for the parent. It takes an interrupt specifier structure as * input, walks the tree looking for any interrupt-map properties, translates * the specifier for each map, and then returns the translated map. + * + * Return: 0 on success and a negative number on error */ int of_irq_parse_raw(const __be32 *addr, struct of_phandle_args *out_irq) { @@ -380,7 +380,7 @@ EXPORT_SYMBOL_GPL(of_irq_to_resource); * @dev: pointer to device tree node * @index: zero-based index of the IRQ * - * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or + * Return: Linux IRQ number on success, or 0 on the IRQ mapping failure, or * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case * of any other failure. */ @@ -407,7 +407,7 @@ EXPORT_SYMBOL_GPL(of_irq_get); * @dev: pointer to device tree node * @name: IRQ name * - * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or + * Return: Linux IRQ number on success, or 0 on the IRQ mapping failure, or * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case * of any other failure. */ @@ -447,7 +447,7 @@ int of_irq_count(struct device_node *dev) * @res: array of resources to fill in * @nr_irqs: the number of IRQs (and upper bound for num of @res elements) * - * Returns the size of the filled in table (up to @nr_irqs). + * Return: The size of the filled in table (up to @nr_irqs). */ int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int nr_irqs) @@ -602,7 +602,7 @@ static u32 __of_msi_map_id(struct device *dev, struct device_node **np, * Walk up the device hierarchy looking for devices with a "msi-map" * property. If found, apply the mapping to @id_in. * - * Returns the mapped MSI ID. + * Return: The mapped MSI ID. */ u32 of_msi_map_id(struct device *dev, struct device_node *msi_np, u32 id_in) { diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index c25679f7bd3f..d241273170fd 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -298,7 +298,7 @@ static struct property *dup_and_fixup_symbol_prop( * * Update of property in symbols node is not allowed. * - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if * invalid @overlay. */ static int add_changeset_property(struct overlay_changeset *ovcs, @@ -403,7 +403,7 @@ static int add_changeset_property(struct overlay_changeset *ovcs, * * NOTE_2: Multiple mods of created nodes not supported. * - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if * invalid @overlay. */ static int add_changeset_node(struct overlay_changeset *ovcs, @@ -475,7 +475,7 @@ static int add_changeset_node(struct overlay_changeset *ovcs, * * Do not allow symbols node to have any children. * - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if * invalid @overlay_node. */ static int build_changeset_next_level(struct overlay_changeset *ovcs, @@ -606,7 +606,7 @@ static int find_dup_cset_prop(struct overlay_changeset *ovcs, * the same node or duplicate {add, delete, or update} properties entries * for the same property. * - * Returns 0 on success, or -EINVAL if duplicate changeset entry found. + * Return: 0 on success, or -EINVAL if duplicate changeset entry found. */ static int changeset_dup_entry_check(struct overlay_changeset *ovcs) { @@ -630,7 +630,7 @@ static int changeset_dup_entry_check(struct overlay_changeset *ovcs) * any portions of the changeset that were successfully created will remain * in @ovcs->cset. * - * Returns 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if + * Return: 0 on success, -ENOMEM if memory allocation failure, or -EINVAL if * invalid overlay in @ovcs->fragments[]. */ static int build_changeset(struct overlay_changeset *ovcs) @@ -726,7 +726,7 @@ static struct device_node *find_target(struct device_node *info_node) * the top level of @tree. The relevant top level nodes are the fragment * nodes and the __symbols__ node. Any other top level node will be ignored. * - * Returns 0 on success, -ENOMEM if memory allocation failure, -EINVAL if error + * Return: 0 on success, -ENOMEM if memory allocation failure, -EINVAL if error * detected in @tree, or -ENOSPC if idr_alloc() error. */ static int init_overlay_changeset(struct overlay_changeset *ovcs, @@ -1181,7 +1181,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs) * If an error is returned by an overlay changeset post-remove notifier * then no further overlay changeset post-remove notifier will be called. * - * Returns 0 on success, or a negative error number. *ovcs_id is set to + * Return: 0 on success, or a negative error number. *ovcs_id is set to * zero after reverting the changeset, even if a subsequent error occurs. */ int of_overlay_remove(int *ovcs_id) @@ -1259,7 +1259,7 @@ EXPORT_SYMBOL_GPL(of_overlay_remove); * * Removes all overlays from the system in the correct order. * - * Returns 0 on success, or a negative error number + * Return: 0 on success, or a negative error number */ int of_overlay_remove_all(void) { diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 0ed46d301431..25d448f5af91 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -44,7 +44,7 @@ static const struct of_device_id of_skipped_node_table[] = { * Takes a reference to the embedded struct device which needs to be dropped * after use. * - * Returns platform_device pointer, or NULL if not found + * Return: platform_device pointer, or NULL if not found */ struct platform_device *of_find_device_by_node(struct device_node *np) { @@ -160,7 +160,7 @@ EXPORT_SYMBOL(of_device_alloc); * @platform_data: pointer to populate platform_data pointer with * @parent: Linux device model parent device. * - * Returns pointer to created platform device, or NULL if a device was not + * Return: Pointer to created platform device, or NULL if a device was not * registered. Unavailable devices will not get registered. */ static struct platform_device *of_platform_device_create_pdata( @@ -204,7 +204,7 @@ static struct platform_device *of_platform_device_create_pdata( * @bus_id: name to assign device * @parent: Linux device model parent device. * - * Returns pointer to created platform device, or NULL if a device was not + * Return: Pointer to created platform device, or NULL if a device was not * registered. Unavailable devices will not get registered. */ struct platform_device *of_platform_device_create(struct device_node *np, @@ -463,7 +463,7 @@ EXPORT_SYMBOL(of_platform_bus_probe); * New board support should be using this function instead of * of_platform_bus_probe(). * - * Returns 0 on success, < 0 on failure. + * Return: 0 on success, < 0 on failure. */ int of_platform_populate(struct device_node *root, const struct of_device_id *matches, @@ -607,7 +607,7 @@ static void devm_of_platform_populate_release(struct device *dev, void *res) * Similar to of_platform_populate(), but will automatically call * of_platform_depopulate() when the device is unbound from the bus. * - * Returns 0 on success, < 0 on failure. + * Return: 0 on success, < 0 on failure. */ int devm_of_platform_populate(struct device *dev) { diff --git a/drivers/of/property.c b/drivers/of/property.c index c000ed01db01..2046ae311322 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -61,9 +61,11 @@ EXPORT_SYMBOL(of_graph_is_present); * @elem_size: size of the individual element * * Search for a property in a device node and count the number of elements of - * size elem_size in it. Returns number of elements on sucess, -EINVAL if the - * property does not exist or its length does not match a multiple of elem_size - * and -ENODATA if the property does not have a value. + * size elem_size in it. + * + * Return: The number of elements on sucess, -EINVAL if the property does not + * exist or its length does not match a multiple of elem_size and -ENODATA if + * the property does not have a value. */ int of_property_count_elems_of_size(const struct device_node *np, const char *propname, int elem_size) @@ -95,8 +97,9 @@ EXPORT_SYMBOL_GPL(of_property_count_elems_of_size); * @len: if !=NULL, actual length is written to here * * Search for a property in a device node and valid the requested size. - * Returns the property value on success, -EINVAL if the property does not - * exist, -ENODATA if property does not have a value, and -EOVERFLOW if the + * + * Return: The property value on success, -EINVAL if the property does not + * exist, -ENODATA if property does not have a value, and -EOVERFLOW if the * property data is too small or too large. * */ @@ -129,7 +132,9 @@ static void *of_find_property_value_of_size(const struct device_node *np, * @out_value: pointer to return value, modified only if no error. * * Search for a property in a device node and read nth 32-bit value from - * it. Returns 0 on success, -EINVAL if the property does not exist, + * it. + * + * Return: 0 on success, -EINVAL if the property does not exist, * -ENODATA if property does not have a value, and -EOVERFLOW if the * property data isn't large enough. * @@ -161,7 +166,9 @@ EXPORT_SYMBOL_GPL(of_property_read_u32_index); * @out_value: pointer to return value, modified only if no error. * * Search for a property in a device node and read nth 64-bit value from - * it. Returns 0 on success, -EINVAL if the property does not exist, + * it. + * + * Return: 0 on success, -EINVAL if the property does not exist, * -ENODATA if property does not have a value, and -EOVERFLOW if the * property data isn't large enough. * @@ -196,12 +203,14 @@ EXPORT_SYMBOL_GPL(of_property_read_u64_index); * sz_min will be read. * * Search for a property in a device node and read 8-bit value(s) from - * it. Returns number of elements read on success, -EINVAL if the property - * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW - * if the property data is smaller than sz_min or longer than sz_max. + * it. * * dts entry of array should be like: - * property = /bits/ 8 <0x50 0x60 0x70>; + * ``property = /bits/ 8 <0x50 0x60 0x70>;`` + * + * Return: The number of elements read on success, -EINVAL if the property + * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW + * if the property data is smaller than sz_min or longer than sz_max. * * The out_values is modified only if a valid u8 value can be decoded. */ @@ -244,12 +253,14 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u8_array); * sz_min will be read. * * Search for a property in a device node and read 16-bit value(s) from - * it. Returns number of elements read on success, -EINVAL if the property - * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW - * if the property data is smaller than sz_min or longer than sz_max. + * it. * * dts entry of array should be like: - * property = /bits/ 16 <0x5000 0x6000 0x7000>; + * ``property = /bits/ 16 <0x5000 0x6000 0x7000>;`` + * + * Return: The number of elements read on success, -EINVAL if the property + * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW + * if the property data is smaller than sz_min or longer than sz_max. * * The out_values is modified only if a valid u16 value can be decoded. */ @@ -292,7 +303,9 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u16_array); * sz_min will be read. * * Search for a property in a device node and read 32-bit value(s) from - * it. Returns number of elements read on success, -EINVAL if the property + * it. + * + * Return: The number of elements read on success, -EINVAL if the property * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW * if the property data is smaller than sz_min or longer than sz_max. * @@ -331,7 +344,9 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u32_array); * @out_value: pointer to return value, modified only if return value is 0. * * Search for a property in a device node and read a 64-bit value from - * it. Returns 0 on success, -EINVAL if the property does not exist, + * it. + * + * Return: 0 on success, -EINVAL if the property does not exist, * -ENODATA if property does not have a value, and -EOVERFLOW if the * property data isn't large enough. * @@ -366,7 +381,9 @@ EXPORT_SYMBOL_GPL(of_property_read_u64); * sz_min will be read. * * Search for a property in a device node and read 64-bit value(s) from - * it. Returns number of elements read on success, -EINVAL if the property + * it. + * + * Return: The number of elements read on success, -EINVAL if the property * does not exist, -ENODATA if property does not have a value, and -EOVERFLOW * if the property data is smaller than sz_min or longer than sz_max. * @@ -408,10 +425,11 @@ EXPORT_SYMBOL_GPL(of_property_read_variable_u64_array); * return value is 0. * * Search for a property in a device tree node and retrieve a null - * terminated string value (pointer to data, not a copy). Returns 0 on - * success, -EINVAL if the property does not exist, -ENODATA if property - * does not have a value, and -EILSEQ if the string is not null-terminated - * within the length of the property data. + * terminated string value (pointer to data, not a copy). + * + * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if + * property does not have a value, and -EILSEQ if the string is not + * null-terminated within the length of the property data. * * The out_string pointer is modified only if a valid string can be decoded. */ @@ -775,7 +793,7 @@ EXPORT_SYMBOL(of_graph_get_remote_port_parent); * @node: pointer to a local endpoint device_node * * Return: Remote port node associated with remote endpoint node linked - * to @node. Use of_node_put() on it when done. + * to @node. Use of_node_put() on it when done. */ struct device_node *of_graph_get_remote_port(const struct device_node *node) { @@ -808,7 +826,7 @@ EXPORT_SYMBOL(of_graph_get_endpoint_count); * @endpoint: identifier (value of reg property) of the endpoint node * * Return: Remote device node associated with remote endpoint node linked - * to @node. Use of_node_put() on it when done. + * to @node. Use of_node_put() on it when done. */ struct device_node *of_graph_get_remote_node(const struct device_node *node, u32 port, u32 endpoint) diff --git a/include/linux/of.h b/include/linux/of.h index e9209ef44cc0..ef6b161d1f91 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -424,12 +424,14 @@ extern int of_detach_node(struct device_node *); * @sz: number of array elements to read * * Search for a property in a device node and read 8-bit value(s) from - * it. Returns 0 on success, -EINVAL if the property does not exist, - * -ENODATA if property does not have a value, and -EOVERFLOW if the - * property data isn't large enough. + * it. * * dts entry of array should be like: - * property = /bits/ 8 <0x50 0x60 0x70>; + * ``property = /bits/ 8 <0x50 0x60 0x70>;`` + * + * Return: 0 on success, -EINVAL if the property does not exist, + * -ENODATA if property does not have a value, and -EOVERFLOW if the + * property data isn't large enough. * * The out_values is modified only if a valid u8 value can be decoded. */ @@ -454,12 +456,14 @@ static inline int of_property_read_u8_array(const struct device_node *np, * @sz: number of array elements to read * * Search for a property in a device node and read 16-bit value(s) from - * it. Returns 0 on success, -EINVAL if the property does not exist, - * -ENODATA if property does not have a value, and -EOVERFLOW if the - * property data isn't large enough. + * it. * * dts entry of array should be like: - * property = /bits/ 16 <0x5000 0x6000 0x7000>; + * ``property = /bits/ 16 <0x5000 0x6000 0x7000>;`` + * + * Return: 0 on success, -EINVAL if the property does not exist, + * -ENODATA if property does not have a value, and -EOVERFLOW if the + * property data isn't large enough. * * The out_values is modified only if a valid u16 value can be decoded. */ @@ -485,7 +489,9 @@ static inline int of_property_read_u16_array(const struct device_node *np, * @sz: number of array elements to read * * Search for a property in a device node and read 32-bit value(s) from - * it. Returns 0 on success, -EINVAL if the property does not exist, + * it. + * + * Return: 0 on success, -EINVAL if the property does not exist, * -ENODATA if property does not have a value, and -EOVERFLOW if the * property data isn't large enough. * @@ -513,7 +519,9 @@ static inline int of_property_read_u32_array(const struct device_node *np, * @sz: number of array elements to read * * Search for a property in a device node and read 64-bit value(s) from - * it. Returns 0 on success, -EINVAL if the property does not exist, + * it. + * + * Return: 0 on success, -EINVAL if the property does not exist, * -ENODATA if property does not have a value, and -EOVERFLOW if the * property data isn't large enough. * @@ -1070,7 +1078,9 @@ static inline bool of_node_is_type(const struct device_node *np, const char *typ * @propname: name of the property to be searched. * * Search for a property in a device node and count the number of u8 elements - * in it. Returns number of elements on sucess, -EINVAL if the property does + * in it. + * + * Return: The number of elements on sucess, -EINVAL if the property does * not exist or its length does not match a multiple of u8 and -ENODATA if the * property does not have a value. */ @@ -1087,7 +1097,9 @@ static inline int of_property_count_u8_elems(const struct device_node *np, * @propname: name of the property to be searched. * * Search for a property in a device node and count the number of u16 elements - * in it. Returns number of elements on sucess, -EINVAL if the property does + * in it. + * + * Return: The number of elements on sucess, -EINVAL if the property does * not exist or its length does not match a multiple of u16 and -ENODATA if the * property does not have a value. */ @@ -1104,7 +1116,9 @@ static inline int of_property_count_u16_elems(const struct device_node *np, * @propname: name of the property to be searched. * * Search for a property in a device node and count the number of u32 elements - * in it. Returns number of elements on sucess, -EINVAL if the property does + * in it. + * + * Return: The number of elements on sucess, -EINVAL if the property does * not exist or its length does not match a multiple of u32 and -ENODATA if the * property does not have a value. */ @@ -1121,7 +1135,9 @@ static inline int of_property_count_u32_elems(const struct device_node *np, * @propname: name of the property to be searched. * * Search for a property in a device node and count the number of u64 elements - * in it. Returns number of elements on sucess, -EINVAL if the property does + * in it. + * + * Return: The number of elements on sucess, -EINVAL if the property does * not exist or its length does not match a multiple of u64 and -ENODATA if the * property does not have a value. */ @@ -1142,7 +1158,7 @@ static inline int of_property_count_u64_elems(const struct device_node *np, * Search for a property in a device tree node and retrieve a list of * terminated string values (pointer to data, not a copy) in that property. * - * If @out_strs is NULL, the number of strings in the property is returned. + * Return: If @out_strs is NULL, the number of strings in the property is returned. */ static inline int of_property_read_string_array(const struct device_node *np, const char *propname, const char **out_strs, @@ -1158,10 +1174,11 @@ static inline int of_property_read_string_array(const struct device_node *np, * @propname: name of the property to be searched. * * Search for a property in a device tree node and retrieve the number of null - * terminated string contain in it. Returns the number of strings on - * success, -EINVAL if the property does not exist, -ENODATA if property - * does not have a value, and -EILSEQ if the string is not null-terminated - * within the length of the property data. + * terminated string contain in it. + * + * Return: The number of strings on success, -EINVAL if the property does not + * exist, -ENODATA if property does not have a value, and -EILSEQ if the string + * is not null-terminated within the length of the property data. */ static inline int of_property_count_strings(const struct device_node *np, const char *propname) @@ -1181,7 +1198,8 @@ static inline int of_property_count_strings(const struct device_node *np, * Search for a property in a device tree node and retrieve a null * terminated string value (pointer to data, not a copy) in the list of strings * contained in that property. - * Returns 0 on success, -EINVAL if the property does not exist, -ENODATA if + * + * Return: 0 on success, -EINVAL if the property does not exist, -ENODATA if * property does not have a value, and -EILSEQ if the string is not * null-terminated within the length of the property data. * @@ -1201,7 +1219,8 @@ static inline int of_property_read_string_index(const struct device_node *np, * @propname: name of the property to be searched. * * Search for a property in a device node. - * Returns true if the property exists false otherwise. + * + * Return: true if the property exists false otherwise. */ static inline bool of_property_read_bool(const struct device_node *np, const char *propname) @@ -1447,7 +1466,7 @@ static inline int of_reconfig_get_state_change(unsigned long action, * of_device_is_system_power_controller - Tells if system-power-controller is found for device_node * @np: Pointer to the given device_node * - * return true if present false otherwise + * Return: true if present false otherwise */ static inline bool of_device_is_system_power_controller(const struct device_node *np) { From patchwork Thu Mar 25 16:47:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 408844 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp700178jai; Thu, 25 Mar 2021 09:48:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycwB3pYgBhEtO+4+FrVomO2ZclQdimStPqQWkrpY48INYZkg5Mmcp3izjt8nfVz085gR8A X-Received: by 2002:aa7:c857:: with SMTP id g23mr10203172edt.86.1616690910603; Thu, 25 Mar 2021 09:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616690910; cv=none; d=google.com; s=arc-20160816; b=elGMC7huMhqTHTWX/vEaAel38CTVL9eSp0G5gouo8MvZDuWjYsEjC1a6ahSwQJiT14 1CocOYt2WGEDZ9U51oFMlJM8xkLULslX8ZTrUYYuVYq5wd+nhZtEsKVXe2wQvHKNbhCW /498SXBzgJfDs5304riLi50BNJx0ys8wjt2go5Fna7AQchqElyL6N/1DAbmwBbpoZ+yn 5ebzzgZIuAWqIsdt7WYHxM50ai7OEVY3j9Xk99kQiIeDHp7S08gqM0TxTyQEAgvyytNB d8GIG2qxf8iRPaxNQk7RyuM84PDH1BuSmG+ibdC4ym6zdY3l4pkzDvFmmsYt61y7mJGW MqNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1O1E/xRwZme5NOHcXojTDxawVUZizZj5kgRyChIK9Ao=; b=0up0QuR1FpmzariQuq2IWDLDal6iYmGKExe5VRs7Z0G6J71+1aKr2E9KK6z2yd3fg+ BV8hnS01tGj7O0x5Gmx+5ddYqmaPA+MPlgvpErJjxeDXIAnwPqVnw5pxCAMu711EeF8G xnILm2Q/1s7j3FsO629wWhT37HIql3nJxVnbCwW56/gGTE6vMU7tnlEky3DMqdS03kmy zO2QXIxCXRRxULkKjTV4aHPTIGBrI3shaRFh5bCkxWzYHSOj5SFRRmltZHuRtE+5xVjt vGP+PMsuLUqJ+l4Q9pzSRhEFHH5bPkCRJ7xLkefz7zVSEhU5W2v4pH3K3tjii4YP0eqx w6oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si4498477edu.503.2021.03.25.09.48.30; Thu, 25 Mar 2021 09:48:30 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S229993AbhCYQr4 (ORCPT + 6 others); Thu, 25 Mar 2021 12:47:56 -0400 Received: from mail-il1-f180.google.com ([209.85.166.180]:34773 "EHLO mail-il1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbhCYQrt (ORCPT ); Thu, 25 Mar 2021 12:47:49 -0400 Received: by mail-il1-f180.google.com with SMTP id u2so2693350ilk.1; Thu, 25 Mar 2021 09:47:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1O1E/xRwZme5NOHcXojTDxawVUZizZj5kgRyChIK9Ao=; b=sfi7ror6M6j9nyTvcoRvlWfNcETGxKZaeUeJtcOY1SOnTUmKBhzakvuSGzT0IfPxxl beEfrwA+u2bm+8jQE/+yDv6jWvXs1049j0lv7fQ7tsAELZ7qn1XJvC+BrpPn8l6IMh9G nwYDhFEz4MP/6gJSO28dpkGSoWUfLfM3KliIjCXarWhClpVAK1lEIattqqlOhi+mk8yN /Wunr4bdbGXJU1XknqA+zCOxhiLzqXMeWDRVklOtBXw+fWYVTb77RiA6LAUEH9/gIZ7z OSqhWIW48NxO+vIna50tiFAHd7cLOw4uWrM1X01uSSWNE2yiwOXN7WlzNaghFYlhM8x3 uVPw== X-Gm-Message-State: AOAM5326XItPh+mNexOp7fxztIrmwm4alh3nCyIYoPeycmMAd3ZYtQfC 7Q4jaYmBBraPFHIsv9OnaBqxeVB5rg== X-Received: by 2002:a05:6e02:1d9b:: with SMTP id h27mr7501787ila.279.1616690868432; Thu, 25 Mar 2021 09:47:48 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.253]) by smtp.googlemail.com with ESMTPSA id h13sm2868615ila.82.2021.03.25.09.47.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Mar 2021 09:47:47 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Frank Rowand , Lee Jones , Mauro Carvalho Chehab , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH 8/8] docs: dt: Add DT API documentation Date: Thu, 25 Mar 2021 10:47:13 -0600 Message-Id: <20210325164713.1296407-9-robh@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210325164713.1296407-1-robh@kernel.org> References: <20210325164713.1296407-1-robh@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The kernel-doc for the DT APIs are not included in the documentation build. Add them. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring --- Documentation/devicetree/index.rst | 1 + Documentation/devicetree/kernel-api.rst | 57 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Documentation/devicetree/kernel-api.rst -- 2.27.0 Reviewed-by: Mauro Carvalho Chehab diff --git a/Documentation/devicetree/index.rst b/Documentation/devicetree/index.rst index 70b5dcdbcf07..1a2fc8014996 100644 --- a/Documentation/devicetree/index.rst +++ b/Documentation/devicetree/index.rst @@ -11,6 +11,7 @@ Kernel Devicetree Usage usage-model of_unittest + kernel-api Devicetree Overlays =================== diff --git a/Documentation/devicetree/kernel-api.rst b/Documentation/devicetree/kernel-api.rst new file mode 100644 index 000000000000..b7429e6ed6d5 --- /dev/null +++ b/Documentation/devicetree/kernel-api.rst @@ -0,0 +1,57 @@ +.. SPDX-License-Identifier: GPL-2.0 +.. _devicetree: + +====================================== +DeviceTree Kernel API +====================================== + +Core functions +-------------- + +.. kernel-doc:: drivers/of/base.c + :export: + +.. kernel-doc:: include/linux/of.h + :internal: + +.. kernel-doc:: drivers/of/property.c + :export: + +.. kernel-doc:: include/linux/of_graph.h + :internal: + +.. kernel-doc:: drivers/of/address.c + :export: + +.. kernel-doc:: drivers/of/irq.c + :export: + +.. kernel-doc:: drivers/of/fdt.c + :export: + +Driver model functions +---------------------- + +.. kernel-doc:: include/linux/of_device.h + :internal: + +.. kernel-doc:: drivers/of/device.c + :export: + +.. kernel-doc:: include/linux/of_platform.h + :internal: + +.. kernel-doc:: drivers/of/platform.c + :export: + +Overlay and Dynamic DT functions +-------------------------------- + +.. kernel-doc:: drivers/of/resolver.c + :export: + +.. kernel-doc:: drivers/of/dynamic.c + :export: + +.. kernel-doc:: drivers/of/overlay.c + :export: