Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp567380rwj; Sat, 29 Oct 2022 07:30:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ewFSODKyQ+0YBNvvxYK5HfmWLIQPH9oAvF91cDY6DL5UDVeeZRif0ykg0XeMPwPtx78b3 X-Received: by 2002:a17:906:5d11:b0:78d:a41c:6a2d with SMTP id g17-20020a1709065d1100b0078da41c6a2dmr4027932ejt.215.1667053829661; Sat, 29 Oct 2022 07:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667053829; cv=none; d=google.com; s=arc-20160816; b=X1kEHeQ4M/PLWF3xn/jQBVT6t1stjjBCBs43kedNFp6MJh17luBZWtUpMMqtuWGBoP jmK1DKk7AP9usfv+z7N6dWFRhCosc4eidoldxZzE0hu86pPIxdB5b8YbRpMjUa5rBZkW jKAG4M1VI+S9ZgXXCroNpPHvITPQC0+j3EEvjoTzDC5Q4ZtN0uR3O4+9lEuuFkc5C4TJ rBj1PLpQE60Zo1XFnbNqd+fKP/5fYG49COH5wFIDk1Hgs9w10a6Q6WYvxDn0CH/m+LVk b4sM0WToKyMXmxttD0LUM7x8i0Xso6Mh3d0ya7jqHteXrqSR8YZzmVJIXNtOAyUPC53x NMiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9B8VJyDb0rh3H3bQirDw31SVXMn2Y1FImXPaHrqSrPI=; b=zNs9ADlx23vsjJLzn57CBN3MtMdaYvDpEz7lNcnSCidD2h/H5yfeKttz0WssAa6shW z0dkRHkwRpPg9X9AzHrl+Etdg1BFGz7qw8KdclAD8fxVcWj538Up8DrK5QBWJ1xXHhBS dHDyRIAopoz/WuD5eMAy1OI5rrdkHL5Hb+l+SJ6m/Vn0CmORECrhQeIFshmZ4/cE6Xs/ 78OSacEtLbUvL3OmvxP4bM0amDD9CefiNa+i6aDrsZYxUu9kMTDFf4moc77RarxF+zzj Zc96mjuaBHZ9uJpqK7IMMD+/MrIVtVG20LI4mDcnqXl2oTTLsgoIunpu4VtWKM7zH3JX ye0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B7ywb3mK; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m30-20020a50d7de000000b0045935adb5b1si1868106edj.395.2022.10.29.07.30.03; Sat, 29 Oct 2022 07:30:29 -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=@kernel.org header.s=k20201202 header.b=B7ywb3mK; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229706AbiJ2OG6 (ORCPT + 99 others); Sat, 29 Oct 2022 10:06:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiJ2OGz (ORCPT ); Sat, 29 Oct 2022 10:06:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706411C414; Sat, 29 Oct 2022 07:06:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 08F7460AB2; Sat, 29 Oct 2022 14:06:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47383C433D6; Sat, 29 Oct 2022 14:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667052413; bh=mw/F8OFLAgejD/aXIyUkv73wixGgwK/udqyK3fMoweA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=B7ywb3mKxrpo+OglEUmVNX0+otzqYbJCqpFdFOKF+O4Sci/9u9ZjHWRCCYZCvL+Tw KVWPYlCrFAOIgrrQtu23Wi0HfSi34d9Hffv4T7sdPTW2c/d4Oh6Kk9BoUltLBMDrgn pqPdnp+whCnNKg8m0bWkZ5CwnZh7qq2U+YADzJ6+IymlMEIfIzQQmJn0BMy6FVHFdT 5xbYVzlJLhQbOubE8QfF4V4gi4vC/ULQ9h4Em1eevMfyyLmck8rR6gIG3rtasju3bL ZQzKrL9lrFOAsMJwJMcw0QVZdIrmfEhekW4Ma28L0Qa8P/Xd09HqY4ZNuN5LkXOcLh kUlwxCPqTDWsQ== Date: Sat, 29 Oct 2022 15:18:46 +0100 From: Jonathan Cameron To: Matti Vaittinen Cc: Matti Vaittinen , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Andy Shevchenko , Dmitry Rokosov , Nikita Yushchenko , Cosmin Tanislav , Jagath Jog J , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/3] iio: accel: Support Kionix/ROHM KX022A accelerometer Message-ID: <20221029151846.399547a7@jic23-huawei> In-Reply-To: <758b00d6aea0a6431a5a3a78d557d449c113b21e.1666614295.git.mazziesaccount@gmail.com> References: <758b00d6aea0a6431a5a3a78d557d449c113b21e.1666614295.git.mazziesaccount@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Mon, 24 Oct 2022 15:40:29 +0300 Matti Vaittinen wrote: > KX022A is a 3-axis accelerometer from ROHM/Kionix. The sensor features > include variable ODRs, I2C and SPI control, FIFO/LIFO with watermark IRQ, > tap/motion detection, wake-up & back-to-sleep events, four acceleration > ranges (2, 4, 8 and 16g), and probably some other cool features. > > Add support for the basic accelerometer features such as getting the > acceleration data via IIO. (raw reads, triggered buffer [data-ready] or > using the WMI IRQ). > > Important things to be added include the double-tap, motion > detection and wake-up as well as the runtime power management. > > Signed-off-by: Matti Vaittinen > ... > --- > drivers/iio/accel/Kconfig | 21 + > drivers/iio/accel/Makefile | 3 + > drivers/iio/accel/kionix-kx022a-i2c.c | 51 ++ > drivers/iio/accel/kionix-kx022a-spi.c | 58 ++ > drivers/iio/accel/kionix-kx022a.c | 1142 +++++++++++++++++++++++++ > drivers/iio/accel/kionix-kx022a.h | 82 ++ > 6 files changed, 1357 insertions(+) > create mode 100644 drivers/iio/accel/kionix-kx022a-i2c.c > create mode 100644 drivers/iio/accel/kionix-kx022a-spi.c > create mode 100644 drivers/iio/accel/kionix-kx022a.c > create mode 100644 drivers/iio/accel/kionix-kx022a.h > > diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig > index ffac66db7ac9..b7fd054819d2 100644 > --- a/drivers/iio/accel/Kconfig > +++ b/drivers/iio/accel/Kconfig > @@ -409,6 +409,27 @@ config IIO_ST_ACCEL_SPI_3AXIS > To compile this driver as a module, choose M here. The module > will be called st_accel_spi. > > +config IIO_KX022A > + tristate > + > +config IIO_KX022A_SPI > + tristate "Kionix KX022A tri-axis digital accelerometer" Entry should mention SPI / I2C or we have two menu options that are identical. I'll fix that if nothing else comes up. > + depends on SPI > + select IIO_KX022A > + select REGMAP_SPI > + help > + Enable support for the Kionix KX022A digital tri-axis > + accelerometer connected to I2C interface.