[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-18 Thread Mark Brown
On Tue, Nov 15, 2022 at 07:36:01AM +, Corentin Labbe wrote:
> It work exactly like regulator_bulk_get() but instead of working on a
> provided list of names, it seek all consumers properties matching
> xxx-supply.

The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780:

  Linux 6.1-rc1 (2022-10-16 15:36:24 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 
tags/of_regulator_bulk_get_all

for you to fetch changes up to 27b9ecc7a9ba1d0014779bfe5a6dbf630899c6e7:

  regulator: Add of_regulator_bulk_get_all (2022-11-18 15:13:34 +)


regulator: Add of_regulator_bulk_get_all()

This adds a new of_regulator_bulk_get_all() which grab all supplies
properties in a DT node, for use in implementing generic handling
for things like MDIO PHYs where the physical standardisation of
the bus does not extend to power supplies.


Corentin Labbe (1):
  regulator: Add of_regulator_bulk_get_all

 drivers/regulator/of_regulator.c   | 92 ++
 include/linux/regulator/consumer.h |  8 
 2 files changed, 100 insertions(+)

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/Y3evbTL4P72xwYWS%40sirena.org.uk.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Andrew Lunn
On Tue, Nov 15, 2022 at 11:16:53AM +, Mark Brown wrote:
> On Tue, Nov 15, 2022 at 10:42:50AM +, Russell King (Oracle) wrote:
> > On Tue, Nov 15, 2022 at 10:34:41AM +, Mark Brown wrote:
> 
> > > Well, it's not making this maintainer happy :/  If we know what
> > > PHY is there why not just look up the set of supplies based on
> > > the compatible of the PHY?
> 
> > It looks to me like this series fetches the regulators before the PHY
> > is bound to the driver, so what you're proposing would mean that the
> > core PHY code would need a table of all compatibles (which is pretty
> > hard to do, they encode the vendor/device ID, not some descriptive
> > name) and then a list of the regulator names. IMHO that doesn't scale.
> 
> Oh, PHYs have interesting enough drivers to dynamically load
> here?

Yes. And you sometimes have the chicken/egg problem that you don't
know what PHY it is until you have turned its regulators on and you
can talk to it. So the PHY code will poke around in the DT
description, and turn on the regulator before enumerating the bus.

Andrew   

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/Y3OYyX2o6BsJKxFh%40lunn.ch.


[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Mark Brown
On Tue, Nov 15, 2022 at 10:42:50AM +, Russell King (Oracle) wrote:
> On Tue, Nov 15, 2022 at 10:34:41AM +, Mark Brown wrote:

> > Well, it's not making this maintainer happy :/  If we know what
> > PHY is there why not just look up the set of supplies based on
> > the compatible of the PHY?

> It looks to me like this series fetches the regulators before the PHY
> is bound to the driver, so what you're proposing would mean that the
> core PHY code would need a table of all compatibles (which is pretty
> hard to do, they encode the vendor/device ID, not some descriptive
> name) and then a list of the regulator names. IMHO that doesn't scale.

Oh, PHYs have interesting enough drivers to dynamically load
here? The last time I was looking at MDIO stuff it was all
running from generic class devices but that was quite a while
ago.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/Y3N1JYVx9tB9pisR%40sirena.org.uk.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Mark Brown
On Tue, Nov 15, 2022 at 11:18:50AM +0100, Corentin LABBE wrote:
> Le Tue, Nov 15, 2022 at 10:03:14AM +, Mark Brown a écrit :

> > What's the use case - why would a device not know which supplies
> > it requires?  This just looks like an invitation to badly written
> > consumers TBH.

> The device know which supply it have, but I found only this way to made all 
> maintainers happy.
> See 
> https://lore.kernel.org/netdev/0518eef1-75a6-fbfe-96d8-bb1fc4e51...@linaro.org/t/#m7a2e012f4c7c7058478811929774ab2af9bfcbf6

Well, it's not making this maintainer happy :/  If we know what
PHY is there why not just look up the set of supplies based on
the compatible of the PHY?

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/Y3NrQffcdGIjS64a%40sirena.org.uk.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Mark Brown
On Tue, Nov 15, 2022 at 07:36:01AM +, Corentin Labbe wrote:

> It work exactly like regulator_bulk_get() but instead of working on a
> provided list of names, it seek all consumers properties matching
> xxx-supply.

What's the use case - why would a device not know which supplies
it requires?  This just looks like an invitation to badly written
consumers TBH.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/Y3Nj4pA2%2BWRFvSNd%40sirena.org.uk.


signature.asc
Description: PGP signature