Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1401645imm; Thu, 5 Jul 2018 22:38:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdFtVddrIBvsIghzgR0+JUjBoASx/EEaSaORDTRSg5jBJ+6BAMc1YPzVcEXHshAph3mUoTH X-Received: by 2002:a65:64c8:: with SMTP id t8-v6mr2065589pgv.110.1530855508762; Thu, 05 Jul 2018 22:38:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530855508; cv=none; d=google.com; s=arc-20160816; b=XmEMKvdkEkeBex+Syn6mesxCKBvxbSAE3kQIP/j2SOcqx95/SURruAsfg7muqQyM4Z WGPs3JMtSo/K45hsgT7HosM9+OCI95QQknx/vFHiXbKee/9/74wD2VpAFidmSCdnBuC2 3tnXaf7HThCl2QUo/zVFBIsnK5tqIPo4MQ3txrDd42oGSpdLSWDqbcqWhxl0hjROrd5R fbq6YvfNV7Q0Glcfl7JW5uSk29Zyno/uKMwVs63zzZI6dIH+wLzUk4CJHsCmcw/38Sct 8c5XR1BOu2wZcxbjx7U3uK5mrwRsoU4WUB0S/kD8lIIGt7EuD8bjZwO/mGFZ1V8fo+Q/ /mMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=pqau245Acxpacg3GSQaoFuj5PxBP4uztyfTFb60q0yQ=; b=Lms5DNBMvu1A3wJd1gHy2nskBrJ8fVM7qnL1xxGKYmcMpfw4Swc5j9pEeqPSJ2IvcW 41xlgIBiK8lun51a4n/h8Vejuy/nchr2MPrruJaVep9YEP8N+W2dOWlih1qsiqwcG0GQ VUf6zCsBoMeoQKCTga3kllcIA0xJ70QiK7CBNMXkDD7zPTja4zFhjwy5ByVGuqChdlND +3yhMjG6/4QvctF8lMGDD29boZKw3BZqMZsx2xGIgtOwYLtA5aGOmwbLzdimNpD8SaQ+ ubEoIoUhZv42LcRJVPxpo7ZxI6Eet2kMbyNOu6XudbKYK0DVFwAv9CDEvXGp76xcRWMo flUA== 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 e16-v6si6820925pgv.561.2018.07.05.22.38.14; Thu, 05 Jul 2018 22:38:28 -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 S932780AbeGFFhJ (ORCPT + 99 others); Fri, 6 Jul 2018 01:37:09 -0400 Received: from mail.bugwerft.de ([46.23.86.59]:37586 "EHLO mail.bugwerft.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932199AbeGFFgC (ORCPT ); Fri, 6 Jul 2018 01:36:02 -0400 Received: from localhost.localdomain (pD95EF57F.dip0.t-ipconnect.de [217.94.245.127]) by mail.bugwerft.de (Postfix) with ESMTPSA id 2A3A728DBF7; Fri, 6 Jul 2018 05:35:57 +0000 (UTC) From: Daniel Mack To: zbr@ioremap.net, robh+dt@kernel.org, mark.rutland@arm.com, szabolcs.gyurko@tlt.hu Cc: sre@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, robert.jarzmik@free.fr, Daniel Mack Subject: [PATCH v4 1/5] dt-bindings: w1: document generic onewire bindings Date: Fri, 6 Jul 2018 07:35:48 +0200 Message-Id: <20180706053552.11438-2-daniel@zonque.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180706053552.11438-1-daniel@zonque.org> References: <20180706053552.11438-1-daniel@zonque.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds a generic w1 bindings document that describes how w1 slave deviceses are grouped under master nodes. It also augments the existing w1-gpio.txt document a bit. Signed-off-by: Daniel Mack --- .../devicetree/bindings/w1/w1-gpio.txt | 11 +++++--- Documentation/devicetree/bindings/w1/w1.txt | 25 +++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 Documentation/devicetree/bindings/w1/w1.txt diff --git a/Documentation/devicetree/bindings/w1/w1-gpio.txt b/Documentation/devicetree/bindings/w1/w1-gpio.txt index 6e09c35d9f1a..3d6554eac240 100644 --- a/Documentation/devicetree/bindings/w1/w1-gpio.txt +++ b/Documentation/devicetree/bindings/w1/w1-gpio.txt @@ -13,10 +13,15 @@ Optional properties: - linux,open-drain: if specified, the data pin is considered in open-drain mode. +Also refer to the generic w1.txt document. + Examples: - onewire@0 { + onewire { compatible = "w1-gpio"; - gpios = <&gpio 126 0>, <&gpio 105 0>; - }; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + battery { + // ... + }; + }; diff --git a/Documentation/devicetree/bindings/w1/w1.txt b/Documentation/devicetree/bindings/w1/w1.txt new file mode 100644 index 000000000000..05f26b27d898 --- /dev/null +++ b/Documentation/devicetree/bindings/w1/w1.txt @@ -0,0 +1,25 @@ +Generic devicetree bindings for onewire (w1) busses +=================================================== + +Onewire busses are described through nodes of their master bus controller. +Slave devices are listed as sub-nodes of such master devices. For now, only +one slave is allowed per bus master. + + +Example: + + charger: charger { + compatible = "gpio-charger"; + charger-type = "mains"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + onewire { + compatible = "w1-gpio"; + gpios = <&gpio 100 0>, <&gpio 101 0>; + + battery { + compatible = "maxim,ds2760"; + power-supplies = <&charger>; + }; + }; -- 2.17.1