Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4296818ybp; Mon, 14 Oct 2019 02:19:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVTetzpzigFLubDEGflmJLWiYVFTY9ANjT2zJp6pr88Pm8kKaemVXorKlXRXEbBzd5DF+o X-Received: by 2002:a17:906:7e17:: with SMTP id e23mr20181777ejr.205.1571044750589; Mon, 14 Oct 2019 02:19:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571044750; cv=none; d=google.com; s=arc-20160816; b=KP/jdvToOs8c+ZwkRfGsSh26l+NKqhaDqUEum33oLxWh5O0YqgwJ6LdQHy4v+l4zGi 6fhfuzbDL/WDsC3872bggWFjEahryTT7SkXlvklLHhMLHSsIdcTHfQXeSMm4HFKbMcpr Ozfq39W4OWLz+V1ds1BI0zBYcmpO2rnUTphEP5o+tHQKxVC7CXbFSL0pcLaUxugS0LMW nSa5GNDPdbza64bKCfXS2Vwm1H2LjS4rMYfHBSaQM1EpzVrfJWNnwFIrP0Eo12AoB35c 9Ldj8u9eYSKYLZqnxuxQ62SssKqKW4Kv1y/mUhpNcLH+DViRhSeYGOk23cnxmazW6HFY MQBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=rppez0TLqKr7YkVENE3vEAgH7KKEnoklKwSXeMW5hE0=; b=E34Nnjxmm0J0dYHELgyQHmMBaqKLDrhbS/clgiDneobb11pzIStig8IFdEOSYYIPMB AXQrB57AMzR0ft6HKX+xaBz6ykMxi4cDI+Mf/WwRGh/ZnWMF5sPetD0yMAdSyHulQCD8 abOJaUaMO46/o0bB5SZcWpA/CXO57nxyu6DyhQRt+D2KXQdj5bqtpSKsNuaRpfnFvyXB XM5C4M12Vl1je2T+RY3vqGOyfzQ2KIGlJBxpjXGQu43H1mLU4hM+xNlwVVpOjBRmz9yd DQ82E/1DGNEz60b+d/AQujmBlzxCy7ZYVleAnarjYXK1rz/VGji0trmSBu4BnA7YzlEa LLcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=DFNYV5Mt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3si10742416ejs.439.2019.10.14.02.18.47; Mon, 14 Oct 2019 02:19:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=DFNYV5Mt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730804AbfJNJSM (ORCPT + 99 others); Mon, 14 Oct 2019 05:18:12 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:22188 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730713AbfJNJSL (ORCPT ); Mon, 14 Oct 2019 05:18:11 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9E9BgUs022240; Mon, 14 Oct 2019 11:18:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=rppez0TLqKr7YkVENE3vEAgH7KKEnoklKwSXeMW5hE0=; b=DFNYV5MtpvRsSZAzHlfLc3B0+XEKkNJ683+vDjSCDB5bEq+3raU1dQD28YpkeH4ae1Vu E9y1Vv1nFom+CJ94Q/9ckj1kLS/8VGN6add2+FpjlZC1ttG5d+dikLUUGwHs/Q/qt2xX NYaD3gXOi6/cmY81B4prQAOdj0YcdineO3Vm5db+xLkJwhSdRzK3e5c7Hm4EPvOxOv/i p8WeC0vK06qr3x3+OqmirefnVyH9sNgGputS8z54QDak5w97yY8DZoQiVCWQ3BOMM5+j oAg9akOy1ld+TuEomQAq8TCCN3owcghIIi5+1sbpWCDb2gq9x3n4pE2Tp15agQXNCzxi jQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2vk3y9hrrm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Oct 2019 11:18:01 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1F40A10003A; Mon, 14 Oct 2019 11:17:59 +0200 (CEST) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0D3A42B8C52; Mon, 14 Oct 2019 11:17:59 +0200 (CEST) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 14 Oct 2019 11:17:59 +0200 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 14 Oct 2019 11:17:58 +0200 From: Benjamin Gaignard To: , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v3] dt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema Date: Mon, 14 Oct 2019 11:17:56 +0200 Message-ID: <20191014091756.23763-1-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-14_06:2019-10-10,2019-10-14 signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the STM32 hwspinlock binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard --- change in v3: - use (GPL-2.0-only OR BSD-2-Clause) change in v2: - use BSD-2-Clause license - use const for #hwlock-cells - add additionalProperties: false .../bindings/hwlock/st,stm32-hwspinlock.txt | 23 ---------- .../bindings/hwlock/st,stm32-hwspinlock.yaml | 50 ++++++++++++++++++++++ 2 files changed, 50 insertions(+), 23 deletions(-) delete mode 100644 Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.txt create mode 100644 Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml diff --git a/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.txt deleted file mode 100644 index adf4f000ea3d..000000000000 --- a/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.txt +++ /dev/null @@ -1,23 +0,0 @@ -STM32 Hardware Spinlock Device Binding -------------------------------------- - -Required properties : -- compatible : should be "st,stm32-hwspinlock". -- reg : the register address of hwspinlock. -- #hwlock-cells : hwlock users only use the hwlock id to represent a specific - hwlock, so the number of cells should be <1> here. -- clock-names : Must contain "hsem". -- clocks : Must contain a phandle entry for the clock in clock-names, see the - common clock bindings. - -Please look at the generic hwlock binding for usage information for consumers, -"Documentation/devicetree/bindings/hwlock/hwlock.txt" - -Example of hwlock provider: - hwspinlock@4c000000 { - compatible = "st,stm32-hwspinlock"; - #hwlock-cells = <1>; - reg = <0x4c000000 0x400>; - clocks = <&rcc HSEM>; - clock-names = "hsem"; - }; diff --git a/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml b/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml new file mode 100644 index 000000000000..47cf9c8d97e9 --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwlock/st,stm32-hwspinlock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Hardware Spinlock bindings + +maintainers: + - Benjamin Gaignard + - Fabien Dessenne + +properties: + "#hwlock-cells": + const: 1 + + compatible: + const: st,stm32-hwspinlock + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: hsem + +required: + - "#hwlock-cells" + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + hwspinlock@4c000000 { + compatible = "st,stm32-hwspinlock"; + #hwlock-cells = <1>; + reg = <0x4c000000 0x400>; + clocks = <&rcc HSEM>; + clock-names = "hsem"; + }; + +... -- 2.15.0