From patchwork Thu Mar 16 23:48:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mehdi Djait X-Patchwork-Id: 13178400 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 88F53C74A5B for ; Thu, 16 Mar 2023 23:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230033AbjCPXsu (ORCPT ); Thu, 16 Mar 2023 19:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbjCPXst (ORCPT ); Thu, 16 Mar 2023 19:48:49 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D3B223D81; Thu, 16 Mar 2023 16:48:48 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id cy23so14005178edb.12; Thu, 16 Mar 2023 16:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679010527; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=x6CcKQfQ3li/OQy0XLK7pgN4pP6FbzFrSofkOie9NH4=; b=ARhQMkkcRHRju2Mco0fL2F9mLgQuG1l9gUzuIIwO1ajhxS1dK6kT5sg2NAQD/8j747 NMYhTn0uPfX/NcuGFX5CPYsSb2JxeqNPBDI9njH3whLXXutoo28MIFqkqqrE+XYisqhV prndGKEgEcijBj5JcJisDrtreOWSgIMsG4jxV5cvInqJfueZCP00tIPzm4dnX4S1I86r 3gfTEAXFvRtqbmpu8oS6wkrPAP4Un+1wjTRA0eUeBNh4hquDiMK05rH6rJD/PI9bxvNn TRNOPTSULk04cgXr244le466heWOwi8YI9ruQrJjHo/XjdAZSrcAA5SrpQTK3UxcfURv V/CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679010527; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=x6CcKQfQ3li/OQy0XLK7pgN4pP6FbzFrSofkOie9NH4=; b=WC018x2zFndQcrp591thK9iIUuOh//z7loXMD+tMYncsSgXAwSNUYMCzmyLOeU5XwO 8TbjX5e+QQDtabwM2kCSPkG4fWpOzANfyx7P7ldS30ovr0wb2n7HL2i7sIU5jBrcLsge PRkCrYdI1wdTE07PlxxLZNTEGtatvZ9kEGpqRGfQ8V9Imuh34NZQYttCj8uXCQYYWBPw DlrJFLJ0IHKFyUywmsfdhO1BOPFIiPPtqFWT0HkUsQOX/Gz/FBEKoeEOBQ8UUFPK1Jrw pCmJm7q1GZaSl23CcEtXk4h+MTJk4d4r4udmJ1HToIhyv+qbKAMVTorFcVEoz7tL2ztI w9BA== X-Gm-Message-State: AO0yUKWCkA8Ya7ksZ5x9t+LxQdbRPvbNyITXBLQO2F3uaj0ugA5GkQNe 0ONTmeqsKiJtjlob3TI4qoQ= X-Google-Smtp-Source: AK7set88K1g3guSHAqEW0yiw3gxUkxpaqyAds3f35L8epGGiQzX6te7ztmZ2sYhw6qeIG0lwLJIOHA== X-Received: by 2002:a17:906:f2c9:b0:931:bc4a:ce08 with SMTP id gz9-20020a170906f2c900b00931bc4ace08mr468010ejb.36.1679010526637; Thu, 16 Mar 2023 16:48:46 -0700 (PDT) Received: from localhost.localdomain ([2a02:8109:aa3f:ead8::a442]) by smtp.gmail.com with ESMTPSA id h24-20020a1709062dd800b008db605598b9sm226896eji.67.2023.03.16.16.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 16:48:46 -0700 (PDT) From: Mehdi Djait To: jic23@kernel.org, mazziesaccount@gmail.com Cc: krzysztof.kozlowski+dt@linaro.org, andriy.shevchenko@linux.intel.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mehdi Djait Subject: [PATCH 0/3] iio: accel: Add support for Kionix/ROHM KX132 accelerometer Date: Fri, 17 Mar 2023 00:48:34 +0100 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org KX132 accelerometer is a sensor which: - supports G-ranges of (+/-) 2, 4, 8, and 16G - can be connected to I2C or SPI - has internal HW FIFO buffer - supports various ODRs (output data rates) The KX132 accelerometer is very similair to the KX022A. One key difference is number of bits to report the number of data bytes that have been stored in the sample buffer: 8 bits for KX022A vs 10 bits for KX132. A complete list of differences is listed in [1] [1] https://kionixfs.azureedge.net/en/document/AN112-Transitioning-to-KX132-1211-Accelerometer.pdf1 Mehdi Djait (3): dt-bindings: iio: Add KX132 accelerometer iio: accel: kionix-kx022a: Add chip_info structure iio: accel: Add support for Kionix/ROHM KX132 accelerometer .../bindings/iio/accel/kionix,kx022a.yaml | 13 +- drivers/iio/accel/kionix-kx022a-i2c.c | 21 +- drivers/iio/accel/kionix-kx022a-spi.c | 24 +- drivers/iio/accel/kionix-kx022a.c | 413 +++++++++++------- drivers/iio/accel/kionix-kx022a.h | 181 +++++++- 5 files changed, 464 insertions(+), 188 deletions(-)