From patchwork Fri Jun 11 08:08:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 458686 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.8 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, 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 62CEBC4743D for ; Fri, 11 Jun 2021 08:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 41996613B3 for ; Fri, 11 Jun 2021 08:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230470AbhFKIN4 (ORCPT ); Fri, 11 Jun 2021 04:13:56 -0400 Received: from mo4-p02-ob.smtp.rzone.de ([81.169.146.169]:9861 "EHLO mo4-p02-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230361AbhFKINy (ORCPT ); Fri, 11 Jun 2021 04:13:54 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623399110; cv=none; d=strato.com; s=strato-dkim-0002; b=Bi7D0hC47mnCGKuqVg7vgTlwI3Gh1/Xg8jdWwDLpYrlM/Fhwy6tX2buLZfXtRAajvS 1NtISo1Ci2sDmxiiwK1hjhWy0376WVHIXFWvUJ35bIBk2tA+83Oc+nE1TUhmqBfvnsk1 2vnU4x0y/IW5OhAU1Dne4/IXboJxJ5Idv7vAicJxYsWn9CqDeUYJjJscih7i6Hj02FvP PxtPSeYGWwUvqI4J5HLi43JtOjz8qiSv5seSwSYxFdJWsbxjYmeSpAMPrYzbtVu5JRsr VMZmB4RNsalSSrvEN66IPJUcjMtD/6WQGdR6jIjKYZpwJSPC5oWea9hpg6i5uciDrWY1 8gsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399110; 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=RnlciFqVhgy9BlHJjaLfId0CtxqVht5q2o9IZGHpHRI=; b=nmV6ynGCBWc6wJAn5w8HcVS5se62Ata2bL+kU1YbSTugVsWurj85ASaPgoFGHrrObf pXMksgqD+QhG2BTk2MVYJP70wRDdCc8KBRziMRTR1YPMHK0NR6gp/5B+nUwdw9+pI0N8 K4F5BOw0Hq1U0bb0VZEzrL6IeTrQvVEzLsbrgKiZSq8zDqJS53IVeB48RHMwmoThsfEe 5U8qAe3JCbEofrMsfH1Kw+b6c5QOQMpLnpxSYPpjelBdyf5+KYyq0WikfSbQM1NMCCf5 Ti6vT950CkgbjQ9Cp7AB9kSxtIcFoo1uuWf1jSTosmoJNIsV90AhK+n4vW7QCeyAJY8X J0og== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399110; 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=RnlciFqVhgy9BlHJjaLfId0CtxqVht5q2o9IZGHpHRI=; b=hYDoU0oTy4ihJeati2vABzd7MIpR2GlFpebrO5ylXJ+cqzlXISs5P3ltuXANxK0wwp WTX7ABM9GUeMh1NLE9ZpHbZCtMttkRumhD7TCpsYeXJJnu+neYULv5Q+5vdcOWUXwXGN uSzTVDaIyvkEfCD8nH0xX8HH+uZAyH9SO+3o5GrQVuDNtvC0JysWnnuC6l3Op55DZZ25 BV5gISlsKVTJqNd9bG2vD24itfecDtqwJjKk6zgC5iRse7m9a+4fMzpRbBVgzd86QIi2 IBiexijWsECObcDD6bfDHtqFEl5yfbI16xDM2Q2Llw076L23kys0SpD18L5ihKHZ9o7E cljQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxA6m6PrPw=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x5B8Bo02g (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 11 Jun 2021 10:11:50 +0200 (CEST) From: Stephan Gerhold To: Jonathan Cameron Cc: Lars-Peter Clausen , Rob Herring , Linus Walleij , Peter Meerwald , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Bastien Nocera , Hans de Goede , Andy Shevchenko , ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold Subject: [PATCH v3 03/10] iio: accel: bmc150: Drop misleading/duplicate chip identifiers Date: Fri, 11 Jun 2021 10:08:56 +0200 Message-Id: <20210611080903.14384-4-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210611080903.14384-1-stephan@gerhold.net> References: <20210611080903.14384-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Commit 0ad4bf370176 ("iio:accel:bmc150-accel: Use the chip ID to detect sensor variant") stopped using the I2C/ACPI match data to look up the bmc150_accel_chip_info. However, the bmc150_accel_chip_info_tbl remained as-is, with multiple entries with the same chip_id (e.g. 0xFA for BMC150/BMI055/BMA255). This is redundant now because actually the driver will always select the first entry with a matching chip_id. So even if a device probes e.g. with BMA0255 it will end up using the chip_info for BMC150. And in general that's fine for now, the entries for BMC150/BMI055/BMA255 were exactly the same anyway (except for the name, which is replaced with the more accurate one later). But in this case it's misleading because it suggests that one should add even more entries with the same chip_id when adding support for new variants. Let's make that more clear by removing the enum with the chip identifiers entirely and instead have only one entry per chip_id. Note that we may need to bring back some mechanism to differentiate between different chips with the same chip_id in the future. For example, BMA250 (currently supported by the bma180 driver) has the same chip_id = 0x03 as BMA222 even though they have different channel sizes (8 bits vs 10 bits). But in any case, that mechanism would need to look quite different from what we have right now. Cc: Bastien Nocera Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold --- Changes in v3: Sort combined chip names in chip info table --- drivers/iio/accel/bmc150-accel-core.c | 34 ++++++--------------------- drivers/iio/accel/bmc150-accel-i2c.c | 30 +++++++++++------------ drivers/iio/accel/bmc150-accel-spi.c | 30 +++++++++++------------ drivers/iio/accel/bmc150-accel.h | 10 -------- 4 files changed, 37 insertions(+), 67 deletions(-) diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index a80ee0fdabc5..9ecbd3769593 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -1097,28 +1097,8 @@ static const struct iio_chan_spec bma280_accel_channels[] = BMC150_ACCEL_CHANNELS(14); static const struct bmc150_accel_chip_info bmc150_accel_chip_info_tbl[] = { - [bmc150] = { - .name = "BMC150A", - .chip_id = 0xFA, - .channels = bmc150_accel_channels, - .num_channels = ARRAY_SIZE(bmc150_accel_channels), - .scale_table = { {9610, BMC150_ACCEL_DEF_RANGE_2G}, - {19122, BMC150_ACCEL_DEF_RANGE_4G}, - {38344, BMC150_ACCEL_DEF_RANGE_8G}, - {76590, BMC150_ACCEL_DEF_RANGE_16G} }, - }, - [bmi055] = { - .name = "BMI055A", - .chip_id = 0xFA, - .channels = bmc150_accel_channels, - .num_channels = ARRAY_SIZE(bmc150_accel_channels), - .scale_table = { {9610, BMC150_ACCEL_DEF_RANGE_2G}, - {19122, BMC150_ACCEL_DEF_RANGE_4G}, - {38344, BMC150_ACCEL_DEF_RANGE_8G}, - {76590, BMC150_ACCEL_DEF_RANGE_16G} }, - }, - [bma255] = { - .name = "BMA0255", + { + .name = "BMA255/BMC150/BMI055", .chip_id = 0xFA, .channels = bmc150_accel_channels, .num_channels = ARRAY_SIZE(bmc150_accel_channels), @@ -1127,7 +1107,7 @@ static const struct bmc150_accel_chip_info bmc150_accel_chip_info_tbl[] = { {38344, BMC150_ACCEL_DEF_RANGE_8G}, {76590, BMC150_ACCEL_DEF_RANGE_16G} }, }, - [bma250e] = { + { .name = "BMA250E", .chip_id = 0xF9, .channels = bma250e_accel_channels, @@ -1137,7 +1117,7 @@ static const struct bmc150_accel_chip_info bmc150_accel_chip_info_tbl[] = { {153277, BMC150_ACCEL_DEF_RANGE_8G}, {306457, BMC150_ACCEL_DEF_RANGE_16G} }, }, - [bma222] = { + { .name = "BMA222", .chip_id = 0x03, .channels = bma222e_accel_channels, @@ -1152,7 +1132,7 @@ static const struct bmc150_accel_chip_info bmc150_accel_chip_info_tbl[] = { {612916, BMC150_ACCEL_DEF_RANGE_8G}, {1225831, BMC150_ACCEL_DEF_RANGE_16G} }, }, - [bma222e] = { + { .name = "BMA222E", .chip_id = 0xF8, .channels = bma222e_accel_channels, @@ -1162,8 +1142,8 @@ static const struct bmc150_accel_chip_info bmc150_accel_chip_info_tbl[] = { {612915, BMC150_ACCEL_DEF_RANGE_8G}, {1225831, BMC150_ACCEL_DEF_RANGE_16G} }, }, - [bma280] = { - .name = "BMA0280", + { + .name = "BMA280", .chip_id = 0xFB, .channels = bma280_accel_channels, .num_channels = ARRAY_SIZE(bma280_accel_channels), diff --git a/drivers/iio/accel/bmc150-accel-i2c.c b/drivers/iio/accel/bmc150-accel-i2c.c index d34dddb850d9..b8bda0dfb495 100644 --- a/drivers/iio/accel/bmc150-accel-i2c.c +++ b/drivers/iio/accel/bmc150-accel-i2c.c @@ -221,14 +221,14 @@ static int bmc150_accel_remove(struct i2c_client *client) } static const struct acpi_device_id bmc150_accel_acpi_match[] = { - {"BSBA0150", bmc150}, - {"BMC150A", bmc150}, - {"BMI055A", bmi055}, - {"BMA0255", bma255}, - {"BMA250E", bma250e}, - {"BMA222", bma222}, - {"BMA222E", bma222e}, - {"BMA0280", bma280}, + {"BSBA0150"}, + {"BMC150A"}, + {"BMI055A"}, + {"BMA0255"}, + {"BMA250E"}, + {"BMA222"}, + {"BMA222E"}, + {"BMA0280"}, {"BOSC0200"}, {"DUAL250E"}, { }, @@ -236,13 +236,13 @@ static const struct acpi_device_id bmc150_accel_acpi_match[] = { MODULE_DEVICE_TABLE(acpi, bmc150_accel_acpi_match); static const struct i2c_device_id bmc150_accel_id[] = { - {"bmc150_accel", bmc150}, - {"bmi055_accel", bmi055}, - {"bma255", bma255}, - {"bma250e", bma250e}, - {"bma222", bma222}, - {"bma222e", bma222e}, - {"bma280", bma280}, + {"bmc150_accel"}, + {"bmi055_accel"}, + {"bma255"}, + {"bma250e"}, + {"bma222"}, + {"bma222e"}, + {"bma280"}, {} }; diff --git a/drivers/iio/accel/bmc150-accel-spi.c b/drivers/iio/accel/bmc150-accel-spi.c index 74a8aee4f612..01b42fa6a015 100644 --- a/drivers/iio/accel/bmc150-accel-spi.c +++ b/drivers/iio/accel/bmc150-accel-spi.c @@ -34,26 +34,26 @@ static int bmc150_accel_remove(struct spi_device *spi) } static const struct acpi_device_id bmc150_accel_acpi_match[] = { - {"BSBA0150", bmc150}, - {"BMC150A", bmc150}, - {"BMI055A", bmi055}, - {"BMA0255", bma255}, - {"BMA250E", bma250e}, - {"BMA222", bma222}, - {"BMA222E", bma222e}, - {"BMA0280", bma280}, + {"BSBA0150"}, + {"BMC150A"}, + {"BMI055A"}, + {"BMA0255"}, + {"BMA250E"}, + {"BMA222"}, + {"BMA222E"}, + {"BMA0280"}, { }, }; MODULE_DEVICE_TABLE(acpi, bmc150_accel_acpi_match); static const struct spi_device_id bmc150_accel_id[] = { - {"bmc150_accel", bmc150}, - {"bmi055_accel", bmi055}, - {"bma255", bma255}, - {"bma250e", bma250e}, - {"bma222", bma222}, - {"bma222e", bma222e}, - {"bma280", bma280}, + {"bmc150_accel"}, + {"bmi055_accel"}, + {"bma255"}, + {"bma250e"}, + {"bma222"}, + {"bma222e"}, + {"bma280"}, {} }; MODULE_DEVICE_TABLE(spi, bmc150_accel_id); diff --git a/drivers/iio/accel/bmc150-accel.h b/drivers/iio/accel/bmc150-accel.h index d67d6ed6ae77..47121f070fe9 100644 --- a/drivers/iio/accel/bmc150-accel.h +++ b/drivers/iio/accel/bmc150-accel.h @@ -68,16 +68,6 @@ struct bmc150_accel_data { struct iio_mount_matrix orientation; }; -enum { - bmc150, - bmi055, - bma255, - bma250e, - bma222, - bma222e, - bma280, -}; - int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq, const char *name, bool block_supported); int bmc150_accel_core_remove(struct device *dev); From patchwork Fri Jun 11 08:08:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 458685 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.8 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, 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 76F58C49361 for ; Fri, 11 Jun 2021 08:12:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AF4B613AE for ; Fri, 11 Jun 2021 08:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbhFKIN6 (ORCPT ); Fri, 11 Jun 2021 04:13:58 -0400 Received: from mo4-p03-ob.smtp.rzone.de ([85.215.255.104]:36316 "EHLO mo4-p03-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbhFKIN6 (ORCPT ); Fri, 11 Jun 2021 04:13:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623399112; cv=none; d=strato.com; s=strato-dkim-0002; b=eEonQJtfTPvaOpT4b3dcPpuo61oJgpLJF3jf8tmvFE7ptJ11ixvZQO+B2sIYr87ZNt dj8Ub2uZUBCWTb6UM9fBgsSQMBBbTWFNQ2Fw7nc43PejTll99vS/T+4DnSeP8xDqx26g Cr4MlfILLD0pNaKyKSdCXPghBPatV/xjrVRRQGUgR7+JdYwQbNeednxlH7AfCPU12dGP +VYLNHLp/jLgzjmxSixPSBpucvF00xZBhaE2IfMrV1JBsKj53p0W1jLGU0HvC8PwIIwt eQQi8tAiCWB5bmCMVd6mZ5Pnnmd/wqjbWX+6P9mrMkvwpXgaKHcv7uwmQGMN5yjLWaQY s/nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399112; 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=mzhlFtT0uPEpgxtGsCZLk5RpPAfjBTETW3jiAJ+alHo=; b=RbD3YhmKpVNTmVV7drwxwKOJhJCC3Fw+iwpS38RCL6nzIqw5gVzqlDIAgRCV0nzowH 2Wwv5wgSLaz3h4xwshEDOkCl8lPGQnsE8Br71qlv9FW6HDe3k3nUFo4RjiZDauIImAAx ho6Z+cGNIHUKjlq7odqfAmiGxqMyRD2ZspB6omiQd0vAuJjPtPFf9j/oZnYCLE5G9T1A XTFkrNk5qHb6FM87NOgwFZJB7Au+sqjzNgzd2/wfzCoaUXaejs93sW2Vcv0qJcI6uxRQ E61ZlU6VW0UR+UIkqD610qJAqNvZo1458AKCEt+yp6cgfS3SPGGTQ/wSrv/O2wxcJxLP 0Mww== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399112; 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=mzhlFtT0uPEpgxtGsCZLk5RpPAfjBTETW3jiAJ+alHo=; b=Fn/tioDmXK0mcc0fyDASjMc/HgeDWtYoUhKz6KzTLatO8L7NemRHvSL52NGE+5S94p BP2ydg8RGB2AeZiidm1kR4qMr7xDIjkUpcU3/56RCW9opI08eeSQ1tsVbsVLVmJD/Lyc eemev7sQ8RBm7SGr/lGF57y5Kq6v9ehvibNdSs+oQSmsa0tTZ45FsJtaD2OK9ZDlvalR PzHqp3sZbMQfj/gfIgxRGiphCxZ/IAs60B2OmP7pS070SHjrKr/OodkOva/oRqhl5H/V R279lOZ3oCpUFvHIXYxdxSnL9bsbEk4JkFZrtto2yoPOt+crbw25aU5H2FhJBT00lJ1l Njow== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxA6m6PrPw=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x5B8Bq02k (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 11 Jun 2021 10:11:52 +0200 (CEST) From: Stephan Gerhold To: Jonathan Cameron Cc: Lars-Peter Clausen , Rob Herring , Linus Walleij , Peter Meerwald , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Bastien Nocera , Hans de Goede , Andy Shevchenko , ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold Subject: [PATCH v3 06/10] dt-bindings: iio: accel: bma255: Document bosch, bma253 Date: Fri, 11 Jun 2021 10:08:59 +0200 Message-Id: <20210611080903.14384-7-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210611080903.14384-1-stephan@gerhold.net> References: <20210611080903.14384-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org BMA253 is mostly like BMA255 that is already supported by the bmc150-accel driver. Document an extra bosch,bma253 compatible for it. Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold --- Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index c2efbb813ca2..8afb0fe8ef5c 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -18,6 +18,7 @@ properties: enum: - bosch,bmc150_accel - bosch,bmi055_accel + - bosch,bma253 - bosch,bma255 - bosch,bma250e - bosch,bma222 From patchwork Fri Jun 11 08:09:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 458684 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.8 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, 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 E2323C49EA2 for ; Fri, 11 Jun 2021 08:12:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8742613B3 for ; Fri, 11 Jun 2021 08:12:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbhFKIN7 (ORCPT ); Fri, 11 Jun 2021 04:13:59 -0400 Received: from mo4-p03-ob.smtp.rzone.de ([81.169.146.174]:22908 "EHLO mo4-p03-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230467AbhFKIN6 (ORCPT ); Fri, 11 Jun 2021 04:13:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623399113; cv=none; d=strato.com; s=strato-dkim-0002; b=floXQWUM4W6xttGdwZF6fwXLAbrliRQpkHQxvhNKHFDhcylw6cFUCib772QWhs/O6g tOv70j/J4e5UuTv68Im6bhnzbxE6WeZBrr027U61/h1WonqGvIdUvzUBE1wTGLsD6oRt y7wxpA5EGkcoc/p94d8YPnhwUvY4g3Z0GrZIeBWBlcJYG1eBW67p2f7EAchOZVnjiMxC TLTeaqho5Cm8UqWB6kM/mfK1QGEqJTxEA3rvAJuP+Nit4GnU240zu//uM2kQiIImjy+A pG/jcrzmp43fJ9BjfPGTEKnJ6QH+5GT7Kf8QILRedxWHKmO3t1jBEXkKi0tnPtvaIZ94 vnkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399113; 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=Ua2/BS4Dn+Hn65dlmLRU/qcJr/7vqrYz9hLAbDHqQ9U=; b=dxABeggRN5fRDOX3Ew7I49I0k+VYou9lthUqAss5BZP46UaM5ogdmSykh/zQZuRjo3 I9Kf2hLsI9/l095VqBPs3GWOOKWab9rmMhb9wtbqQMNcITgoTchJegtpPnJeN+qvUMxT 27d0oMsRt+eiM9G5lZdDRMaGuHWl+uVJWGCL9Ii6JzLMIm7auD/RSu3ku5yeY9JmKTve 2kXOXGbggwL4hlIG3rIdLdIFTqSSh8oJUIGQLsEKfaz3DyxyCPLgYC5sNbl1+GVNALfe Ed0W+4tkCsGz7JfEkpZb+lNgdkJNp4rMTSvbR6u+9czzLFtiCOupjrirwEXOetIuM66b Nocw== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399113; 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=Ua2/BS4Dn+Hn65dlmLRU/qcJr/7vqrYz9hLAbDHqQ9U=; b=M5td5je8lpenBPsbXQb0DQBKfSj9fX+dIiFheZ6jfJIP/ACwBSzQDLdvfya5I3F36Q ej5PkcPoZOxY0KBh5NGBmCkfqEJaWw8l4LWQRhuxbbuhm8DeEL5s7JpQQ5mYrSg/CKEc b//BnM5F6HnxKrsGvwFoZ8YlB1TsllPk+q3EzjgknUrGulbjZt7rfPmlCBZagYQbUTuv a6oLhhCKx0BPdpsu/26AcAcuBs1u+GK6jTszjcmidycxJWgbnNwzWyQx8HLe1og+5gzD YqmLjyDfYc0LBtUdp7s7jXKA4fqKq+go//Qy/bYAgvWY/lKIWa5WvshF/Uk6iwCK6cDl bUiA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxA6m6PrPw=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x5B8Br02o (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 11 Jun 2021 10:11:53 +0200 (CEST) From: Stephan Gerhold To: Jonathan Cameron Cc: Lars-Peter Clausen , Rob Herring , Linus Walleij , Peter Meerwald , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Bastien Nocera , Hans de Goede , Andy Shevchenko , ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold Subject: [PATCH v3 08/10] dt-bindings: iio: bma255: Allow multiple interrupts Date: Fri, 11 Jun 2021 10:09:01 +0200 Message-Id: <20210611080903.14384-9-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210611080903.14384-1-stephan@gerhold.net> References: <20210611080903.14384-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org BMA253 has two interrupt pins (INT1 and INT2) that can be configured independently. At the moment the bmc150-accel driver does not make use of them but it might be able to in the future, so it's useful to already specify all available interrupts in the device tree. Set maxItems: 2 for interrupts to allow specifying a second one. This is necessary as preparation to move the bosch,bma254 compatible from bosch,bma180.yaml to bosch,bma255.yaml since bma180 allows two interrupts, but BMA254 is better supported by the bmc150-accel driver. Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold --- .../devicetree/bindings/iio/accel/bosch,bma255.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index 8afb0fe8ef5c..65b299a5619b 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -32,7 +32,12 @@ properties: vddio-supply: true interrupts: - maxItems: 1 + minItems: 1 + maxItems: 2 + 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). mount-matrix: description: an optional 3x3 mounting rotation matrix. From patchwork Fri Jun 11 08:09:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 458683 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.8 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, 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 55BA4C48BE0 for ; Fri, 11 Jun 2021 08:12:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CA0D613AE for ; Fri, 11 Jun 2021 08:12:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230407AbhFKIOA (ORCPT ); Fri, 11 Jun 2021 04:14:00 -0400 Received: from mo4-p03-ob.smtp.rzone.de ([85.215.255.102]:20905 "EHLO mo4-p03-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230504AbhFKIN6 (ORCPT ); Fri, 11 Jun 2021 04:13:58 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1623399114; cv=none; d=strato.com; s=strato-dkim-0002; b=pssHL5/7rPs9WxOAcMlggjM6fUybN51NsvIyWU8Hkx3sXhETzjRYf8y2Y6XlN1Yyde 2t4QQu1UKrc9V2ODeUZ1Z3FzF8s7PLgZuufrgr9H/pzyKkGi9iQzniCJsVP3jVWLUUUJ 50efmx2cYpUdRB3lRoMGGpIxwf22DL5dOKL/LK4ymm7kJl1tOAd5mssFTXkZfkQVkPaO nc72wNAyhr17aViAXaA30rQyJNTJ1skSW4lRSpil26ZUvurLaE9HFhi4hG+QJT5oGS5a nB9hVZDyrdU5tzSZYb26dw8+9lI7crHUGR2ryMfaBR7IGresCtZc9xEC9z2LZ0uPkTf8 prcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399114; 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=0LZqEZalSY1FDC+j7IzIvkPWNykdyW/qSpAMgN5TeQI=; b=c0vVwAj2N5XC7LhN4UiLD4Zz9FgdFKX6g6BNsIwTYojd2vFA+PHUhmLLNYW3wGZBJZ acay6K4YPNYXfGqGtnU+kw7y0EhXeVwuJslKmix14S/hRE5XS+TOxm7jGzy7PXPdNuKV ANG81x7+2rfEsWEp9uUdxoEcnaakulFWMZvOGQgkCRuEf+gnOrdex+u6yNt9AEB82GP3 Wn9FJaAc/ZKA2Ul/GCAF0+ttmtSVkaBhVGJj+T6DdjkKwQWWEQWuaBbB4OvOWxca1eVD ACy1hZhn+Obfyi4EVjoa7WGcQ7SkuxxTXnZlM8nH1G2CScn9ZLuoIrOivi2Ht9k81Ytl FXsA== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1623399114; 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=0LZqEZalSY1FDC+j7IzIvkPWNykdyW/qSpAMgN5TeQI=; b=QO+9p5Ft6gUrSJaIwz83mBl5tGkI2Fc4idx1nLDdsH+w4xx0OpMtEL1hXCHaAfw2lm mqXaa5G4iW1mkLTDYOPQNE3flo/3SRvhi37OYfZASI979tqLbkZeuNj6SK+v1u1hPcZy Aok4XM4WySHodkANWf6yCjdmi4Oax27ieHMP8DgH592I0zzgd50AXgIWsHcozCRFZB/0 eQZJ58tVqSSDCjtGCMFJlIPCoEPl8VUpoAMibL13/9v6s7Fohn7mFCSYlb+gu4xAJ7UK J+Ye+BeYoOfu1ZSoNvZq/4t6SSapoNaYuMlzZsL6brQk0VMoRWxtG18AqazfS3q7qREW cPSQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxA6m6PrPw=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.27.2 DYNA|AUTH) with ESMTPSA id y01375x5B8Br02p (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 11 Jun 2021 10:11:53 +0200 (CEST) From: Stephan Gerhold To: Jonathan Cameron Cc: Lars-Peter Clausen , Rob Herring , Linus Walleij , Peter Meerwald , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Bastien Nocera , Hans de Goede , Andy Shevchenko , ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold Subject: [PATCH v3 09/10] dt-bindings: iio: accel: bma180/bma255: Move bma254 to bma255 schema Date: Fri, 11 Jun 2021 10:09:02 +0200 Message-Id: <20210611080903.14384-10-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210611080903.14384-1-stephan@gerhold.net> References: <20210611080903.14384-1-stephan@gerhold.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org BMA254 is very similar to BMA253/BMA255 which are both supported by the bmc150-accel driver. In general, there is quite some overlap between the bma180 and bmc150-accel driver, but the bmc150-accel driver has a few more features (e.g. motion trigger/interrupt). Let's move bma254 over to the bma255 schema (bmc150-accel driver). Reviewed-by: Linus Walleij Reviewed-by: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Stephan Gerhold --- Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml | 3 +-- Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml index 45b3abde298f..a7e84089cc3d 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma180.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/iio/accel/bosch,bma180.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Bosch BMA023 / BMA150/ BMA180 / BMA25x / SMB380 triaxial accelerometers +title: Bosch BMA023 / BMA150/ BMA180 / BMA250 / SMB380 triaxial accelerometers maintainers: - Jonathan Cameron @@ -21,7 +21,6 @@ properties: - bosch,bma150 - bosch,bma180 - bosch,bma250 - - bosch,bma254 - bosch,smb380 reg: diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml index 65b299a5619b..e830d5295b92 100644 --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -19,6 +19,7 @@ properties: - bosch,bmc150_accel - bosch,bmi055_accel - bosch,bma253 + - bosch,bma254 - bosch,bma255 - bosch,bma250e - bosch,bma222