Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp897508ybp; Fri, 11 Oct 2019 06:11:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxs5NDBdWhAsooHzUTBo5EWvh0hTkQJf5/RQPD6MGAL/5l4y4aNeOXZ+9IpOKs3aQEe7Sjj X-Received: by 2002:a05:6402:7d7:: with SMTP id u23mr13385251edy.218.1570799466914; Fri, 11 Oct 2019 06:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570799466; cv=none; d=google.com; s=arc-20160816; b=U68aSX+QDKlvUYBGpNc2XVF9zl8oGmd6F/yDUQB8MRdU9Zot9C9zMBKzAP0ESCUAul 7ah7azhtv5/nPx0vvpjJhoOmg6Bqkin58XxN8FImWwjlkKksQf4a/t/tWp2Ajm6JqP8h bTAEiYicpEp2KC+S+QA5ph9R/Y1cFXYigqlX7gMXntCXeVL9VkxhLMKCpI+LCG5c6Y5t D6mFnbF7J2Le1nNDAfsUC5BeXT1Mqq77Yb8x4GJntPTVuR0hugAEQC1UQz6x10kO0kmf 3zlr9JfMlJDsZ70+vruwqJ2POT9jzcUCCzgkikeVGcKso3P/HYsJAquQrQchKzDvFNBD fz8g== 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=emcJkbiLu3r2aJUJMXuk+JlPciuPhdB5hKbfL02U1Nw=; b=Z+GSjT2SAXDAumW/Am3CxFcjRO2dQf2Fo+Es38PsORw3EcrCfkXIg9mcviFp6Cekak cKyNk77ClN9LZbYLEzXmkrkDjfbNODRqwVmcfbVXNYag2+HojDx1HR0Q9qc0BEoMaZQm wMt1p4LPDhMBnsjfS0lqtpZNOR8wTQbkjA4FG98oNL+cWgSKOhl8RVcubsYcAFonbgX0 iTfuyWd36xgT6YY85shLVfrZ/39CaHdwwWg+XaUt+PBXZc3H0S7aTZAcAqS/WL0YslBK V8Oj6izkQhbZLrnPtVYq9qQG8bhN9tlmQ3UJIdoVJGDEoVZUhSm2JGECeDSc+VFB+xab FprQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=f5el+5Dn; 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 f43si6549784edf.422.2019.10.11.06.10.41; Fri, 11 Oct 2019 06:11:06 -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=f5el+5Dn; 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 S1728248AbfJKNKg (ORCPT + 99 others); Fri, 11 Oct 2019 09:10:36 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:58764 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728165AbfJKNKf (ORCPT ); Fri, 11 Oct 2019 09:10:35 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9BD1KxH020165; Fri, 11 Oct 2019 15:10:23 +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=emcJkbiLu3r2aJUJMXuk+JlPciuPhdB5hKbfL02U1Nw=; b=f5el+5Dnm2ccge2r0zqzQrevdggKEtx0JSrlGaI42QWQFiPxJMOZb+mqARdTA8Ut8ynW IijfneV6zar49/RLjzvLQSzKR4rvYDbKs7vWnU0CBbBMTlRVsPd7G9lZfj6EpyM8HIYd Ihl179sBI7mLxs+9mZpkBRJU2LN5OE8QLZrI8kPCjovO86/xSVoegwmf74tdmX+jrGM4 968JERZuYCRubMIczhNYzyQTt2lJg/JH4od0ccGvcr3FebH9MFnjyiSCcedwBNGbiXQZ 1EDW84PN7djfoiUwmz9jUh3msBCwbdyjRQTDOH6mwWbbYzGOHyzNw6x/8//srDjdY3z1 XQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2vegn19yt6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2019 15:10:23 +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 B7381100034; Fri, 11 Oct 2019 15:10:22 +0200 (CEST) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 9CAB12BEC48; Fri, 11 Oct 2019 15:10:22 +0200 (CEST) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 11 Oct 2019 15:10:22 +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; Fri, 11 Oct 2019 15:10:21 +0200 From: Benjamin Gaignard To: , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2] dt-bindings: hwlock: Convert stm32 hwspinlock bindings to json-schema Date: Fri, 11 Oct 2019 15:10:18 +0200 Message-ID: <20191011131018.24035-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-11_08:2019-10-10,2019-10-11 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 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..da4722bb8c38 --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/st,stm32-hwspinlock.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: 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