From patchwork Mon Jun 14 16:31:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 459991 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, 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 224C3C4743C for ; Mon, 14 Jun 2021 16:34:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06CB0611EE for ; Mon, 14 Jun 2021 16:34:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234653AbhFNQgn (ORCPT ); Mon, 14 Jun 2021 12:36:43 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.54]:19073 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233640AbhFNQgm (ORCPT ); Mon, 14 Jun 2021 12:36:42 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623688473; cv=none; d=strato.com; s=strato-dkim-0002; b=Hw/m070q22hWBaW5wVC5bfa4eppwIB8mF7AwZ+CkcHZ+ZrO8B3gbF70+rUweRCXXEE fhTKQgUjwvMX8TYMwIxBqgSVO0FKuqVBPK9yDlCxl0us/tvGvoJ7lzrHwy0dd5uxR+gP q4rv2vvS/Iho6qG39uU06CSSu1Ph9MJaKMi9B28R0F5Wa2OhXgQzNWfZcNShsTzTASll y1pzomztILl6WF5kDkYXVBd4j3DCsIXLvDmttTD91NQ+CNMH/q9EAfh7lv1gvz4TOrUx q5rj+prSN+4gWBxM40uu35scTNONvBfk66csyuvMo5+hP8pJ3wOghVwAFrBfr5HF9smd EfOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623688473; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=x9LjPKNlTn6jZYMI0UPbWnrrqak27uh1gtfqY+NFcGY=; b=AmVjniVxpdkOEBFVE28Suonn5r3fV1/wmEEr50iX5hJ84XvNnm9f9IJH3RyUfqmXnm LyF6ObEJtPlvNbJEeMneM7x25mrCcpxqvSf758RViOQ+NjyepXXMTcrtoYKFsPGn3fE2 GQ2BRAoHz5+tijxQEtWBMFtHV2MyhQ2n7WPbZVU3w9bKwdiQ6JEJhXnkMnnzzaRhysYJ ZMKYe/sDj9HP0LeDbewdghXTa0o/oT2xHBZO//GO3gOXV+II/Ye4OM9ol/OrgHEtk6Gl m8K86zCTZ5bBWPPjm4XrvQl6WZBPi+OC3XSfjZcnfOGtWmEqvMsieVXI2eWiS35SUOYU +tEQ== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623688473; 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=x9LjPKNlTn6jZYMI0UPbWnrrqak27uh1gtfqY+NFcGY=; b=qo5yXaBmU9Aj3AIUNQUdWqVhCHzYwr+p08EbuadvwZr5BN/rGu5hBEAug66VPK6MLS 38M7ai8Ol0UAVXLgvZwJyZ3t4mHwkJgAPiH6aPd/4vlsYHZhTdNkkT/FZErZKz0S7f5k ooxuEufxzWI4pSlDaIgRDHnixCGmjd0Xn2BIEoOemb3k+b3tI8bSB+MEJuutMsEEmWhC LxZHxO9cXTfL+RkvAnIqwxWwHaPQYbkIATcBFkKFhrq4MRP1WZTtjm/zgtKedNGPJLqK RMCIZHpKz1hpgZt/shpz4qtwGuqK8IWoPoRs/MPuuBvPxHRLZ+bvh9/WJcAk9C09T5fm wisw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxA6m6NvdbT" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x5EGYWJ6t (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 14 Jun 2021 18:34:32 +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, Stephan Gerhold Subject: [PATCH 1/3] dt-bindings: iio: accel: bma255: Fix interrupt type Date: Mon, 14 Jun 2021 18:31:48 +0200 Message-Id: <20210614163150.7774-2-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614163150.7774-1-stephan@gerhold.net> References: <20210614163150.7774-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Bosch accelerometers similar to BMA255 are initially configured to emit an active-high interrupt signal. This is currently not re-configured in the bmc150-accel driver so the interrupt should most certainly be IRQ_TYPE_EDGE_RISING (or potentially IRQ_TYPE_LEVEL_HIGH). (Unless there is some kind of inverter installed on the board...) At the moment the bmc150-accel driver forcefully requests the IRQ using IRQF_TRIGGER_RISING, which means that the IRQ type is currently ignored in all existing device trees. Fixes: 6259551 ("iio: accel: bmc150-accel: Add DT bindings") Cc: Linus Walleij Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Acked-by: Rob Herring --- It's probably better to let the bmc150-accel driver rely on the IRQ type provided by the device tree in case of inverters or something. However: 1. We need to fix up several broken device trees first (I found IRQ_TYPE_LEVEL_LOW in some device trees). 2. Similarly, I'm not sure if this might break some ACPI devices in case they have the wrong IRQ type listed? As a first step this patch just fixes the documentation. --- Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index e830d5295b92..b37ba902e4a2 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -38,7 +38,7 @@ properties: description: | The first interrupt listed must be the one connected to the INT1 pin, the second (optional) interrupt listed must be the one connected to the - INT2 pin (if available). + INT2 pin (if available). The type should be IRQ_TYPE_EDGE_RISING. mount-matrix: description: an optional 3x3 mounting rotation matrix. @@ -63,7 +63,7 @@ examples: reg = <0x08>; vddio-supply = <&vddio>; vdd-supply = <&vdd>; - interrupts = <57 IRQ_TYPE_EDGE_FALLING>; + interrupts = <57 IRQ_TYPE_EDGE_RISING>; }; }; - | From patchwork Mon Jun 14 16:31:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 459990 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, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 5108EC49EA4 for ; Mon, 14 Jun 2021 16:34:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 37598611EE for ; Mon, 14 Jun 2021 16:34:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234667AbhFNQgp (ORCPT ); Mon, 14 Jun 2021 12:36:45 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([85.215.255.84]:12548 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234617AbhFNQgn (ORCPT ); Mon, 14 Jun 2021 12:36:43 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623688473; cv=none; d=strato.com; s=strato-dkim-0002; b=toC5UdsxFBQqduXXQffVPkrq1lWie0vUE46vkFJV1LjxEEJX6siX9l4UI5HYMgwp3J WzKM3tI7w6N5R8NQ+bRJzLRV6z+J2Zt8hlxi9hEhycVaHB86oFBERA6Jq6Af33Pzdrzc 8K3Tys+T8NVlyfULuca6RFP9fzDdFcZWDTD6AXdJ/pabCI5CkraRZrTB7LAJki27zk5U nP4db9mp2qD7RpsI9TF7VibGwdH51vX1a1INcP5blPOcgogWDP5zGbf/BWcbPJeAW0YE rOdATLmqAtNagb7wddxjNGVPIaljQmnHB0FKOXhPW7S+vA6okne8KmN5TrD//B8cShBl kUUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623688473; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=7ne9iqmWh4ykitKcQi2cUGb5m2K1oU3kgd5/O5RBBDw=; b=CR9x1v513pM/xpTOYknizERyrV0R41WHOC1tBnRcZ15FkWHYUjOlzZudEFBf0HS8rq /KIVEXgwqFItIMqwmTDV4zIUhSZn6TdnafL9RUWsfQ2wL6p243S3qlcGyvCDHv7qIXHW jNNsesGmmuiO6tQcskzmbsZGGoebnJoDaeE/ce7Yv8P6USLDSDb3h4L4p2atoDhqivaN W5iUVOrAHp7x/L5/tec+xp82VzSeaMYWFT8Am6ApNQ0PcyygC09m7ZmOjqS5HeE1loWk /jLjOTiT9Xnk2c4Bq5Y9RKkA7x2DKaLwovVePrQYzqnr5u2zJKwiU2NenFzjDo/encrc 9fRQ== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623688473; 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=7ne9iqmWh4ykitKcQi2cUGb5m2K1oU3kgd5/O5RBBDw=; b=KUjx0Tln/3xcHFTsa5I6pH7TP/Xu7VZAiILN5qZHt9sSBkKKn98NhueHbnAyUFjCUp Pe7bI0Eorp0FCO6/1ntEyGYr48abHSRsy9dRx7kcg6UxGJedqacbVuncRt9isxrOJtHE GySE4AxTQaIy457W3oRWcCtEdIjiXR+OFJyL/K89d/koOuxAmt5uyvfGmy1k73axY2xF 7EOAEO/SmRoDJSWvzKIIHZwhDQPtDU7Oac8mMJdHUZ4/kv1u36F4Y9whhV0JAJBnKMq8 1420RAhO3D/FENAjFBdyxvDpb+/jhB4gisaIuf8ReF7SQBW6tFYzy1UPYnituCh81yGz 7hTA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxA6m6NvdbT" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x5EGYXJ6u (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 14 Jun 2021 18:34:33 +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, Stephan Gerhold Subject: [PATCH 2/3] dt-bindings: iio: accel: bma255: Sort compatibles Date: Mon, 14 Jun 2021 18:31:49 +0200 Message-Id: <20210614163150.7774-3-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210614163150.7774-1-stephan@gerhold.net> References: <20210614163150.7774-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Similar to recent rework in the bmc150-accel driver, sort the compatible list in the DT schema so there is a consistent order. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Acked-by: Rob Herring --- .../devicetree/bindings/iio/accel/bosch,bma255.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index b37ba902e4a2..f35c57b8105f 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -16,15 +16,15 @@ description: properties: compatible: enum: - - bosch,bmc150_accel - - bosch,bmi055_accel + - bosch,bma222 + - bosch,bma222e + - bosch,bma250e - bosch,bma253 - bosch,bma254 - bosch,bma255 - - bosch,bma250e - - bosch,bma222 - - bosch,bma222e - bosch,bma280 + - bosch,bmc150_accel + - bosch,bmi055_accel reg: maxItems: 1