Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1590939yba; Thu, 25 Apr 2019 02:20:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3KIx0G8elxnW8z3oElASMimmc/bQZoY2Nb2Vm1lP46KUfyI0YmG+dP44aQ198p+YAwjzW X-Received: by 2002:a63:e818:: with SMTP id s24mr36392771pgh.190.1556184054353; Thu, 25 Apr 2019 02:20:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556184054; cv=none; d=google.com; s=arc-20160816; b=lx3OjFA/0uzTeEBcPPjbT4Q+VZrRpxhGhB4FFiwkR3e02CqNkHcaNNFfRiahJKgMWM CUZpVQwUJjy1OsYyKzupA4KNYXi4INtQNj0ZXG/AR4U76g/EmhrzlrynTYAjV9bXyB8P 1vsMhlI3W/E7Gez+CuaUmlale+8t2lsKfv7VP2o7qUt6YRmVJyRsiRLj+us44yVw0pVe b3w+mErcY9a/CBa+0PxA3pUyVI2UjM7vYGIpPyZIxiIqPZNjIDuk0P4A+zQ3Z3vun26z bcAFdcHTmNrBYo/POvQ5Aa4j8Zc30107yqxhBri3Cqc4YZOw9MoDTOB122X/x2+QvD5Y /hDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YxS1CmFL4QUjGza2F9ElVAd/BnjMK/K8FnWYOu39aEY=; b=GHLN/aZ5YcPwU7povB1SMZes7630HCx2N/JlATlCVubx0gdG2kYkHDCdtT5zzkh3oo VkYgnfbdKd/LgDF94SAVqaWCRMjUQISI9wB1JQwi/MHuCw+96Qzd7l0g/wsn0tu5n06w 0xYPf2KWXdmtWGbvmULIJ/9QDaLSFQC/NqDylzqqIZLOUXp9hLWo7lOfUUFyreTCRFVy RjbaxQd8QCjfnP2XUtSrkkB1k4KPoijwkkphoSvV9aOuHBjor5vglRgk3Rw19VIr1jZT KKXot1idd7QXklhD6y5FM8hnv8vAjvtiK2NrprqdjkkUD4UUq4wqNNEd4ftjvpm/3P9f m8RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=CKcL4ouO; 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 f6si10863048pgm.533.2019.04.25.02.20.38; Thu, 25 Apr 2019 02:20:54 -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=CKcL4ouO; 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 S1728064AbfDYJRt (ORCPT + 99 others); Thu, 25 Apr 2019 05:17:49 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:37911 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbfDYJRr (ORCPT ); Thu, 25 Apr 2019 05:17:47 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3P91Rgv023616; Thu, 25 Apr 2019 11:17:31 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=YxS1CmFL4QUjGza2F9ElVAd/BnjMK/K8FnWYOu39aEY=; b=CKcL4ouOzvK6j6Z3lB1aJDZeXhk4CLwcPkktnry9uxvq8ZSdCogCTERnNiXRgcYvfP9g 0iqjMC35nMDV07nmBhN2ohR2ojdU9n6gAu8DFGh8/4OCj3q9VRh/jqnxlfWVTLb9lf7m Wo7oN4OEVSwrh+V8xq1zjUOu+XD0Pch9JJxhdwb9haN1XcXJdn7/XoRI91Hrj6xBfNXn kI1OTQ3gBBG3XFsQrcjv1b0G0Wcjytpb38/Ui80xMl1EROsRVrnwlkyJe+uQNFBVbmdO MfOYhQ+hg/HhZoCwUIrRvNeE0Y038caYMUb1ajdKQNbmOKo+4LUTpkep0fNmY3YZa/Td +w== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2rys6s2m27-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 25 Apr 2019 11:17:31 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0A91334; Thu, 25 Apr 2019 09:17:31 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D0A791615; Thu, 25 Apr 2019 09:17:30 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 25 Apr 2019 11:17:30 +0200 Received: from localhost (10.201.23.25) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 25 Apr 2019 11:17:30 +0200 From: Fabien Dessenne To: Ohad Ben-Cohen , Bjorn Andersson , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue , Jonathan Corbet , , , , , , CC: Fabien Dessenne , Benjamin Gaignard Subject: [PATCH v2 1/6] dt-bindings: hwlock: add support of shared locks Date: Thu, 25 Apr 2019 11:17:18 +0200 Message-ID: <1556183843-28033-2-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556183843-28033-1-git-send-email-fabien.dessenne@st.com> References: <1556183843-28033-1-git-send-email-fabien.dessenne@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.25] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-25_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use #hwlock-cells value to define whether the locks can be shared by several users. Signed-off-by: Fabien Dessenne Reviewed-by: Rob Herring --- .../devicetree/bindings/hwlock/hwlock.txt | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/hwlock/hwlock.txt b/Documentation/devicetree/bindings/hwlock/hwlock.txt index 085d1f5..e98088a 100644 --- a/Documentation/devicetree/bindings/hwlock/hwlock.txt +++ b/Documentation/devicetree/bindings/hwlock/hwlock.txt @@ -13,7 +13,7 @@ hwlock providers: Required properties: - #hwlock-cells: Specifies the number of cells needed to represent a - specific lock. + specific lock. Shall be 1 or 2 (see hwlocks below). hwlock users: ============= @@ -27,6 +27,11 @@ Required properties: #hwlock-cells. The list can have just a single hwlock or multiple hwlocks, with each hwlock represented by a phandle and a corresponding args specifier. + If #hwlock-cells is 1, all of the locks are exclusive + (cannot be used by several users). + If #hwlock-cells is 2, the value of the second cell + defines whether the lock is for exclusive usage (0) or + shared (1) i.e. can be used by several users. Optional properties: - hwlock-names: List of hwlock name strings defined in the same order @@ -46,14 +51,22 @@ of length 1. ... }; -2. Example of a node using multiple specific hwlocks: +2. Example of nodes using multiple and shared specific hwlocks: -The following example has a node requesting two hwlocks, a hwlock within -the hwlock device node 'hwlock1' with #hwlock-cells value of 1, and another -hwlock within the hwlock device node 'hwlock2' with #hwlock-cells value of 2. +The following example has a nodeA requesting two hwlocks: +- an exclusive one (#hwlock-cells = 1) within the hwlock device node 'hwlock1' +- a shared one (#hwlock-cells = 2, second cell = 1) within the hwlock device + node 'hwlock2'. +The shared lock is also be used by nodeB. - node { + nodeA { ... - hwlocks = <&hwlock1 2>, <&hwlock2 0 3>; + hwlocks = <&hwlock1 2>, <&hwlock2 0 1>; ... }; + + nodeB { + ... + hwlocks = <&hwlock2 0 1>; + ... + }; \ No newline at end of file -- 2.7.4