lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241114153645.2bbeb89d@kmaincent-XPS-13-7390>
Date: Thu, 14 Nov 2024 15:36:45 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Mark Brown <broonie@...nel.org>
Cc: Bjorn Andersson <andersson@...nel.org>, linux-kernel@...r.kernel.org,
 thomas.petazzoni@...tlin.com, Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH] regulator: core: Fix resolve supply

On Thu, 14 Nov 2024 13:27:55 +0000
Mark Brown <broonie@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ