Skip to contentSkip to conversation

mfd: max77620: Use single-byte writes on MAX77620

PATCH Applied Thierry Reding 3 participants 4 messages Apr 17, 2020 – May 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: max77620: Use single-byte writes on MAX77620

From: Thierry Reding <[email protected]>

The MAX77620 doesn't support bulk writes, so make sure the regmap code breaks bulk writes into multiple single-byte writes.

Note that this is mostly cosmetic because currently only the RTC sub- driver uses bulk writes and the RTC driver ends up using a different regmap on the MAX77620 anyway. However, it seems like a good idea to make this change now in order to avoid running into issues if bulk writes are ever used by other sub-drivers sometime down the road.

---
 drivers/mfd/max77620.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/max77620.c +1 -0
index c7ed5c353553..fec2096474ad 100644
@@ -177,6 +177,7 @@ static const struct regmap_config max77620_regmap_config = {
 	.rd_table = &max77620_readable_table,
 	.wr_table = &max77620_writable_table,
 	.volatile_table = &max77620_volatile_table,
+	.use_single_write = true,
 };
 
 static const struct regmap_config max20024_regmap_config = {
Signature · 1 line
2.24.1
maintainer Acked-by Tested-by on v1 1/1
#1 lore raw
Quoted 22 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The MAX77620 doesn't support bulk writes, so make sure the regmap code breaks bulk writes into multiple single-byte writes.

Note that this is mostly cosmetic because currently only the RTC sub- driver uses bulk writes and the RTC driver ends up using a different regmap on the MAX77620 anyway. However, it seems like a good idea to make this change now in order to avoid running into issues if bulk writes are ever used by other sub-drivers sometime down the road.

---
 drivers/mfd/max77620.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/max77620.c +0 -0
index c7ed5c353553..fec2096474ad 100644

drivers/mfd/max77620.c static const struct regmap_config max77620_regmap_config = { · line 183

Quoted 7 lines
drivers/mfd/max77620.c +1 -0
@@ -177,6 +177,7 @@ static const struct regmap_config max77620_regmap_config = {
 	.rd_table = &max77620_readable_table,
 	.wr_table = &max77620_writable_table,
 	.volatile_table = &max77620_volatile_table,
+	.use_single_write = true,
 };
 
 static const struct regmap_config max20024_regmap_config = {

Cheers
Jon

Signature · 1 line
nvpublic
#2 lore raw
In reply to Thierry Reding
Quoted 11 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The MAX77620 doesn't support bulk writes, so make sure the regmap code breaks bulk writes into multiple single-byte writes.

Note that this is mostly cosmetic because currently only the RTC sub- driver uses bulk writes and the RTC driver ends up using a different regmap on the MAX77620 anyway. However, it seems like a good idea to make this change now in order to avoid running into issues if bulk writes are ever used by other sub-drivers sometime down the road.

Quoted 4 lines
---
 drivers/mfd/max77620.c | 1 +
 1 file changed, 1 insertion(+)

Hi Lee,

did you have a chance to look at this patch?

Thierry

Applied
#3 lore raw
In reply to Thierry Reding
Quoted 11 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The MAX77620 doesn't support bulk writes, so make sure the regmap code breaks bulk writes into multiple single-byte writes.

Note that this is mostly cosmetic because currently only the RTC sub- driver uses bulk writes and the RTC driver ends up using a different regmap on the MAX77620 anyway. However, it seems like a good idea to make this change now in order to avoid running into issues if bulk writes are ever used by other sub-drivers sometime down the road.

Quoted 4 lines
---
 drivers/mfd/max77620.c | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog