From patchwork Mon Aug 2 15:56:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 490438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AD9AC4320E for ; Mon, 2 Aug 2021 15:57:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F39FA61103 for ; Mon, 2 Aug 2021 15:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235243AbhHBP5d (ORCPT ); Mon, 2 Aug 2021 11:57:33 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.81]:34595 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235429AbhHBP5d (ORCPT ); Mon, 2 Aug 2021 11:57:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1627919826; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=PBDUzAA2uZL8rx4T0qqlTZQwhvXnyhX6ulO6O6mtELA=; b=DYI9hI9jUINOLNxFQnukJwn5zLmQEUfZTOVhSlTUDUMiOBkGUf6a+db2b7HgYX/XbQ ybVLFqFQZZoJvzNZlZz06Wvx9Y2PyFH5tFr7xyBcGNAvRRulNH+yqlF44jyrGtf7cGUo v40ZZoQFp4W1dFfgwkhzc9KxyJPPFNWsPun3ScZg7oSz2MVfirnEVcugpklfEFlk+/LP YMZyhWe9XqydQQxQLsrRcpe3xIe+2pQMKVull2WdihHyIBFctlXR1bNmhlwdZ0iNL9QN 3dTE46V7J5N5RNTsvDHP8UzNws8kfotWLsTj+jhA4DVSmX8uJzctMRwj64MU+wIVDwlZ Jjxg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXTbAOHjRHIhr0eF6M4Q==" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.30.0 DYNA|AUTH) with ESMTPSA id e095f1x72Fv52RE (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 2 Aug 2021 17:57:05 +0200 (CEST) From: Stephan Gerhold To: Jonathan Cameron Cc: Lars-Peter Clausen , Rob Herring , Linus Walleij , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Hans de Goede , Andy Shevchenko , ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin , Stephan Gerhold , Rob Herring Subject: [PATCH v2 2/4] dt-bindings: iio: accel: bma255: Add bosch, bmc156_accel Date: Mon, 2 Aug 2021 17:56:55 +0200 Message-Id: <20210802155657.102766-3-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802155657.102766-1-stephan@gerhold.net> References: <20210802155657.102766-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org BMC156 is very smilar to BMC150, but it has only one accelerometer interrupt pin. It would make sense if only INT1 was exposed but someone at Bosch decided to only have an INT2 pin. In this case, it does not make sense if the first interrupt pin is treated as INT1 (since that pin does not exist). Add a note to the bindings that the first interrupt pin is treated as INT2 for BMC156. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Stephan Gerhold --- .../bindings/iio/accel/bosch,bma255.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index 253b2051d0b1..478e75ae0885 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -26,6 +26,7 @@ properties: - bosch,bma255 - bosch,bma280 - bosch,bmc150_accel + - bosch,bmc156_accel - bosch,bmi055_accel # bma180 driver in Linux @@ -50,6 +51,9 @@ properties: the one connected to the INT2 pin (if available). The type should be IRQ_TYPE_EDGE_RISING. + BMC156 does not have an INT1 pin, therefore the first interrupt pin is + always treated as INT2. + interrupt-names: minItems: 1 maxItems: 2 @@ -85,6 +89,20 @@ examples: interrupt-names = "INT1"; }; }; + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + accelerometer@10 { + compatible = "bosch,bmc156_accel"; + reg = <0x10>; + vddio-supply = <&vddio>; + vdd-supply = <&vdd>; + interrupts = <116 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "INT2"; + }; + }; - | # include spi {