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: barebox@lists.infradead.org
Subject: Re: [PATCH] mfd: axp20x: export axp20x-regulator child for AXP152
Date: Tue, 4 Oct 2022 09:47:07 +0200	[thread overview]
Message-ID: <20221004074706.GG986@pengutronix.de> (raw)
In-Reply-To: <20220928085052.2599436-1-a.fatoum@pengutronix.de>

On Wed, Sep 28, 2022 at 10:50:52AM +0200, Ahmad Fatoum wrote:
> While the upstream Linux driver doesn't support regulator configuration
> for the AXP152, we may need this in barebox for initial regulator setup.
> Thus have the MFD driver register the appropriate child device as done
> for the other drivers. While at it, pass along the axp20x driver data
> object. This is needed, so the regulator driver can query the variant;
> so far it was only possible to retrieve the parent regmap and redo the
> revision readout.
> 
> Signed-off-by: Johannes Zink <j.zink@pengutronix.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/mfd/axp20x.c | 5 +++++
>  1 file changed, 5 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index da1e8ce35a7d..0a53eaea7cfa 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -141,6 +141,9 @@ static const struct mfd_cell axp152_cells[] = {
>  	{
>  		.name		= "axp20x-pek",
>  	},
> +	{
> +		.name		= "axp20x-regulator",
> +	},
>  };
>  
>  static const struct mfd_cell axp288_cells[] = {
> @@ -337,6 +340,8 @@ int axp20x_device_probe(struct axp20x_dev *axp20x)
>  				     AXP806_REG_ADDR_EXT_ADDR_SLAVE_MODE);
>  	}
>  
> +	axp20x->dev->priv = axp20x;
> +
>  	ret = mfd_add_devices(axp20x->dev, axp20x->cells, axp20x->nr_cells);
>  	if (ret)
>  		return dev_err_probe(axp20x->dev, ret, "failed to add MFD devices\n");
> -- 
> 2.30.2
> 
> 
> 

-- 
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 |



      reply	other threads:[~2022-10-04  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-28  8:50 Ahmad Fatoum
2022-10-04  7:47 ` Sascha Hauer [this message]

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=20221004074706.GG986@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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