Re: [PATCH RFC] regmap: Move selecting for REGMAP_MDIO and REGMAP_IRQ

From: Andrew Davis
Date: Mon May 19 2025 - 22:29:05 EST


On 5/19/25 5:12 AM, Mark Brown wrote:
On Fri, May 16, 2025 at 09:17:22AM -0500, Andrew Davis wrote:
If either REGMAP_IRQ or REGMAP_MDIO are set then REGMAP is also set.
This then enables the selecting of IRQ_DOMAIN or MDIO_BUS from REGMAP
based on the above two symbols respectively. This makes it very easy
to end up with "circular dependencies".

Instead select the IRQ_DOMAIN or MDIO_BUS from the symbols that make
use of them. This is almost equivalent to before but makes it less
likely to end up with false circular dependency detections.

None of these selects should actually do anything since the symbols are
themselves selected?

I was thinking the same, but turns out (and I had to check to prove it to
myself) that "select" actually follows up the dependency tree. So unlike
"depends on" which is weird(broken), "select" functions in a sane way.

Andrew