From patchwork Fri Oct 21 11:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 617298 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F65DC4332F for ; Fri, 21 Oct 2022 11:22:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbiJULWD (ORCPT ); Fri, 21 Oct 2022 07:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbiJULWC (ORCPT ); Fri, 21 Oct 2022 07:22:02 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6BD4261429; Fri, 21 Oct 2022 04:21:58 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id x18so3291395ljm.1; Fri, 21 Oct 2022 04:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ff1Fq682tglQjFEQ/rqieCnCur14IRaiPmZgfb2AelY=; b=XHLvvmzXj37dVZagPb6YYIKoOd5wpMQ6+GBhmlRl2ZKrXQRsPNqBOXoSwvn60UtPJA NUDeILUT9Grntpu4Llh2phTOIS7rN21FNrVFgfWmLSmjwKdBgrsAVEA4QoJE3LmQosjc aHBe4NHvQgsfLkI0JWOdL83aoKW3J4rGWychQZ0TDRRDswpwqIoN7E3ZUay+K/FPmapx PappMSJ+rv9t045c6fA7aq3Dog4/+2NpX3SYLi+iO44BC+v4ckyHdafu+fHu8/ptvnVt aoJrmaot+Eed2pN1FDyv5Xd4QbkT/EUpqqRgzBqX/ekcu++kX6fqgFTFV2QR8uDbyiWe hCJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ff1Fq682tglQjFEQ/rqieCnCur14IRaiPmZgfb2AelY=; b=ip+DvW6ZuACutEuNwF3AVawclhgX4gJtzCdr1gkyGadBdOsdS/qYf5Rrkqpu/xFnyy EBIPgkuypQM7gnE/NUB8+95v5qeVCxApO9z9nMN0+//SyqiBjmGhJw+Y5TMYs8rwo/cQ 0/pf9J/EkOefLhWjMe6VZD60oycH7rifaxfpF1MrC/No1mH8Ka07ZD4YH6djCInIiPBz STZLdM9tu+KC8MsipKhPrwOrCWTMJlidWVocPTnyj++BAD9auaYHBhHMUCHHlgsOUOTV ge05Z8r4VDIwlt3ZOYovIZ92XBC5kSFjUKd5ujvxKmms0EoPmlzJ5RKMg40Mi3CfyOt5 4vBw== X-Gm-Message-State: ACrzQf3Oydpqkpx5pcwFPkaKN+V2hBp8Y+UuADEswEwqC7Djoy51zZRc uEFdWVzxRkq3jAkKZ2uGQlY= X-Google-Smtp-Source: AMsMyM6f8zbyDcV8HfSn/DBBK+Ilh0ts3mTJMAVMsXMXR1Y9djsI6TtgvCgCQMVz6eioC2jutIZA1A== X-Received: by 2002:a2e:b80f:0:b0:26d:fd9d:6e29 with SMTP id u15-20020a2eb80f000000b0026dfd9d6e29mr7028798ljo.391.1666351316436; Fri, 21 Oct 2022 04:21:56 -0700 (PDT) Received: from dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi (dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::2]) by smtp.gmail.com with ESMTPSA id t16-20020a056512209000b0048b26d4bb64sm3133368lfr.40.2022.10.21.04.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 04:21:55 -0700 (PDT) Date: Fri, 21 Oct 2022 14:21:51 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matti Vaittinen , 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: [PATCH v4 1/3] dt-bindings: iio: Add KX022A accelerometer Message-ID: <06f8e1ab29d02ed216db10091a269df4b6abad9a.1666350457.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 the basic device tree description for the accelerometer. Only basic accelerometer features are considered as of now - new properties may or may not be needed in the future when rest of the features are supported. Signed-off-by: Matti Vaittinen Reviewed-by: Krzysztof Kozlowski --- v3 => No changes. v2 => v3 as suggested by Krzysztof: - better check for the interrupt-names RFCv1 => v2: Based on a review by Krzysztof: - fix a typo from commit message - const compatible - drop unnecessary descriptions/words - io_vdd-supply => io-vdd-supply - fix the binding example indentiation Also, - change my email address - support both INT pins --- .../bindings/iio/accel/kionix,kx022a.yaml | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml new file mode 100644 index 000000000000..986df1a6ff0a --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kx022a.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/accel/kionix,kx022a.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ROHM/Kionix KX022A Accelerometer + +maintainers: + - Matti Vaittinen + +description: | + KX022A is a 3-axis accelerometer supporting +/- 2G, 4G, 8G and 16G ranges, + output data-rates from 0.78Hz to 1600Hz and a hardware-fifo buffering. + KX022A can be accessed either via I2C or SPI. + +properties: + compatible: + const: kionix,kx022a + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + + interrupt-names: + minItems: 1 + items: + - enum: [INT1, INT2] + - const: INT2 + + vdd-supply: true + io-vdd-supply: true + + mount-matrix: + description: | + an optional 3x3 mounting rotation matrix. + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + accel@1f { + compatible = "kionix,kx022a"; + reg = <0x1f>; + + interrupt-parent = <&gpio1>; + interrupts = <29 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "INT1"; + + io-vdd-supply = <&iovdd>; + vdd-supply = <&vdd>; + }; + }; From patchwork Fri Oct 21 11:23:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 617297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86A46C43219 for ; Fri, 21 Oct 2022 11:23:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbiJULX3 (ORCPT ); Fri, 21 Oct 2022 07:23:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiJULX2 (ORCPT ); Fri, 21 Oct 2022 07:23:28 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2BB1263093; Fri, 21 Oct 2022 04:23:21 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id g7so4550943lfv.5; Fri, 21 Oct 2022 04:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Aqpdzxh11piHyrsdYH/hMiJ+aTKND0zUJe+5TRJCoCA=; b=Z0bH4IF8UY8KyFRVfg89Ce9qfemn10tWWyc9UKPS5DUGTeX+mCHfG1Rl9Akl6r/MCx YeLIDU5fEhR1wlP2osDsN8bXKglWOOBIj7dL+Il5+JKJc8pD0poBJZUgXi9n4JrxcLqo IRtelBKZIP0czN0m0WulZbOhzyRuTIsnZTChhBVu7NRDtpj76wqDx9WsIL5lYVsT9W/m 40njxh8s1iO91waXHneCSNnRvnkYaW+Q0HS8p/VcTLMDWdv82I5iBkNNWxSDVbOg9IYe cJ5pUj4QCBKAWbUp3AeizEpFR3ikXcAkMowHS+/o8N7Df1mmduCtAG6x5Tto04Hu0sp0 KurQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Aqpdzxh11piHyrsdYH/hMiJ+aTKND0zUJe+5TRJCoCA=; b=39n9HEWBtPCQM3gQT9g/ojO/H97uaT01E10LwkwSGX25iI/3pakwQMnp9EDp22cy/j wRFc/I+RPg2wqhEaXO8PhrKt1YanDFTmqHgnQeC7/pOMANGSFbCWwF0/slaeEnl6VV7o moKDsifkYAyv9ityGIX0XtZYoKwlGj5eWUwl4QpFNesEuie5YAeBAs/NMMTBmZZqcXpz J2mX2WXONNnmPTg4qhJejasXRsanxL7w/AIf4InHYg+REJImRQQ3nWNdBOfc/01CGgzN xrveznXfwu8at31yt/CX96DG0FG17p6utP9KzVxVlwC30slLLp4wLYBMIV6uNn/daGLb FT2Q== X-Gm-Message-State: ACrzQf3LIlgAaGAtZRevbZZhz9WT8IxHOnCE/lIf361SfY2FCH5RYdkK VXjRKD3R9veB/OOX9Lmf450= X-Google-Smtp-Source: AMsMyM5o5dWYAn/8FS+pHRs7ka8TDtNjya43of5VK6oNagezPOdvuy5HO5EVbsUKFJI+n+5l9iDTcA== X-Received: by 2002:a19:6558:0:b0:4a4:7fc2:7927 with SMTP id c24-20020a196558000000b004a47fc27927mr7038375lfj.674.1666351399998; Fri, 21 Oct 2022 04:23:19 -0700 (PDT) Received: from dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi (dc75zzyyyyyyyyyyyyyby-3.rev.dnainternet.fi. [2001:14ba:16f3:4a00::2]) by smtp.gmail.com with ESMTPSA id l2-20020a2e3e02000000b0026be1de1500sm3341009lja.79.2022.10.21.04.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 04:23:18 -0700 (PDT) Date: Fri, 21 Oct 2022 14:23:13 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Matti Vaittinen , 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: [PATCH v4 3/3] MAINTAINERS: Add KX022A maintainer entry Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add maintainer entry for ROHM/Kionix KX022A accelerometer sensor driver. Signed-off-by: Matti Vaittinen --- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index cf0f18502372..3ab9c5f97dfe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11435,6 +11435,11 @@ F: drivers/mfd/khadas-mcu.c F: include/linux/mfd/khadas-mcu.h F: drivers/thermal/khadas_mcu_fan.c +KIONIX/ROHM KX022A ACCELEROMETER +R: Matti Vaittinen +S: Supported +F: drivers/iio/accel/kionix-kx022a* + KMEMLEAK M: Catalin Marinas S: Maintained