Skip to contentSkip to conversation

Compile failure on drivers/pinctrl/core.c since 6.6.148

DISCUSSION preed via Bugspray Bot 1 participant 5 messages Dec 3 GPIO

lore
Share & tools
lore

preed via Bugspray Bot

author Acked-by Linus Walleij
#0 lore raw

preed writes via Kernel.org Bugzilla:

I have been unable to successfully compile the 6.6 kernel series with the attached config since 6.6.148; 6.6.147 builds fine, but 6.6.148 fails with:

CC drivers/pinctrl/core.o
drivers/pinctrl/core.c: In function ‘pinctrl_gpio_direction_input’:
drivers/pinctrl/core.c:886:41: error: invalid use of undefined type ‘struct gpio_chip’
886 | return pinctrl_gpio_direction(gc->base + offset, true);
| ^~
drivers/pinctrl/core.c: In function ‘pinctrl_gpio_direction_output’:
drivers/pinctrl/core.c:901:41: error: invalid use of undefined type ‘struct gpio_chip’

  901 |         return pinctrl_gpio_direction(gc->base + offset, false);
      |

I bisected the build failure and it looks to be related to:

f53dd26462b8ecc418421fc972f5fb57b90597aa is the first 'bad' commit commit f53dd26462b8ecc418421fc972f5fb57b90597aa

Author: Bartosz Golaszewski <[email protected]>
Date:   Tue Jul 28 08:11:24 2026 -0400

pinctrl: remove pinctrl_gpio_direction_output()

[ Upstream commit 45d2055b0067739253883dc541f37c86aad45c92 ]

There are no more users of pinctrl_gpio_direction_output() so remove it.

Stable-dep-of: d3e91a95b2b0 ("gpio: tegra: do not call pinctrl for GPIO direction")

I use |make oldconfig| to build new kernel versions; it's possible my config is invalid, however I did attempt to re-create a config in a 6.6.148 build tree with |make menuconfig|; that's the attached config, and it still errors.

View: https://bugzilla.kernel.org/show_bug.cgi?id=222122#c0
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#2 lore raw
In reply to preed via Bugspray Bot

preed writes via Kernel.org Bugzilla:

I should also note: the _config_ does come from a Gentoo-project modified kernel, however I did the bisect investigation with a standard, stock Linux kernel tree.

I suppose it's possible that the Gentoo-based config is inducing this error?

View: https://bugzilla.kernel.org/show_bug.cgi?id=222122#c2
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)
#4 lore raw
In reply to preed via Bugspray Bot

Artem S. Tashkinov writes via Kernel.org Bugzilla:

Quoted 13 lines · Bartosz Golaszewski

A quick fix would be enabling CONFIG_GPIOLIB in Kconfig. A better fix would be
to figure out which commits from around:

commit 315c4418ac659bca89120fb4270ede71257d5070

Author: Bartosz Golaszewski<[email protected]>
Date:   Tue Oct 10 15:32:52 2023 +0200

pinctrl: change the signature of pinctrl_gpio_direction()

Modify pinctrl_gpio_direction() to be in line with public GPIO helpers and take a pair of GPIO chip & offset as arguments.

Quoted 7 lines

would be required to fix the problem. Seems like it's gone in mainline.

Bart

View: https://bugzilla.kernel.org/show_bug.cgi?id=222122#c4
You can reply to this message to join the discussion.

Signature · 2 lines
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (bugspray 0.1-dev)