diff options
| author | Maksim Kiselev <bigunclemax@gmail.com> | 2025-10-27 13:46:26 +0300 |
|---|---|---|
| committer | Linus Walleij <linus.walleij@linaro.org> | 2025-10-29 23:19:08 +0100 |
| commit | f9f4fda15e720686f1b2b436591ab11255e4e85e (patch) | |
| tree | 45d3e00116fe0b9c913bf0579773782fc3abebaa /scripts/gdb/linux/bpf.py | |
| parent | b45928845cc3997c074ee12960fdca8173c70da2 (diff) | |
pinctrl: mcp23s08: init reg_defaults from HW at probe and switch cache type
The probe function does not guarantee that chip registers are in their
default state. Thus using reg_defaults for regmap is incorrect.
For example, the chip may have already been configured by the bootloader
before the Linux driver loads, or the mcp might not have a reset at all
and not reset a state between reboots.
In such cases, using reg_defaults leads to the cache values diverging
from the actual registers values in the chip.
Previous attempts to fix consequences of this issue were made in
'commit 3ede3f8b4b4b ("pinctrl: mcp23s08: Reset all pins to input at
probe")', but this is insufficient. The OLAT register reset is also
required. And there's still potential for new issues arising due to cache
desynchronization of other registers.
Therefore, remove reg_defaults and provide num_reg_defaults_raw. In that
case the cache defaults being initialized from hardware.
Also switch cache type to REGCACHE_MAPLE, which is aware of (in)valid
cache entries.
And remove the force reset all pins to input at probe as it is no longer
required.
Link: https://lore.kernel.org/all/20251009132651.649099-2-bigunclemax@gmail.com/
Suggested-by: Mike Looijmans <mike.looijmans@topic.nl>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'scripts/gdb/linux/bpf.py')
0 files changed, 0 insertions, 0 deletions
