Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3101272imc; Wed, 13 Mar 2019 08:52:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxosGmz23LE7kJ79mmClHUS3zHg+XYI3fKshRmyIG1YKwCn/TDEpr9ZXM1GDxcS1249I4uu X-Received: by 2002:a62:e103:: with SMTP id q3mr10325494pfh.45.1552492327171; Wed, 13 Mar 2019 08:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552492327; cv=none; d=google.com; s=arc-20160816; b=tWFT0dbZl3JQ4Yc4bxxlput0A4OVzs0efyHkDZv9E9EuyAMtaIafeF8r2ksqXIqHp+ aqJJNBjGhIER7xtEn2z1hhgTb/x3wxr4haEz1WRQwlfkBiTT0gcgYjsQ5b1l0q9n/35z 3cR1Ljkaxi4iV4OjQzSlIuR6eefDBdyIAZO/C55pwvNVnK5XrMzvgR0aovDWcE9UDxMU NPvdkp9n36BFD+UTCJOFQdEZlzZD2Fyr98d3Bh1BR+KiPgcIQzUkdeKJHTN7Sq8y+MF3 P0XW9U6zotFNT+wWqD15VraqanqGI++zUMum33NdL7CfIHn34inQlUNYCcBDzubXUOAz VKfw== 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; bh=BqB+LfbZYdOHq0CE0WHZAHBzvNxalgob+u6Si+BnAqs=; b=gw5gUP4omR6PlciNULfxhlvWUKNiayOPV+SxGZtKg2jVyeWSV3Tos46trRYX0EmpYb 2SpCIuAUs0ZVXM+NWxOdAf7wMMipPyWhLhERi3OwCkDEgzwoKqSECLEFIFlJfjFwQvW4 g9XIFSIO5dx6BolBKqoNzccxfQVbA4PX5L2AiFHJPy5qwtAXINuF4ftnJm68rO9fE3xW fmkGjOfr1LBgDRYzZidtoYLRepSETCIdqVl5fXFncVuMjfK7mAFi83daJq3NK8Dca7Yx +1XU/sxHpp1jZO2Du8ckWazLHEQc18sI31CMRXkrEpizdEXAvoUYNOtrqSv7UcXDJG7M pgZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 f40si11238547plb.339.2019.03.13.08.51.51; Wed, 13 Mar 2019 08:52:07 -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; 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 S1726730AbfCMPvZ (ORCPT + 99 others); Wed, 13 Mar 2019 11:51:25 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:47042 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726074AbfCMPvU (ORCPT ); Wed, 13 Mar 2019 11:51:20 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2DFp5Kb012434; Wed, 13 Mar 2019 16:51:05 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2r458mjyf1-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 13 Mar 2019 16:51:05 +0100 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 C82E038; Wed, 13 Mar 2019 15:51:02 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A2A8953EF; Wed, 13 Mar 2019 15:51:02 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.435.0; Wed, 13 Mar 2019 16:51:02 +0100 Received: from localhost (10.201.23.25) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 13 Mar 2019 16:51:02 +0100 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 1/6] dt-bindings: hwlock: add support of shared locks Date: Wed, 13 Mar 2019 16:50:32 +0100 Message-ID: <1552492237-28810-2-git-send-email-fabien.dessenne@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1552492237-28810-1-git-send-email-fabien.dessenne@st.com> References: <1552492237-28810-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-03-13_09:,, 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 --- .../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