From: sbabic@denx.de
To: Adam Ford <aford173@gmail.com>,u-boot@lists.denx.de
Subject: [PATCH V2 2/4] regulator: bd718x7: Only bind children when PMIC_CHILDREN is enabled
Date: Tue, 8 Nov 2022 17:38:48 +0100 (CET) [thread overview]
Message-ID: <20221108163854.305F285010@phobos.denx.de> (raw)
In-Reply-To: <20221022134345.7613-2-aford173@gmail.com>
> If the bd718x7 is required, but PMIC_CHILDREN is disabled, this
> driver throws a compile error. Fix this by putting the function
> to bind children into an if-statement checking for PMIC_CHILDREN.
> Allowing PMIC_CHILDREN to be disabled in SPL saves some space and
> still permits some read/write functions to access the PMIC in
> early startup.
> Signed-off-by: Adam Ford <aford173@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
> diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
> index cb9238972f..fdbbd6f559 100644
> --- a/drivers/power/pmic/bd71837.c
> +++ b/drivers/power/pmic/bd71837.c
> @@ -63,10 +63,11 @@ static int bd71837_bind(struct udevice *dev)
>
> debug("%s: '%s' - found regulators subnode\n", __func__, dev->name);
>
> - children = pmic_bind_children(dev, regulators_node, pmic_children_info);
> - if (!children)
> - debug("%s: %s - no child found\n", __func__, dev->name);
> -
> + if (CONFIG_IS_ENABLED(PMIC_CHILDREN)) {
> + children = pmic_bind_children(dev, regulators_node, pmic_children_info);
> + if (!children)
> + debug("%s: %s - no child found\n", __func__, dev->name);
> + }
> /* Always return success for this device */
> return 0;
> }
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
next prev parent reply other threads:[~2022-11-08 16:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-22 13:43 [PATCH V2 1/4] configs: imx8mn_beacon: Re-align memory to standard imx8mn settings Adam Ford
2022-10-22 13:43 ` [PATCH V2 2/4] regulator: bd718x7: Only bind children when PMIC_CHILDREN is enabled Adam Ford
2022-10-22 15:37 ` Fabio Estevam
2022-11-08 16:38 ` sbabic [this message]
2022-10-22 13:43 ` [PATCH V2 3/4] configs: imx8mn_beacon: Enable SPL_DM_PMIC_BD71837 Adam Ford
2022-10-22 15:37 ` Fabio Estevam
2022-10-25 1:22 ` Peng Fan
2022-11-08 16:50 ` sbabic
2022-10-22 13:43 ` [PATCH V2 4/4] imx: imx8mn-beacon: Fix out of spec voltage Adam Ford
2022-10-22 15:38 ` Fabio Estevam
2022-10-25 1:22 ` Peng Fan
2022-11-08 16:38 ` sbabic
2022-10-22 15:36 ` [PATCH V2 1/4] configs: imx8mn_beacon: Re-align memory to standard imx8mn settings Fabio Estevam
2022-10-24 21:36 ` Tim Harvey
2022-10-25 1:20 ` Peng Fan
2022-11-08 16:39 ` sbabic
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=20221108163854.305F285010@phobos.denx.de \
--to=sbabic@denx.de \
--cc=aford173@gmail.com \
--cc=u-boot@lists.denx.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