mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Sander Vanheule <sander@svanheule.net>,
	kernel test robot <lkp@intel.com>, Lee Jones <lee@kernel.org>,
	Pavel Machek <pavel@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Michael Walle <mwalle@kernel.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Mark Brown <broonie@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Paul Gazzillo <paul@pgazz.com>,
	Necip Fazil Yildiran <fazilyildiran@gmail.com>,
	oe-kbuild-all@lists.linux.dev, linux-leds@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, netdev@vger.kernel.org,
	Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v9 3/6] mfd: Add RTL8231 core device
Date: Fri, 26 Dec 2025 13:19:34 +0100	[thread overview]
Message-ID: <a26a5397-7597-49f6-9e73-3eb853915166@kernel.org> (raw)
In-Reply-To: <12c98c7c8bead26a61764e3e9611badf2cdfcac5.camel@svanheule.net>

On 26/12/2025 12:59, Sander Vanheule wrote:
> Adding the netdev and regmap maintainers for extra input.
> 
> On Mon, 2025-12-22 at 09:43 +0100, kernel test robot wrote:
>> url:    https://github.com/intel-lab-lkp/linux/commits/Sander-Vanheule/dt-bindings-leds-Binding-for-RTL8231-scan-matrix/20251216-015552
>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-fixes
>> patch link:    https://lore.kernel.org/r/20251215175115.135294-4-sander%40svanheule.net
>> patch subject: [PATCH v9 3/6] mfd: Add RTL8231 core device
>> config: alpha-kismet-CONFIG_MDIO_BUS-CONFIG_REGMAP_MDIO-0-0 (https://download.01.org/0day-ci/archive/20251222/202512220956.FVakrdhV-lkp@intel.com/config)
>> reproduce: (https://download.01.org/0day-ci/archive/20251222/202512220956.FVakrdhV-lkp@intel.com/reproduce)
>>
> 
> For context: these patches introduce a new MFD with pinctrl and led subdevices.
> The RTL8231 MFD is attached to an MDIO bus, but it can also be attached to an
> I2C bus (not currently supported). The drivers use regmap to provide a bus
> abstraction.
> 
>> kismet warnings: (new ones prefixed by >>)
>>>> kismet: WARNING: unmet direct dependencies detected for MDIO_BUS when
>>>> selected by REGMAP_MDIO
>>    WARNING: unmet direct dependencies detected for MDIO_BUS
>>      Depends on [n]: NETDEVICES [=n]
>>      Selected by [y]:
>>      - REGMAP_MDIO [=y]
> 
> I'm a bit puzzled on how to solve this one. The issue detected here is that my
> driver (MFD_RTL8231) selects REGMAP_MDIO, which in turn selects MDIO_BUS. The
> latter is dependent on NETDEVICES, which is not selected in this test. 
> The kernel does not yet have any other consumers of REGMAP_MDIO, which is
> probably the reason the dependency issue has gone undetected until now.
> 
> REGMAP_MDIO is not a visible symbol, so it must be selected by drivers.

Reminds me old problem, probably the same:

https://lore.kernel.org/all/20250515140555.325601-2-krzysztof.kozlowski@linaro.org/

https://lore.kernel.org/all/20250516141722.13772-1-afd@ti.com/

Exactly the same MDIO here and there.

> 
> Other REGMAP_XYZ symbols (almost) exclusively use "depends on XYZ", but if I
> change REGMAP_MDIO to "depends on", the warning just changes to:
> 
>    WARNING: unmet direct dependencies detected for REGMAP_MDIO
>      Depends on [n]: MDIO_BUS [=n]
>      Selected by [y]:
>      - MFD_RTL8231 [=y] && HAS_IOMEM [=y]
> 
> Trying to make MFD_RTL8231 also depend on MDIO_BUS, like .e.g I2C dependent
> devices do, results in a recursive dependency:
> 
> 
>    error: recursive dependency detected!
>    	symbol GPIOLIB is selected by PINCTRL_RTL8231
>    	symbol PINCTRL_RTL8231 depends on MFD_RTL8231
>    	symbol MFD_RTL8231 depends on MDIO_BUS
>    	symbol MDIO_BUS is selected by PHYLIB
>    	symbol PHYLIB is selected by ARC_EMAC_CORE
>    	symbol ARC_EMAC_CORE is selected by EMAC_ROCKCHIP
>    	symbol EMAC_ROCKCHIP depends on OF_IRQ
>    	symbol OF_IRQ depends on IRQ_DOMAIN
>    	symbol IRQ_DOMAIN is selected by GENERIC_IRQ_CHIP
>    	symbol GENERIC_IRQ_CHIP is selected by GPIO_MVEBU
>    	symbol GPIO_MVEBU depends on GPIOLIB
>    
> The 'quick fix' appears to be to add "select NETDEVICES" to REGMAP_MDIO. The
> platforms that use the RTL8231 MFD are typically ethernet switches, so they
> would have NETDEVICES enabled anway, but that feels very heavy handed and
> automatically pulls in a lot of extra stuff. Would this be acceptable or is
> there a more desirable approach I'm not seeing here?

Rather fix the same way Andrew did it. Or maybe his patch was not merged?

Best regards,
Krzysztof

  reply	other threads:[~2025-12-26 12:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 17:51 [PATCH v9 0/6] RTL8231 GPIO expander support Sander Vanheule
2025-12-15 17:51 ` [PATCH v9 1/6] dt-bindings: leds: Binding for RTL8231 scan matrix Sander Vanheule
2025-12-15 17:51 ` [PATCH v9 2/6] dt-bindings: mfd: Binding for RTL8231 Sander Vanheule
2025-12-15 17:51 ` [PATCH v9 3/6] mfd: Add RTL8231 core device Sander Vanheule
2025-12-22  8:43   ` kernel test robot
2025-12-26 11:59     ` Sander Vanheule
2025-12-26 12:19       ` Krzysztof Kozlowski [this message]
2025-12-26 14:52         ` Sander Vanheule
2025-12-15 17:51 ` [PATCH v9 4/6] pinctrl: Add RTL8231 pin control and GPIO support Sander Vanheule
2025-12-18  9:15   ` Bartosz Golaszewski
2025-12-19 13:52     ` Sander Vanheule
2025-12-15 17:51 ` [PATCH v9 5/6] leds: Add support for RTL8231 LED scan matrix Sander Vanheule
2025-12-15 17:51 ` [PATCH v9 6/6] MAINTAINERS: Add RTL8231 MFD driver Sander Vanheule

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a26a5397-7597-49f6-9e73-3eb853915166@kernel.org \
    --to=krzk@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=fazilyildiran@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=mwalle@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=paul@pgazz.com \
    --cc=pavel@kernel.org \
    --cc=robh@kernel.org \
    --cc=sander@svanheule.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®