mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
kconfiglint reports:
K006: config PHY_TEGRA_XUSB selects USB_CONN_GPIO which depends on
GPIOLIB, but PHY_TEGRA_XUSB does not depend on GPIOLIB
K002: config PHY_TEGRA_XUSB selects visible symbol USB_CONN_GPIO
which has dependencies
USB_CONN_GPIO was introduced in commit 4602f3bff2 ("usb: common: add USB
GPIO based connection detection driver") with a hard dependency on GPIOLIB,
since it needs GPIO pins to detect USB cable connection state.
Commit f67213cee2 ("phy: tegra: xusb: Add usb-role-switch support") added
`select USB_CONN_GPIO` to PHY_TEGRA_XUSB to support USB role switching via
GPIO-based detection. At that time, PHY_TEGRA_XUSB depended only on
`ARCH_TEGRA`, and both the ARM32 and ARM64 ARCH_TEGRA Kconfig definitions
select GPIOLIB, so the missing explicit GPIOLIB guard was not a functional
problem — GPIOLIB is always available when ARCH_TEGRA is enabled.
Later, commit 0d5c9bc7c6 ("phy: tegra: Select USB_COMMON for
usb_get_maximum_speed()") added `depends on USB_SUPPORT` but still did not
address the GPIOLIB gap.
The select can force USB_CONN_GPIO on without its GPIOLIB dependency being
satisfied if the Kconfig dependencies were ever restructured. Make the
select conditional with `select USB_CONN_GPIO if GPIOLIB` to make the
dependency explicit. This mirrors how other drivers handle optional
GPIO-dependent selects throughout the kernel.
Assisted-by: Claude:claude-opus-4-6 kconfiglint
Signed-off-by: Sasha Levin <sashal@kernel.org>
Link: https://patch.msgid.link/20260426000309.54959-1-sashal@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
21 lines
612 B
Plaintext
21 lines
612 B
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config PHY_TEGRA_XUSB
|
|
tristate "NVIDIA Tegra XUSB pad controller driver"
|
|
depends on ARCH_TEGRA && USB_SUPPORT
|
|
select USB_COMMON
|
|
select USB_CONN_GPIO if GPIOLIB
|
|
select USB_PHY
|
|
help
|
|
Choose this option if you have an NVIDIA Tegra SoC.
|
|
|
|
To compile this driver as a module, choose M here: the module will
|
|
be called phy-tegra-xusb.
|
|
|
|
config PHY_TEGRA194_P2U
|
|
tristate "NVIDIA Tegra194 PIPE2UPHY PHY driver"
|
|
depends on ARCH_TEGRA || COMPILE_TEST
|
|
select GENERIC_PHY
|
|
help
|
|
Enable this to support the P2U (PIPE to UPHY) that is part of Tegra 19x
|
|
and 234 SOCs.
|