From patchwork Thu Apr 1 17:41:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 413643 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp773398jai; Thu, 1 Apr 2021 10:52:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjHOm/o2jXVdi+I+aW5aUIRhYOFdN3u8D6KqImd4fFUUDOXcm81saKchAU6Yyy1NNv5f/C X-Received: by 2002:a17:906:b4c:: with SMTP id v12mr10399291ejg.330.1617299551821; Thu, 01 Apr 2021 10:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617299551; cv=none; d=google.com; s=arc-20160816; b=YsmwElx3DF32a4LnV2aQsIp6imentJIsEU5EbRu20MCM0AKAYUmssFQxqi+2KKR+7m 6juRg2gRCDg+yXK9hI/7wwmHjEQnWfWog1M/U5hHItY/LMVUu92/kWC1dXweAafv951R CzWnEhTjBDywvtBp3j1rzZxRWlHlrmg8A1KlJvNpNsvvnwKBRLX2R0dilVm/dUynFBg8 KJTpRaVJq+8hsQe+9aDWJhaaiYlnTHc+/b3gpKDwMbJMlRuUIiXlVJ4wvhFfnBEkt5QT nitm0Q8JpODjEFL0q7sUTwy+448JDRcdMt1VT95bQZA3kpaA5/2wnta4cb0tDgfopjwK OYng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=93Hbya7ehcSI4h4ne3u48dXxwwVmGYhXDMHOQV3L/ng=; b=QHHQ7B/ecE3qhofGWsQ91qnnm1Xc3exXh+9flCVvh8exG72ahefOQVihqNPpPe6e9+ VIEIuT5xayNBFbLL7g/L5oaUQGZQ0eluR6ZT08aBSapCrBnRrMyWKebbkympykp0eksF NpVsTNcYc1g9kDpziaz28meQ7gkoDGUhBiSUf5VinWHRamvDiCJxZD6Om6Gj8WnFBxsw bgbzute+t0lGyYiQLP03lBFIM0VpY6B3GC4zbLUUya8ShUOWLxt3MSzYiKoT62R2KX6v Ruhr3QpDjfJm58mx29V0Vo1I1PyE1EOcX8I2dVUFOxJZUp9dMhuFtKnq2vUlgcGAq4Nb UR6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TwRzHuU4; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp39si4446275ejc.182.2021.04.01.10.52.31; Thu, 01 Apr 2021 10:52:31 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TwRzHuU4; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234509AbhDARwX (ORCPT + 6 others); Thu, 1 Apr 2021 13:52:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:45218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236464AbhDARpC (ORCPT ); Thu, 1 Apr 2021 13:45:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8F0C60FDC; Thu, 1 Apr 2021 17:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617298990; bh=Fm0cejd2vCxIhfGEwUI4LawYQxbjdzYkPvBX6SYU5/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TwRzHuU4gFy+/Dwo/SEiEVwLncIb8bom0zF0vMxvLXxM0/ez5VwC46Ue0bWLgLLAE Qz/ezPBa9CXUnKopxtlXb5QD8kJW0aILKrXWobAWZdjCIigQlxSmz/uQfbZ1S/Bx9i kT+czKiR2MN6k+don4JuZvWEnw3qV17ydxoh6rdQz9PSbpv2UnURCihCiG3fUV2WSn Y62OS7VK6/J9HkcbwP8XHJlOiXvBm3jBLwCPzj1R1SD/8P0b+XPubWORfZtl9+C/jW y5QCGnhAbRgl45CInZrBQbUyVKh7vQvBfAA3CFLCWzamY2nS8BoAnOv1uc79QEaaG2 EfEyuStuMAfvQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: devicetree@vger.kernel.org, Jonathan Cameron Subject: [PATCH 2/6] dt-bindings:iio:accel:bosch, bma220 device tree binding documentation Date: Thu, 1 Apr 2021 18:41:08 +0100 Message-Id: <20210401174112.320497-3-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401174112.320497-1-jic23@kernel.org> References: <20210401174112.320497-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Linux driver currently relies on the driver.name to match to the compatible, but that doesn't mean it isn't a good idea to document it. Only real complexity is the 3 separate power supplies. Signed-off-by: Jonathan Cameron --- .../bindings/iio/accel/bosch,bma220.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) -- 2.31.1 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml new file mode 100644 index 000000000000..942b23ad0712 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/accel/bosch,bma220.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bosch BMA220 Trixial Acceleration Sensor + +maintainers: + - Jonathan Cameron + +properties: + compatible: + enum: + - bosch,bma220 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + spi-max-frequency: true + + vdda-supply: true + vddd-supply: true + vddio-supply: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spi0 { + #address-cells = <1>; + #size-cells = <0>; + + accelerometer@0 { + compatible = "bosch,bma220"; + reg = <0>; + spi-max-frequency = <2500000>; + interrupt-parent = <&gpio0>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; + }; + }; +...