Messages in this thread | | | Date | Tue, 19 Jul 2022 14:04:51 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] regmap: support regmap_field_write() on non-readable fields |
| |
On Tue, Jul 19, 2022 at 12:54:02PM +0000, Charles Keepax wrote: > On Tue, Jul 19, 2022 at 02:14:46PM +0200, Krzysztof Kozlowski wrote:
> > + if (regmap_readable(field->regmap, field->reg)) > > + return regmap_update_bits_base(field->regmap, field->reg, > > + mask, val << field->shift, > > + change, async, force);
> I think this will break other valid use-cases, regmap_readable (I > believe) returns if the register is physically readable, however > it should still be possible to use update bits if the register is > in the cache even if it can't physically be read. So really you > need to fall into this path if it is readable or in the cache.
This is true, we don't currently have a readable_or_cached() check - this is implemented as trying the cache and only considering actually reading if there's a read, effectively what we want to do here is force a cache only read. [unhandled content-type:application/pgp-signature] | |