From patchwork Sun Jan 29 13:37:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mehdi Djait X-Patchwork-Id: 13120134 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 27161C61D97 for ; Sun, 29 Jan 2023 13:38:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229549AbjA2Nia (ORCPT ); Sun, 29 Jan 2023 08:38:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbjA2Ni3 (ORCPT ); Sun, 29 Jan 2023 08:38:29 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAC471E287 for ; Sun, 29 Jan 2023 05:38:28 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id m2so24573977ejb.8 for ; Sun, 29 Jan 2023 05:38:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dj/3crDkqPP4w2eLcips03FDdHELDSaaQ2/SmuyqAFo=; b=KR7aywQRARXzeIRbTRnOqjsF8k/8rlzR+GmW0/ByTkGPxI3RrJMr0g4EYWntJ+fiGy tcsd4skmNoCVO/xwAI9+amNR1FYQOAuc0mjb+m0O4cKslC17kIDSKPtTaUmbohqgI/t8 O6PkqhxLckA+dkDkVOx/Db9gYN46EYZ9t32i8EAhq3o+M9wkF8dxczElVpir9Pd+bmV0 i93Z5nfXpCd6iLMt5w9H28qbZb9KfjZnLwIwTdWq1WeFyGt2TVqUgbZ+olgpaGp+FgAe 8Ob4i3Lv0yNreQhGegx/4q/2EIjPNUqmU2CS/fM1EXe8niw/XmpTb2R95x4wAoDWYz/f XIvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dj/3crDkqPP4w2eLcips03FDdHELDSaaQ2/SmuyqAFo=; b=p8uKLs5/pGOyiQi1HdTbgLQhlaZSY6/52W7h7+Z/yCNTj1psbuoKJHwZBdXaOWtNrt Ecuha3Q6PSqylB0TVCBqwgmTtrg8OM3LhHs1Wdn4Ivd2jHzv8lZwfI2m6uk8jtMDSOzV XF2DBdUVcGPpNqkmqfw/HLsx2rZECwLVKxwkGqIC6AfOp+WaxY2qx/0kMCfuHGabBpH+ Ghb2nFwFsxTIfgHh5uji3AOQUF5Lag5dUSF/F2SfKOdopBjQwBKh24uS4T1fOB1zpSjo icbtA4f0tNiHA6BcUml9kzPVrhOz+7CpR0XHfapyYH1lfo0G9NhqKGi+xwwVUqQXukqx oYsw== X-Gm-Message-State: AO0yUKVkgtsnRi3eBtior1NBe4mi8RoHmdEDnCrks6wNLNULxsE0AZwG znc8hB8MB+grSvuCm+fXtyA= X-Google-Smtp-Source: AK7set+fuuR/F1qIvMX2BrzIOnh/dEcEwr4CYnXC9Fc60u2gemNgl8IGBUpLW7rg+rizia4BrkxKmQ== X-Received: by 2002:a17:907:62a1:b0:87a:3aff:cffa with SMTP id nd33-20020a17090762a100b0087a3affcffamr11990510ejc.27.1674999507273; Sun, 29 Jan 2023 05:38:27 -0800 (PST) Received: from carbian.corp.quobyte.com ([2a02:8109:aa3f:ead8::c406]) by smtp.gmail.com with ESMTPSA id j4-20020a170906474400b00856ad9108e7sm5371018ejs.70.2023.01.29.05.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Jan 2023 05:38:26 -0800 (PST) From: Mehdi Djait To: mazziesaccount@gmail.com, jic23@kernel.org Cc: linux-iio@vger.kernel.org, Mehdi Djait Subject: [PATCH 1/2] iio: accel: kionix-kx022a: Fix the setting of regmap_config rd_table and wr_table Date: Sun, 29 Jan 2023 14:37:45 +0100 Message-Id: <0003ce97298da5afd9cfeab8ae8f93f50542fe8c.1674996464.git.mehdi.djait.k@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org rd_table points to a regmap_access_table with valid ranges for read access and should be set to &kx022a_ro_regs which points to the read_only regs. The same for wr_table. Signed-off-by: Mehdi Djait --- drivers/iio/accel/kionix-kx022a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c index f866859855cd..1d3af42ec0e1 100644 --- a/drivers/iio/accel/kionix-kx022a.c +++ b/drivers/iio/accel/kionix-kx022a.c @@ -142,8 +142,8 @@ const struct regmap_config kx022a_regmap = { .reg_bits = 8, .val_bits = 8, .volatile_table = &kx022a_volatile_regs, - .rd_table = &kx022a_wo_regs, - .wr_table = &kx022a_ro_regs, + .rd_table = &kx022a_ro_regs, + .wr_table = &kx022a_wo_regs, .rd_noinc_table = &kx022a_nir_regs, .precious_table = &kx022a_precious_regs, .max_register = KX022A_MAX_REGISTER, From patchwork Sun Jan 29 13:37:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mehdi Djait X-Patchwork-Id: 13120135 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 9961BC61D97 for ; Sun, 29 Jan 2023 13:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbjA2Nim (ORCPT ); Sun, 29 Jan 2023 08:38:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbjA2Nil (ORCPT ); Sun, 29 Jan 2023 08:38:41 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E774613505 for ; Sun, 29 Jan 2023 05:38:40 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id qw12so9129455ejc.2 for ; Sun, 29 Jan 2023 05:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yhOlIWiyvSLGe85NFsumDCK1qE1JL6EBHu94nwRASkU=; b=aK1eM/6vRdwrxAfcmplcRlmhrtkMJTBr9qGF2qw6t0s4s64NwZ3+pPX1SzX1LxAY8Y Zed3JAcuWYafoZRxBXAflttDQn5BPQamclg7kDFJq7/CVXr/hNSlSn8mqlGCoh8n3Rd/ 2lmYXxRc6ZshAj8iN8QkZ9OKo7+XvGwdXUl9FTxO5Yhj5znqiTMD9YRJvTY4yW3Uf17K x7QE6FV4HNdDqo8zyCt1XHLNN8Zx3y3nLCUn/PyX3StVu1KLRu5ZrmViFsayh81P51Y/ ANOjpZLbKlub5/eVelUrGWpCSEu2+QPWMxW5ipEyYN1RCg5TluHPL8vpNnfN7Sv1xc0O H5Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yhOlIWiyvSLGe85NFsumDCK1qE1JL6EBHu94nwRASkU=; b=H/K3wCg631WVxapXikpxCMi5+t/UTWFnZ8HgBauZ9DZplebblvTUUVRNhtxxHww0vx QokZI6dvA1RDoigD7QHpOqvVmgXFDnIp+ZS+S+pOa8MpltmHbbUdtvjubqkCPtjaEf0m SPJBLXvZGUjjEIphvyla6NpHQKI7o6GUNerbCOVFbmMlXiv4FBgXjDxc4xhRaObl907J UAyri5FxWWc59nG91FMEb19C2HUm7f0bCgu9eBKtwljfmFgRCc9fphM5JLuXcIBGLaa+ UTkuDNHaHMWMu7lw0EAZrD+Wvg66j1M9IAnL5nU5fjTBkN89qXDnwXOL0PX8zt/BwFB9 MGVQ== X-Gm-Message-State: AO0yUKWtnhIBFnLWyWkMZP+SEiGb/P2CF6LhVNSgDyJKl96VN9N6rcUa inMW046kNj+lRSK0Kf4rMjY= X-Google-Smtp-Source: AK7set9U56vRkXd+tNxEUl3sldI+7A5fBVVA66JXes3iQaYNUzyUAi6eo8k1kWKCw7I7DEarsB79Aw== X-Received: by 2002:a17:906:e096:b0:878:4d11:f868 with SMTP id gh22-20020a170906e09600b008784d11f868mr14314442ejb.2.1674999519219; Sun, 29 Jan 2023 05:38:39 -0800 (PST) Received: from carbian.corp.quobyte.com ([2a02:8109:aa3f:ead8::c406]) by smtp.gmail.com with ESMTPSA id j4-20020a170906474400b00856ad9108e7sm5371018ejs.70.2023.01.29.05.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Jan 2023 05:38:38 -0800 (PST) From: Mehdi Djait To: mazziesaccount@gmail.com, jic23@kernel.org Cc: linux-iio@vger.kernel.org, Mehdi Djait Subject: [PATCH 2/2] iio: accel: kionix-kx022a: Remove the unused member g_range Date: Sun, 29 Jan 2023 14:37:46 +0100 Message-Id: X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org The g_range member of the driver data struct is not used and should therefore be removed. Signed-off-by: Mehdi Djait Reviewed-by: Matti Vaittinen --- drivers/iio/accel/kionix-kx022a.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/accel/kionix-kx022a.c b/drivers/iio/accel/kionix-kx022a.c index 1d3af42ec0e1..bb43cb0acce4 100644 --- a/drivers/iio/accel/kionix-kx022a.c +++ b/drivers/iio/accel/kionix-kx022a.c @@ -162,7 +162,6 @@ struct kx022a_data { int inc_reg; int ien_reg; - unsigned int g_range; unsigned int state; unsigned int odr_ns;