mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: Frank Wunderlich <frank-w@public-files.de>, barebox@lists.infradead.org
Subject: Re: Aw: Re: Driver load order
Date: Thu, 19 May 2022 15:10:19 +0200	[thread overview]
Message-ID: <20220519131019.GZ25578@pengutronix.de> (raw)
In-Reply-To: <e0e7cd6c-aa14-a09c-71d2-681842575398@pengutronix.de>

On Thu, May 19, 2022 at 02:50:13PM +0200, Ahmad Fatoum wrote:
> On 19.05.22 14:43, Frank Wunderlich wrote:
> > @ahmad: thanks for your driver. Take a quick look into it...
> > 
> > it seems nearly complete, is there anything not working or was the only
> > problem the missing regmap-handling added in part1?
> 
> IIRC, Linux just has regmap_i2c_init which does the correct thing for all
> callers. While in barebox this doesn't work and I had to add a smbus specific
> regmap_init. We can always consolidate this later though, so feel free to
> add whatever you find missing, test it and send it out for upstream
> inclusion. You have my Signed-off-by.
> 
> > My current approach is only register the regulators without doing a real
> > pmic init. IO-Domain driver only needs to read out regulator voltage, i'm
> > not sure if it's enough to get the value from the DT or if it needs to be
> > really measured (to depend on complete probe/init of the pmic).
> > 
> > but the problem is that iodomain is probed before the pmic due to deep-probing
> > if i understand Sascha the right way. So i need a way to defer the iodomain driver
> > probe till rk808 is ready.
> 
> The right way with deep probe enabled is to just use regulator functions
> normally and on first access, barebox will take care to probe the regulator
> if not done yet. I am not sure if all this works as expected yet, but Sascha
> already offered to help with that.

I gave it a test with your rk808 driver. It just works \o/

regulator_get() triggers probing of the rk808 regulator driver and
returns a valid regulator.

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 13:19 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
2022-05-19 12:43   ` Aw: " Frank Wunderlich
2022-05-19 12:50     ` Ahmad Fatoum
2022-05-19 13:10       ` Sascha Hauer [this message]
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=20220519131019.GZ25578@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=frank-w@public-files.de \
    /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