[PATCH v2] mfd: da9052-spi: change read-mask to write-mask

Marcus Folkesson posted 1 patch 2 months ago
drivers/mfd/da9052-spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH v2] mfd: da9052-spi: change read-mask to write-mask
Posted by Marcus Folkesson 2 months ago
Driver has mixed up the R/W bit.
The LSB bit is set on write rather than read.
Change it to avoid nasty things to happen.

Fixes: e9e9d3973594 ("mfd: da9052: Avoid setting read_flag_mask for da9052-i2c driver")
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
Changes in v2:
Reword the commit message and add Fixes: tag.
- Link to v1: https://lore.kernel.org/r/20240918-da9052-v1-1-ce7e7024e48c@gmail.com
---
 drivers/mfd/da9052-spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
index be5f2b34e18aebc7a9506123b366af5a5447df43..80fc5c0cac2fb0e5e99e6db8972f80ae4155b226 100644
--- a/drivers/mfd/da9052-spi.c
+++ b/drivers/mfd/da9052-spi.c
@@ -37,7 +37,7 @@ static int da9052_spi_probe(struct spi_device *spi)
 	spi_set_drvdata(spi, da9052);
 
 	config = da9052_regmap_config;
-	config.read_flag_mask = 1;
+	config.write_flag_mask = 1;
 	config.reg_bits = 7;
 	config.pad_bits = 1;
 	config.val_bits = 8;

---
base-commit: 200289db261f0c8131a5756133e9d30966289c3b
change-id: 20240918-da9052-df843a1b9d0e

Best regards,
-- 
Marcus Folkesson <marcus.folkesson@gmail.com>
Re: (subset) [PATCH v2] mfd: da9052-spi: change read-mask to write-mask
Posted by Lee Jones 1 month, 2 weeks ago
On Wed, 25 Sep 2024 12:19:53 +0200, Marcus Folkesson wrote:
> Driver has mixed up the R/W bit.
> The LSB bit is set on write rather than read.
> Change it to avoid nasty things to happen.
> 
> 

Applied, thanks!

[1/1] mfd: da9052-spi: change read-mask to write-mask
      commit: f77c2e93771be2d66c639c8eb0b463de2c321579

--
Lee Jones [李琼斯]