mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: barebox@lists.infradead.org
Subject: Re: Driver load order
Date: Thu, 19 May 2022 13:54:50 +0200	[thread overview]
Message-ID: <20220519115450.GV25578@pengutronix.de> (raw)
In-Reply-To: <1694C0B0-A962-420E-BA70-8061E8E9CA7F@public-files.de>

Hi Frank,

On Thu, May 19, 2022 at 12:59:35PM +0200, Frank Wunderlich wrote:
> Hi,
> 
> I try to create a basic driver for rk808 pmic/iodomains. I've noticed
> that first the iodomain driver is probed and then the rk808 on,but i
> need it reversed as rk808 registers regulators linked in iodomain via
> devicetree.
> 
> How can i defer iodomain probing till rk808 is ready (regulators
> available defined as phandles in iodomain dt node)? Currently i get
> always ENODEV (property does not exist or regulator is not ready
> yet)....

Your board has deep probe enabled. The idea with deep probe is that the
devices for a specific device node are registered on demand instead of
any particular order. Basically this means that once you do a
regulator_get() the regulator will be registered automatically for you
without having to mess with the probe order.

That said I'm not sure if that works properly with regulators yet. For
deep probe to work there must be a device registered for the device node
representing the regulator. Currently this is not the case, there will
only be a device for the "rockchip,rk808" device node, but not for the
regulator child nodes.

I haven't found a suitable test setup to have a deeper look. If you
could bring your rk808 driver up to a point where it actually registers
the regulators then I could add the missing pieces in the regulator core
for you.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-05-19 11:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 10:59 Frank Wunderlich
2022-05-19 11:54 ` Sascha Hauer [this message]
2022-05-19 12:43   ` Aw: " Frank Wunderlich
2022-05-19 12:50     ` Ahmad Fatoum
2022-05-19 13:10       ` Sascha Hauer
2022-05-19 17:54         ` Aw: " Frank Wunderlich
2022-05-21 10:31         ` Frank Wunderlich
2022-05-24  8:53           ` Ahmad Fatoum
2022-05-24  9:13             ` Aw: " Frank Wunderlich
2022-05-24  9:21               ` Ahmad Fatoum
2022-05-19 12:10 ` [PATCH 1/2] regmap: implement regmap_init_i2c_smbus Ahmad Fatoum
2022-05-19 12:10   ` [PATCH 2/2] regulator: add Rockchip rk808 support Ahmad Fatoum
2022-05-19 12:17 ` Driver load order Ahmad Fatoum
2022-05-19 12:42   ` Ahmad Fatoum

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=20220519115450.GV25578@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=frank-w@public-files.de \
    --subject='Re: Driver load order' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox