[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f72500a5-4514-4920-a7f0-3fc8e6874615@sirena.org.uk>
Date: Wed, 28 Aug 2024 13:57:41 +0100
From: Mark Brown <broonie@...nel.org>
To: Nishanth Menon <nm@...com>
Cc: Arnd Bergmann <arnd@...db.de>, Lee Jones <lee@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
afd@...com, bb@...com, d-gole@...com,
Jan Dakinevich <jan.dakinevich@...utedevices.com>
Subject: Re: [PATCH] mfd: syscon: Set max_register_is_0 when syscon points to
a single register
On Wed, Aug 28, 2024 at 07:10:08AM -0500, Nishanth Menon wrote:
> Commit 0ec74ad3c157 ("regmap: rework ->max_register handling")
> introduced explicit handling in regmap framework for register maps
> that is exactly 1 register wide. As a result, a syscon pointing
> to a single register would cause regmap checks to skip checks
> (or in the case of regmap_get_max_register, return -EINVAL) as
> max_register_is_set will not be true.
In what sense is the behaviour changed for a map that doesn't specify a
maximum register?
> Fixes: 0ec74ad3c157 ("regmap: rework ->max_register handling")
In what sense is this a fix?
> + if (!syscon_config.max_register)
> + syscon_config.max_register_is_0 = true;
This will cause any syscon which does not explicitly specify a maximum
register to be converted to having only one register at number 0. That
really does not seem like a good idea - unless you've done an audit of
every single syscon to make sure they do explicitly specify a maximum
register, and confirmed that this can't be specified via DT, then it's
going to break things.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists