From: Mehdi Djait <mehdi.djait.k@gmail.com>
To: mazziesaccount@gmail.com, jic23@kernel.org
Cc: linux-iio@vger.kernel.org, Mehdi Djait <mehdi.djait.k@gmail.com>
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 [thread overview]
Message-ID: <0003ce97298da5afd9cfeab8ae8f93f50542fe8c.1674996464.git.mehdi.djait.k@gmail.com> (raw)
In-Reply-To: <cover.1674996464.git.mehdi.djait.k@gmail.com>
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 <mehdi.djait.k@gmail.com>
---
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,
--
2.30.2
next prev parent reply other threads:[~2023-01-29 13:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-29 13:37 [PATCH 0/2] iio: accel: kionix-kx022a: Minor fixes Mehdi Djait
2023-01-29 13:37 ` Mehdi Djait [this message]
2023-01-30 7:37 ` [PATCH 1/2] iio: accel: kionix-kx022a: Fix the setting of regmap_config rd_table and wr_table Matti Vaittinen
2023-01-31 19:32 ` Mehdi Djait
2023-01-29 13:37 ` [PATCH 2/2] iio: accel: kionix-kx022a: Remove the unused member g_range Mehdi Djait
2023-01-30 8:17 ` Matti Vaittinen
2023-02-05 14:56 ` Jonathan Cameron
2023-01-30 8:15 ` [PATCH 0/2] iio: accel: kionix-kx022a: Minor fixes Matti Vaittinen
2023-01-31 19:48 ` Mehdi Djait
2023-02-01 5:36 ` Matti Vaittinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0003ce97298da5afd9cfeab8ae8f93f50542fe8c.1674996464.git.mehdi.djait.k@gmail.com \
--to=mehdi.djait.k@gmail.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.