diff options
| author | Mehmet Fide <mehmet.fide@screeningeagle.com> | 2026-09-15 10:04:58 +0200 |
|---|---|---|
| committer | Linus Walleij <linusw@kernel.org> | 2026-09-21 00:13:34 +0200 |
| commit | b44aec87658e5d1882503ad1208ebf0b052f0ac0 (patch) | |
| tree | ec54473a9e8ad76b678298603db6c6742b72190e /tools/perf/scripts/python/stackcollapse.py | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
| download | linux-next-b44aec87658e5d1882503ad1208ebf0b052f0ac0.tar.gz linux-next-b44aec87658e5d1882503ad1208ebf0b052f0ac0.zip | |
pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP
With CONFIG_PINCTRL=n, pinctrl_gpio_get_config() and
pinctrl_gpio_set_config() are stubs that return 0. The getter reports
success without touching the config it was asked to fill, so a caller
reads the packed parameter it passed in back as if it were the pin's
state; the setter reports success for a configuration nobody applied.
With CONFIG_PINCTRL=y the same callers already get -ENOTSUPP from
gpiochip_generic_config() and gpiochip_generic_get_config() for a chip
without pin ranges, and gpiolib treats that value as "the backend cannot
do this" and carries on. Return it from the stubs too, so a kernel
without pinctrl behaves like a chip without pin ranges instead of
claiming success.
Suggested-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
