From: Andre Przywara <andre.przywara@arm.com>
To: Samuel Holland <samuel@sholland.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>, u-boot@lists.denx.de
Subject: Re: [PATCH 1/3] power: pmic: axp: Provide a variant ID in the driver data
Date: Wed, 11 Jan 2023 23:08:32 +0000 [thread overview]
Message-ID: <20230111230832.0508ee17@slackpad.lan> (raw)
In-Reply-To: <20221128064757.2933-2-samuel@sholland.org>
On Mon, 28 Nov 2022 00:47:54 -0600
Samuel Holland <samuel@sholland.org> wrote:
> Subordinate regulator drivers can use this enumerated ID instead of
> matching the compatible string again.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
>
> drivers/power/pmic/axp.c | 18 +++++++++---------
> include/axp_pmic.h | 12 ++++++++++++
> 2 files changed, 21 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/power/pmic/axp.c b/drivers/power/pmic/axp.c
> index 0f2b24a8b5f..e0005994e21 100644
> --- a/drivers/power/pmic/axp.c
> +++ b/drivers/power/pmic/axp.c
> @@ -64,15 +64,15 @@ static int axp_pmic_bind(struct udevice *dev)
> }
>
> static const struct udevice_id axp_pmic_ids[] = {
> - { .compatible = "x-powers,axp152" },
> - { .compatible = "x-powers,axp202" },
> - { .compatible = "x-powers,axp209" },
> - { .compatible = "x-powers,axp221" },
> - { .compatible = "x-powers,axp223" },
> - { .compatible = "x-powers,axp803" },
> - { .compatible = "x-powers,axp806" },
> - { .compatible = "x-powers,axp809" },
> - { .compatible = "x-powers,axp813" },
> + { .compatible = "x-powers,axp152", .data = AXP152_ID },
> + { .compatible = "x-powers,axp202", .data = AXP202_ID },
> + { .compatible = "x-powers,axp209", .data = AXP209_ID },
> + { .compatible = "x-powers,axp221", .data = AXP221_ID },
> + { .compatible = "x-powers,axp223", .data = AXP223_ID },
> + { .compatible = "x-powers,axp803", .data = AXP803_ID },
> + { .compatible = "x-powers,axp806", .data = AXP806_ID },
> + { .compatible = "x-powers,axp809", .data = AXP809_ID },
> + { .compatible = "x-powers,axp813", .data = AXP813_ID },
> { }
> };
>
> diff --git a/include/axp_pmic.h b/include/axp_pmic.h
> index 01ebba63479..4ac64865831 100644
> --- a/include/axp_pmic.h
> +++ b/include/axp_pmic.h
> @@ -26,6 +26,18 @@
> #define AXP_PMIC_SEC_DEVICE_ADDR 0x745
> #define AXP_PMIC_SEC_RUNTIME_ADDR 0x3a
>
> +enum {
> + AXP152_ID,
> + AXP202_ID,
> + AXP209_ID,
> + AXP221_ID,
> + AXP223_ID,
> + AXP803_ID,
> + AXP806_ID,
> + AXP809_ID,
> + AXP813_ID,
> +};
> +
> int axp_set_dcdc1(unsigned int mvolt);
> int axp_set_dcdc2(unsigned int mvolt);
> int axp_set_dcdc3(unsigned int mvolt);
next prev parent reply other threads:[~2023-01-11 23:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 6:47 [PATCH 0/3] power: X-Powers PMIC regulator support Samuel Holland
2022-11-28 6:47 ` [PATCH 1/3] power: pmic: axp: Provide a variant ID in the driver data Samuel Holland
2023-01-11 23:08 ` Andre Przywara [this message]
2022-11-28 6:47 ` [PATCH 2/3] power: regulator: Add a driver for AXP PMIC regulators Samuel Holland
2023-01-11 23:08 ` Andre Przywara
2023-01-12 3:31 ` Samuel Holland
2022-11-28 6:47 ` [PATCH 3/3] power: pmic: axp: Bind regulators from the DT Samuel Holland
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=20230111230832.0508ee17@slackpad.lan \
--to=andre.przywara@arm.com \
--cc=jh80.chung@samsung.com \
--cc=samuel@sholland.org \
--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;
as well as URLs for NNTP newsgroup(s).