mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kory Maincent <kory.maincent@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
	linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] regulator: core: Fix resolve supply
Date: Thu, 14 Nov 2024 15:36:45 +0100	[thread overview]
Message-ID: <20241114153645.2bbeb89d@kmaincent-XPS-13-7390> (raw)
In-Reply-To: <ZzX6210-5YwmIaba@finisterre.sirena.org.uk>

On Thu, 14 Nov 2024 13:27:55 +0000
Mark Brown <broonie@kernel.org> wrote:

> On Wed, Nov 13, 2024 at 05:36:42PM +0100, Kory Maincent wrote:
> 
> > My issue is that it does not look for the regulator supply in the OF node
> > described in the regulator_config structure:
> > https://elixir.bootlin.com/linux/v6.11.7/source/include/linux/regulator/driver.h#L445
> > It looks at the parent device OF node instead.
> > 
> > My use case is that a PSE controller have several PIs (Power Interface)
> > which can have different regulator supply. A regulator device is registered
> > for each PIs. The OF node used by the regulator core to lookup for the
> > regulator supply is the PSE controller node and its children instead of the
> > node of the PI which is described by the regulator_config->of_node.  
> 
> Please resubmit with a clearer commit log.

Still I am not sure it is the right way to do it.
In regulator_dev_lookup function if the regulator is not found in the dt it uses
the dev_name string to look for it.
https://elixir.bootlin.com/linux/v6.11.7/source/drivers/regulator/core.c#L2035

The dev name of the rdev->dev.parent device or the rdev->dev virtual device is
not the same. I am not regulator expert therefore I am afraid that the suggested
change could break things.

Maybe this change is safer: https://termbin.com/g0xi

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

  reply	other threads:[~2024-11-14 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-13 15:36 Kory Maincent
2024-11-13 16:05 ` Mark Brown
2024-11-13 16:36   ` Kory Maincent
2024-11-14 13:27     ` Mark Brown
2024-11-14 14:36       ` Kory Maincent [this message]
2024-11-14 17:24         ` Mark Brown

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=20241114153645.2bbeb89d@kmaincent-XPS-13-7390 \
    --to=kory.maincent@bootlin.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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®