mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Frank Wunderlich <frank-w@public-files.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: Aw: Re:  Re: Driver load order
Date: Sat, 21 May 2022 12:31:54 +0200	[thread overview]
Message-ID: <trinity-58fee77a-48b6-48ff-99a5-8eaa6c480d0b-1653129114535@3c-app-gmx-bs49> (raw)
In-Reply-To: <20220519131019.GZ25578@pengutronix.de>

Hi,

current state is that pmu/ldo regulators work, but not the SWITCH ones.

these are read by linux using the supply of the regulator itself

	} else if (rdev->supply) {
		ret = regulator_get_voltage_rdev(rdev->supply->rdev);

tried to port this to barebox, but regulator-struct there does not have the supply member

	} else if (rdev->supply) {
		ret = regulator_get_voltage(rdev->supply);

so i added it here:

+++ b/include/regulator.h
@@ -86,6 +86,7 @@ struct regulator_dev {
        struct regmap *regmap;
        bool boot_on;
        bool always_on;
+       struct regulator *supply;
        /* the device this regulator device belongs to */
        struct device_d *dev;

but now this needs to be set somwhere...linux set this in

set_supply(struct regulator_dev *rdev,
		      struct regulator_dev *supply_rdev)
which is called in regulator_resolve_supply (called by _regulator_get).

regards Frank


> Gesendet: Donnerstag, 19. Mai 2022 um 15:10 Uhr
> Von: "Sascha Hauer" <sha@pengutronix.de>
> 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


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


  parent reply	other threads:[~2022-05-21 10:33 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
2022-05-19 17:54         ` Aw: " Frank Wunderlich
2022-05-21 10:31         ` Frank Wunderlich [this message]
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=trinity-58fee77a-48b6-48ff-99a5-8eaa6c480d0b-1653129114535@3c-app-gmx-bs49 \
    --to=frank-w@public-files.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    --subject='Aw: Re:  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