Skip to contentSkip to conversation

drivers: pinctrl: qcom: fix Kconfig dependency on GPIOLIB

PATCH Superseded Julian Braha 3 participants 5 messages Feb 25, 2021 – Apr 14, 2021

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: pinctrl: qcom: fix Kconfig dependency on GPIOLIB

When PINCTRL_MSM is enabled, and GPIOLIB is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
Depends on [n]: GPIOLIB [=n]
Selected by [y]:
- PINCTRL_MSM [=y] && PINCTRL [=y] && (ARCH_QCOM || COMPILE_TEST [=y])

This is because PINCTRL_MSM selects GPIOLIB_IRQCHIP, without selecting or depending on GPIOLIB, despite GPIOLIB_IRQCHIP depending on GPIOLIB. Having PINCTRL_MSM select GPIOLIB will cause a recursive dependency error.

---
 drivers/pinctrl/qcom/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/Kconfig +1 -1
index 6853a896c476..d42ac59875ab 100644
@@ -3,7 +3,7 @@ if (ARCH_QCOM || COMPILE_TEST)
 
 config PINCTRL_MSM
 	tristate "Qualcomm core pin controller driver"
-	depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y
+	depends on GPIOLIB && (QCOM_SCM || !QCOM_SCM) #if QCOM_SCM=m this can't be =y
 	select PINMUX
 	select PINCONF
 	select GENERIC_PINCONF

--
2.27.0

#1 lore raw
Quoted 8 lines · Julian Braha

When PINCTRL_MSM is enabled, and GPIOLIB is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
Depends on [n]: GPIOLIB [=n]
Selected by [y]:
- PINCTRL_MSM [=y] && PINCTRL [=y] && (ARCH_QCOM || COMPILE_TEST [=y])

Quoted 6 lines

This is because PINCTRL_MSM selects GPIOLIB_IRQCHIP, without selecting or depending on GPIOLIB, despite GPIOLIB_IRQCHIP depending on GPIOLIB. Having PINCTRL_MSM select GPIOLIB will cause a recursive dependency error.

Does it work to just:

select GPIOLIB

instead?

The driver needs the library so...

Yours,
Linus Walleij

#2 lore raw
Quoted 19 lines · EDT you
Quoted 8 lines · Julian Braha

When PINCTRL_MSM is enabled, and GPIOLIB is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
Depends on [n]: GPIOLIB [=n]
Selected by [y]:
- PINCTRL_MSM [=y] && PINCTRL [=y] && (ARCH_QCOM || COMPILE_TEST [=y])

Quoted 6 lines

This is because PINCTRL_MSM selects GPIOLIB_IRQCHIP, without selecting or depending on GPIOLIB, despite GPIOLIB_IRQCHIP depending on GPIOLIB. Having PINCTRL_MSM select GPIOLIB will cause a recursive dependency error.

Does it work to just:

Quoted 9 lines

select GPIOLIB

instead?

The driver needs the library so...

Yours,
Linus Walleij

Hi Linus,

Looks like I confused this patch with another one when I responded last time. This config option cannot select GPIOLIB, because it will cause a recursive dependency error.

Any other ideas?

- Julian Braha

#3 lore raw
Quoted 31 lines · Julian Braha
Quoted 19 lines · EDT you
Quoted 8 lines · Julian Braha

When PINCTRL_MSM is enabled, and GPIOLIB is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
Depends on [n]: GPIOLIB [=n]
Selected by [y]:
- PINCTRL_MSM [=y] && PINCTRL [=y] && (ARCH_QCOM || COMPILE_TEST [=y])

Quoted 6 lines

This is because PINCTRL_MSM selects GPIOLIB_IRQCHIP, without selecting or depending on GPIOLIB, despite GPIOLIB_IRQCHIP depending on GPIOLIB. Having PINCTRL_MSM select GPIOLIB will cause a recursive dependency error.

Does it work to just:

Quoted 9 lines

select GPIOLIB

instead?

The driver needs the library so...

Yours,
Linus Walleij

Quoted 8 lines

Hi Linus,

Looks like I confused this patch with another one when I responded last time. This config option cannot select GPIOLIB, because it will cause a recursive dependency error.

Any other ideas?

No we can apply the patch as-is but let Bjorn have a look at it first, I noticed he is not on the To: line of the original patch.

You may need to resend with Bjorn Andersson in the recipients.

Yours,
Linus Walleij

Reviewed-by
#4 lore raw
Quoted 39 lines · Linus Walleij
Quoted 38 lines · Julian Braha
Quoted 19 lines · EDT you
Quoted 8 lines · Julian Braha

When PINCTRL_MSM is enabled, and GPIOLIB is disabled, Kbuild gives the following warning:

WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP
Depends on [n]: GPIOLIB [=n]
Selected by [y]:
- PINCTRL_MSM [=y] && PINCTRL [=y] && (ARCH_QCOM || COMPILE_TEST [=y])

Quoted 6 lines

This is because PINCTRL_MSM selects GPIOLIB_IRQCHIP, without selecting or depending on GPIOLIB, despite GPIOLIB_IRQCHIP depending on GPIOLIB. Having PINCTRL_MSM select GPIOLIB will cause a recursive dependency error.

Does it work to just:

Quoted 9 lines

select GPIOLIB

instead?

The driver needs the library so...

Yours,
Linus Walleij

Hi Linus,

Looks like I confused this patch with another one when I responded last time. This config option cannot select GPIOLIB, because it will cause a recursive dependency error.

Quoted 7 lines
Quoted 1 line

Any other ideas?

No we can apply the patch as-is but let Bjorn have a look at it first, I noticed he is not on the To: line of the original patch.

You may need to resend with Bjorn Andersson in the recipients.

I don't see a resend of this, perhaps I'm just not good at searching today...I dug up the patch on lore instead.

GPIOLIB is user selectable, so it makes sense to depend on it, rather than use select. And it seems like our current defconfigs have GPIOLIB enabled already (directly or indirectly).

So...

Regards,
Bjorn