Re: [PATCH] misc: Kconfig: tc9564: fix a circular dependency

From: Alex Elder

Date: Fri Oct 02 2026 - 08:50:58 EST


On 10/2/26 1:02 AM, Arnd Bergmann wrote:
On Fri, Oct 2, 2026, at 03:33, Alex Elder wrote:
The TC9564_PCI config option selects PCI_DYNAMIC_OF_NODES. But that
depends on OF_IRQ, and TC9564_PCI does not satisfy that dependency.

Simply adding "depends on OF_IRQ" results in a recursive Kconfig
dependency.

A little experimentation shows that the recursion can be avoided
when "depends on OF_IRQ" is added by *depending on* rather than
*selecting* PCI_QUIRKS.

Hi Alex,

This change looks technically correct, but I find the description
misleading as you are not actually fixing a circular dependency
but instead a missing one.

That's true. It's adding a missing dependency in a way
that avoids the circular dependency. I will update this
and send version 2 shortly.

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 9c5b1e9d672e8..87ea92af81dca 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -571,9 +571,10 @@ config MCHP_LAN966X_PCI
config TC9564_PCI
tristate "Toshiba TC9564 PCI function support"
depends on OF
+ depends on OF_IRQ
depends on PCI
+ depends on PCI_QUIRKS
select PCI_DYNAMIC_OF_NODES
- select PCI_QUIRKS
default m

I would go further here and simplify this to

config TC9564_PCI
tristate "Toshiba TC9564 PCI function support"
depends on PCI && PCI_DYNAMIC_OF_NODES && PCI_QUIRKS

(in either one or three lines)

If I do one, I'll combine OF and OF_IRQ similarly into one.

CONFIG_PCI_DYNAMIC_OF_NODES is a user-visible option, so you
should not select it from a driver.

OK, I didn't realize this. Another thing to look for.

Thank you Arnd.

-Alex

Arnd