]> git.ipfire.org Git - thirdparty/linux.git/commit
mfd: syscon: Use regmap max_register_is_0 as needed
authorNishanth Menon <nm@ti.com>
Tue, 3 Sep 2024 18:47:10 +0000 (13:47 -0500)
committerLee Jones <lee@kernel.org>
Wed, 16 Oct 2024 08:04:09 +0000 (09:04 +0100)
commit2e63d6fa113d36238052321d21806a9f8495862a
tree50e4c31f9c7d02eadbfdf955d2b486850d5da18c
parent98b5f7706f6bfd863e50317742f7d566b86fabdc
mfd: syscon: Use regmap max_register_is_0 as needed

syscon has always set the optional max_register configuration of
regmap to ensure the correct checks are in place. However, a recent
commit 0ec74ad3c157 ("regmap: rework ->max_register handling")
introduced explicit configuration in regmap framework for register
maps that is exactly 1 register, when max_register is pointing to a
valid register 0. This commit solved a previous limitation of regmap
framework.

Update syscon driver to consistent in regmap configuration for
all sizes of syscons by using this new capability by setting
max_register_is_0, when the max_register is valid and 0.

Signed-off-by: Nishanth Menon <nm@ti.com>
Link: https://lore.kernel.org/r/20240903184710.1552067-1-nm@ti.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/syscon.c