[PATCH 1/2] iio: accel: kionix-kx022a: Fix the setting of regmap_config rd_table and wr_table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux