Linux kernel source tree
Go to file
Maksim Kiselev f9f4fda15e 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 3ede3f8b4b ("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>
2025-10-29 23:19:08 +01:00
Documentation dt-bindings: pinctrl: stm32: Support I/O synchronization parameters 2025-10-28 10:43:01 +01:00
LICENSES
arch Kbuild fixes for 6.18 #1 2025-10-11 15:47:12 -07:00
block
certs
crypto
drivers pinctrl: mcp23s08: init reg_defaults from HW at probe and switch cache type 2025-10-29 23:19:08 +01:00
fs - Avoid -Wflex-array-member-not-at-end warnings 2025-10-10 14:06:02 -07:00
include pinctrl: pinconf-generic: Add properties 'skew-delay-{in,out}put-ps' 2025-10-28 10:43:01 +01:00
init
io_uring
ipc
kernel tracing fixes for v6.18: 2025-10-11 16:06:04 -07:00
lib
mm slab hotfix for 6.18-rc1 2025-10-11 10:40:24 -07:00
net bpf-fixes 2025-10-11 10:31:38 -07:00
rust 7 hotfixes. All 7 are cc:stable and all 7 are for MM. 2025-10-11 10:14:55 -07:00
samples
scripts Kbuild fixes for 6.18 #1 2025-10-11 15:47:12 -07:00
security
sound
tools - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
usr
virt
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.pylintrc
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: add Microchip RISC-V pinctrl drivers/bindings to entry 2025-10-24 11:08:25 +02:00
Makefile Linux 6.18-rc1 2025-10-12 13:42:36 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.