[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211217224104.1747758-5-linuxkernel@fbautosys.co.uk>
Date: Fri, 17 Dec 2021 22:41:03 +0000
From: linuxkernel@...utosys.co.uk
To: linux-kernel@...r.kernel.org
Cc: broonie@...nel.org
Subject: [RFC PATCH 4/5] regmap: Add Parity Calculation to formatted write
From: Christopher Tyerman <c.tyerman@...ebladeautomationsystems.co.uk>
Altered formated write to set parity bit according to parity_write_mask
modified: drivers/base/regmap/regmap.c
Signed-off-by: Christopher Tyerman <c.tyerman@...ebladeautomationsystems.co.uk>
---
drivers/base/regmap/regmap.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index ec91eff52465..ea1664fa4c60 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1967,6 +1967,10 @@ static int _regmap_bus_formatted_write(void *context, unsigned int reg,
regmap_set_work_buf_flag_mask(map, map->format.reg_bytes,
map->write_flag_mask);
+ regmap_set_work_buf_parity_mask(map, map->format.reg_bytes,
+ map->parity_write_mask, map->write_flag_mask, reg,
+ &val, sizeof(val));
+
trace_regmap_hw_write_start(map, reg, 1);
ret = map->bus->write(map->bus_context, map->work_buf,
--
2.25.1
Powered by blists - more mailing lists