Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp423062rwb; Sat, 13 Aug 2022 00:34:11 -0700 (PDT) X-Google-Smtp-Source: AA6agR5klzKV2XsbG2EwTNH7+7Mk49J7rI1nVNK++hh/d589KLJciKXeXdvVfgV1HSSes70TRy1N X-Received: by 2002:a17:906:847c:b0:730:b6a0:e0d with SMTP id hx28-20020a170906847c00b00730b6a00e0dmr4947109ejc.126.1660376051453; Sat, 13 Aug 2022 00:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660376051; cv=none; d=google.com; s=arc-20160816; b=ZWRJ2KIOmXYTG7+aGt8tqZlwAXp3QNRGcC+wWP2ISvE/FLpHrI6aJRHA/U5SDasl77 r+OvEWBoV0RCg3iEnjgdt9Sxyfwpy4VNn4xIVaKtIq+0FpzCZ0cdMGYCxJPJkFD1Fn60 xhf5HiKZhmHgz4wNmuM4SizZhQtO9QjTwrxLqT/p8GsYGc7sDDYLOsWO3YQv9ANGyoVV n7vhH+sxJbRFARsbAG5EQ/If9peoaLkAvlq++PWAMfM1SGEBkQsrS4CyQVTNeKtUD7fk yQcGNS2kQO1ljM/0BxmJ2HV+PaPkM1/SBYGha6zUXomoZAFZuYfWaopQ12HWVYU6Q+ba jZpg== 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=hyi3W6o1iE4MzIUefZNiCk1gJXRkeduTAafJRxOanQo=; b=l8wSVXgNAZFsOpYbEQr3AAmeUnWubDGAhqnxpdz/iwS9TDRT+JF4iE1CJFcGAa9EgA XZs/7VYhkA+LG9vg+0HIv3G/uXpViXX9sy/DNJ9i+m62rAIGPwvJxnxMRw30M6unKVU6 N/lTg4w+LfgLf9NcmWXv/WsMosH4sNUTGJPFbXPRCO54rBk6ABww0vTjJ2BuXZEPjSqv LEfZCTtCGwBrCLj7dezd6DXyfbyvGBU2bSPADdab94QGk6CUdXA+IC84gJWY9iL6Xntw BZakCstkIme2+6uHokckM1OD7/FcarriekCVa3uiNBKOEj+jbhSUETKdQ7U/ptq9dh9u uh7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="XW/WHHcM"; 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 du8-20020a17090772c800b00733ca35c0a6si3934026ejc.626.2022.08.13.00.33.45; Sat, 13 Aug 2022 00:34:11 -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="XW/WHHcM"; 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 S238243AbiHMHSL (ORCPT + 99 others); Sat, 13 Aug 2022 03:18:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiHMHSJ (ORCPT ); Sat, 13 Aug 2022 03:18:09 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1DF15FAE8; Sat, 13 Aug 2022 00:18:08 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id m2so2489106pls.4; Sat, 13 Aug 2022 00:18:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc; bh=hyi3W6o1iE4MzIUefZNiCk1gJXRkeduTAafJRxOanQo=; b=XW/WHHcMWmAnAdids+ycJAct2rwaYJhdU1Rw/mLfhwjOy7uq0etlH/xydBLhhtdBJe StvNysphzkTPi7CTd+VwGU1+/g9fzidNkH5ov3g3MOxdfi9K5Z3n//BjJRRHW1+8COzM 8nrUbD3x4FnM9P4EniYCaz015zRD77ihsg/kbuROZCLDiAHgStRSghWxgn3xSImUvM+6 9p7WIGQ51a+5wa3LIfpI6JfV1kISFJCiML1bXk35ECtWKKjIXfmTY9aJ3zopQ2rbtSZh 8liSW7HN9Z+dxptN7bpX7pHngK1Yvh2y8cq52wS3i4aXoOFz72HCakUm1TTAS54CkpwG f7Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=hyi3W6o1iE4MzIUefZNiCk1gJXRkeduTAafJRxOanQo=; b=CUxP77inPcfmyc7010jq4KCU3NGq1lc25LbG+W9BLJVxszmfDdremp30oFfuNiXtwg oa3Dpw7Q2dLGI98dyanbPBOAa3BolVlFlyEXHr3jJszs1hf7HQRMx6gXSFwS0HXCxeG9 r+QP0/cjG2Oyom0F741Nisu7Pz/sQa5LOh1YbWmFxxI6lzA+YcDstzZ9bUWu0U3A27VC XWzO7n4RFdXcX+c2zGiF6CC/71Cpdsb1JCOjOLaS0+/51Lh4SGA5W+bEAzoRqPaONZU6 Ylajt6PySpOzHLSpaE5b69smTbCmT5aU0llm5vCXRG3D0gZZ0qoNNqa0d34XDSdLv2/t /S1w== X-Gm-Message-State: ACgBeo08x4o0IlOysoeT/MrNHerR5XEqjjqp/zYC98J7ziTkhS8kNmfa JO0FyRKNL4mLwPlkKQ9Q0dE= X-Received: by 2002:a17:90b:1189:b0:1f5:1311:cd89 with SMTP id gk9-20020a17090b118900b001f51311cd89mr17357965pjb.181.1660375088048; Sat, 13 Aug 2022 00:18:08 -0700 (PDT) Received: from localhost.localdomain ([115.99.250.21]) by smtp.gmail.com with ESMTPSA id r12-20020a6560cc000000b0041975999455sm2423001pgv.75.2022.08.13.00.18.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 00:18:07 -0700 (PDT) From: Jagath Jog J To: jic23@kernel.org, andy.shevchenko@gmail.com, hadess@hadess.net, hdegoede@redhat.com Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] iio: Add single and double tap events support Date: Sat, 13 Aug 2022 12:48:01 +0530 Message-Id: <20220813071803.4692-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 new event type for tap called gesture and direction is used to differentiate single and double tap. This series adds single and double tap support for bma400 accelerometer device driver. Changes since v1 1. Included headers in alphabetical order. 2. Changing tap_event_en variable name to tap_event_en_bitmask since it is used in bit manipulation operation. 3. Assigning boolean value to step_event_en and activity_event_en instead of 0, since they are boolean type members. 4. Using local variable for regmap_read() instead for *val itself. 5. Correcting typos. 6. Remove of IIO_EV_INFO_PERIOD. 7. Now all 4 tap controls like threshold, quiet, tics_dt and quiet_dt can be configured from the userspace. 8. Introducing new event info IIO_EV_INFO_RESET_TIMEOUT, and IIO_EV_INFO_TAP_2MIN_DELAY into iio_event_info. 9. Creating custom read/write attributes for tics_dt called in_accel_gesture_maxtomin_time. 10. Time based tap controls can be configured in seconds instead of raw values. 11. Provided all available values for time base tap controls in seconds. 12. Adding one more MODULE_AUTHOR(). Changes since RFC 1. Corrected the "quite" typo to "quiet". 2. Added proper reference and name of the section from datasheet. 3. Changed the ABI documentation to make it more generic. 4. Added ABI documentation for double tap quiet period. 5. Added available list by registering new event attribute for tap threshold values and double tap quiet period values. 6. Sending both single and double tap events separately. 8. Removed checking for tap enabled while changing data rate. 9. Returning invalid with error message if the input data rate is not 200Hz while enabling tap interrupts. 7. Added datasheet reference for interrupt engine overrun. Jagath Jog J (2): iio: Add new event type gesture and use direction for single and double tap iio: accel: bma400: Add support for single and double tap events Documentation/ABI/testing/sysfs-bus-iio | 41 +++ drivers/iio/accel/bma400.h | 13 + drivers/iio/accel/bma400_core.c | 337 +++++++++++++++++++++++- drivers/iio/industrialio-event.c | 7 +- include/linux/iio/types.h | 2 + include/uapi/linux/iio/types.h | 3 + tools/iio/iio_event_monitor.c | 8 +- 7 files changed, 399 insertions(+), 12 deletions(-) base-commit: 180c6cb6b9b79c55b79e8414f4c0208f2463af7d -- 2.17.1