diff mbox series

mfd: max77620: Use single-byte writes on MAX77620

Message ID 20200417170913.2552327-1-thierry.reding@gmail.com
State Accepted
Headers show
Series mfd: max77620: Use single-byte writes on MAX77620 | expand

Commit Message

Thierry Reding April 17, 2020, 5:09 p.m. UTC
From: Thierry Reding <treding@nvidia.com>

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.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/mfd/max77620.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jon Hunter April 20, 2020, 2:43 p.m. UTC | #1
On 17/04/2020 18:09, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/mfd/max77620.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
> index c7ed5c353553..fec2096474ad 100644
> --- a/drivers/mfd/max77620.c
> +++ b/drivers/mfd/max77620.c
> @@ -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 = {
> 


Acked-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>

Cheers
Jon
Thierry Reding May 8, 2020, 11:15 a.m. UTC | #2
On Fri, Apr 17, 2020 at 07:09:13PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/mfd/max77620.c | 1 +
>  1 file changed, 1 insertion(+)

Hi Lee,

did you have a chance to look at this patch?

Thierry
Lee Jones May 11, 2020, 7:41 a.m. UTC | #3
On Fri, 17 Apr 2020, Thierry Reding wrote:

> From: Thierry Reding <treding@nvidia.com>
> 
> 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.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/mfd/max77620.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c
index c7ed5c353553..fec2096474ad 100644
--- a/drivers/mfd/max77620.c
+++ b/drivers/mfd/max77620.c
@@ -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 = {