Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp4647460pxb; Mon, 28 Mar 2022 00:12:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyykSy9fKKkRHPMYR/UBs7bPBrbf8JaQitdDFmrjICk6x+UpugzPR98jVxwv7Ow+a/sVW7W X-Received: by 2002:a17:906:3583:b0:6d1:c07:fac0 with SMTP id o3-20020a170906358300b006d10c07fac0mr26155472ejb.749.1648451553439; Mon, 28 Mar 2022 00:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648451553; cv=none; d=google.com; s=arc-20160816; b=utRsU7v/xeTtfFmfXhTJjVY0xOMqEPAZDGqABBSIAV4jXSQPmMWY3Bdt9CSSb1ebek l60o3VRUB/ZbgordP4GexJFWYUeD82dVMQGmg4zP3HNKiL0n2MsutQkkhY+BLnv7UTBn ChwH0NVAID0F4D1PEPW5rCrrBjC1lnpKJJQ93tI9h1wZ3OyMZ1DLcYS/IB6S+HGbypAH OLLcnUw863q8sOjhxeMmepaGE4WHw2RNi5v91BdwozRf72ypcY5QHC4VWLx5R+3m1wHl avTNYLQ56Q7mgri6BBrE50seDKX4M+xzRampfaymk5RP6EKL//CHesoMmTyWMi33ASko 1Y1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=aIwjZik1/zaruSghW8xQ1i1xKaqz8bOpA5tKq+kgq4I=; b=pIFGh97PwUZ8CJ0Z+DUX4n2E3SSiEx2o7RbDV/lGSqYTjkmmxMbPldb9z1qsRddHLY ToKE4PFOchYlUHWpFHKieSMNCodj0nYyEyMI+jLDUV5ZQtGzIurkFCF+EvtdFXKAlvJX 7tZSvU3a+9X3MLlQBuEtG3lUPRip+NPCcWoNthESDH2MKWv+ECVIQkZlbyR9bxnlPGhC /DyxNTdG53ATscu37ewT0MqQQHeQ5oDXeczZG5H8doe0M6Nmw8yRsu2J9iGnqginzkYs +ETv0mhOPunHNsTPv1XjzaH8iQkokK/nO+TZcxh2LHu/x9RxR5q9h1MkAYe+7fDbFhYh 1cmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Koc4LEfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020aa7d04d000000b0041975fbcacasi12499948edo.101.2022.03.28.00.12.08; Mon, 28 Mar 2022 00:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Koc4LEfz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234755AbiCZTn2 (ORCPT + 99 others); Sat, 26 Mar 2022 15:43:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232156AbiCZTn2 (ORCPT ); Sat, 26 Mar 2022 15:43:28 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7721617156E; Sat, 26 Mar 2022 12:41:51 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id l4-20020a17090a49c400b001c6840df4a3so11740340pjm.0; Sat, 26 Mar 2022 12:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=aIwjZik1/zaruSghW8xQ1i1xKaqz8bOpA5tKq+kgq4I=; b=Koc4LEfz52vM+ytlgFf1R6AdkBHrEdS+1zRabCjFI7Fanfph3BsoRX6mOf7yl0GOFz 5hEFZtyR9gDKxyp2uSRCifdOd+BsjNEYNSmg2vqWTrgULzxlQ6ee2plh/YDEpyY17T6z 4aMo9PK6mJqIqA7fng+yPFZNmoypVU0Y0HXRWr7GIAfblaAi8y+qChcuNnGR2CVmjYky sF+exsnBlH96LcgkcTqRD9PkZtf6z55iPQ/RxUNVA1ADldCalb5S7uN57na9zP6PyKFB W7PKTtoTQbIhmORIGxGLs4beLrrAznH7pRKfJ91MpLr838BKo2uTBQPSw/jxco+QzwRn E6aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=aIwjZik1/zaruSghW8xQ1i1xKaqz8bOpA5tKq+kgq4I=; b=eIaJCWEfPhQLjxmPPNf7gvJ945/NUknMwOlyXyfaM3sv0ipiiiDpRWmwLMpFkSyYfG NVSBsr3naFe6jrZxkWnZlLpAtqfQIlVRXjmvCEcFwv5YWkQH3QM6fcmjfKgDm/JGibjE mWidTp/LoDhv6XRYc2mEKeOqcfIdy0h34oSXJyVoCyAgg+wA7uHQq7xrf7Fn2CqBRevH feTIwd9yvP4JtZSI0QoaUTFLwC1exNPizxA9ZahHviZ7D9sjw3Z9L+WCvx2sZPvniHn9 07B6bz55acqLbeeqR8HyRMeVTo9VyBdWyW5fwRq9yZayV/A2i1i+TniTguE7uBW9aFjh r19w== X-Gm-Message-State: AOAM533kRZ8ZOJ35dRMON1VdLyv4QCS85KpTeuoIDgtMuX7XBO8jm+9T pO4RgLkGpJ8MBAwz0NXBZ24= X-Received: by 2002:a17:902:da92:b0:154:10dc:26f8 with SMTP id j18-20020a170902da9200b0015410dc26f8mr18309675plx.133.1648323710915; Sat, 26 Mar 2022 12:41:50 -0700 (PDT) Received: from localhost.localdomain ([116.75.119.161]) by smtp.gmail.com with ESMTPSA id k185-20020a6384c2000000b003821dcd9020sm8778784pgd.27.2022.03.26.12.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Mar 2022 12:41:50 -0700 (PDT) From: Jagath Jog J To: dan@dlrobertson.com, jic23@kernel.org, andy.shevchenko@gmail.com Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/5] iio: accel: bma400: Add support for buffer and step Date: Sun, 27 Mar 2022 01:11:41 +0530 Message-Id: <20220326194146.15549-1-jagathjog1996@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds trigger buffer support with data ready interrupt, separate channel for step counter and an event for step change interrupt. changes since v1 1. Added comment section that describes the math for scale calculation. 2. Added separate devm_add_action_or_reset() calls to disable regulator and to put the sensor in power down mode. 3. Remove the err_reg_disable and out, goto labels and returning directly if error occurs. 4. Added mutex calls while putting sensor in power down. 5. Added ___cacheline_aligned for device data. 6. Ordering the header includes. 7. Handling erroneous and spurious interrupts in the interrupt handler by returning IRQ_NONE. 8. Using dev_err_probe() instead of dev_err(). 9. Configured the interrupt to open drain. 10. Using le16_to_cpu() to fix the sparse warning. 11. Checking the step change event is enabled or not. 12. Enabling the step change event will also enable the step channel. 13. Using FIELD_GET() instead of bitwise operation. 14. Removal of dead code in the _event_config(). Jagath Jog J (5): iio: accel: bma400: Fix the scale min and max macro values iio: accel: bma400: conversion to device-managed function iio: accel: bma400: Add triggered buffer support iio: accel: bma400: Add separate channel for step counter iio: accel: bma400: Add step change event drivers/iio/accel/Kconfig | 2 + drivers/iio/accel/bma400.h | 37 +++- drivers/iio/accel/bma400_core.c | 351 +++++++++++++++++++++++++++----- drivers/iio/accel/bma400_i2c.c | 10 +- drivers/iio/accel/bma400_spi.c | 10 +- 5 files changed, 341 insertions(+), 69 deletions(-) -- 2.17.1