All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
	Sebastian Reichel <sre@kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Hans de Goede <hdegoede@redhat.com>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Matti Vaittinen" <mazziesaccount@gmail.com>,
	"Pali Rohár" <pali@kernel.org>,
	"Paul Cercueil" <paul@crapouillou.net>,
	"Samuel Holland" <samuel@sholland.org>,
	"David Lechner" <david@lechnology.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Sebastian Krzyszkowiak" <sebastian.krzyszkowiak@puri.sm>,
	"Purism Kernel Team" <kernel@puri.sm>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 4/7] power: supply: all: switch psy_cfg from of_node to fwnode
Date: Tue, 25 Feb 2025 11:39:48 +0800	[thread overview]
Message-ID: <0af9a7d7-e710-4634-ade8-6a3cf324bb5e@linux.alibaba.com> (raw)
In-Reply-To: <20250225-psy-core-convert-to-fwnode-v1-4-d5e4369936bb@collabora.com>



On 2025/2/25 07:21, Sebastian Reichel wrote:
> When registering a power-supply device, either a of_node or the more
> recent fwnode can be supplied. Since fwnode can also contain an of_node,
> let's try to get rid of it.
> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---

[snip]

>   drivers/power/supply/sc2731_charger.c       | 2 +-
>   drivers/power/supply/sc27xx_fuel_gauge.c    | 3 +--

> diff --git a/drivers/power/supply/sc2731_charger.c b/drivers/power/supply/sc2731_charger.c
> index 50d5157af9277dc09fe24852747f4f62e72bc712..58b86fd78771360f74ffdad152c3905e1bee7c1b 100644
> --- a/drivers/power/supply/sc2731_charger.c
> +++ b/drivers/power/supply/sc2731_charger.c
> @@ -480,7 +480,7 @@ static int sc2731_charger_probe(struct platform_device *pdev)
>   	}
>   
>   	charger_cfg.drv_data = info;
> -	charger_cfg.of_node = np;
> +	charger_cfg.fwnode = dev_fwnode(&pdev->dev);
>   	info->psy_usb = devm_power_supply_register(&pdev->dev,
>   						   &sc2731_charger_desc,
>   						   &charger_cfg);
> diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c
> index f36edc2ba708748d0ceb61298056f8c905aca012..196d96cd986266738785d8582e907858faaf2ba3 100644
> --- a/drivers/power/supply/sc27xx_fuel_gauge.c
> +++ b/drivers/power/supply/sc27xx_fuel_gauge.c
> @@ -1141,7 +1141,6 @@ static int sc27xx_fgu_hw_init(struct sc27xx_fgu_data *data)
>   static int sc27xx_fgu_probe(struct platform_device *pdev)
>   {
>   	struct device *dev = &pdev->dev;
> -	struct device_node *np = dev->of_node;
>   	struct power_supply_config fgu_cfg = { };
>   	struct sc27xx_fgu_data *data;
>   	int ret, irq;
> @@ -1205,7 +1204,7 @@ static int sc27xx_fgu_probe(struct platform_device *pdev)
>   	platform_set_drvdata(pdev, data);
>   
>   	fgu_cfg.drv_data = data;
> -	fgu_cfg.of_node = np;
> +	fgu_cfg.fwnode = dev_fwnode(dev);
>   	data->battery = devm_power_supply_register(dev, &sc27xx_fgu_desc,
>   						   &fgu_cfg);
>   	if (IS_ERR(data->battery)) {

For sc27xx parts:

Acked-by: Baolin Wang <baolin.wang@linux.alibaba.com>

Thanks.

  parent reply	other threads:[~2025-02-25  3:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 23:21 [PATCH 0/7] power: supply: core: convert to fwnode Sebastian Reichel
2025-02-24 23:21 ` [PATCH 1/7] power: supply: core: get rid of of_node Sebastian Reichel
2025-02-25 10:47   ` AngeloGioacchino Del Regno
2025-02-25 11:14   ` Matti Vaittinen
2025-02-25 13:11     ` Sebastian Reichel
2025-02-25 13:25       ` Matti Vaittinen
2025-02-24 23:21 ` [PATCH 2/7] regulator: act8865-regulator: switch psy_cfg from of_node to fwnode Sebastian Reichel
2025-03-12  0:12   ` Sebastian Reichel
2025-03-12 12:34     ` Mark Brown
2025-02-24 23:21 ` [PATCH 3/7] usb: common: usb-conn-gpio: " Sebastian Reichel
2025-02-25  3:32   ` Greg Kroah-Hartman
2025-03-08  1:10     ` Sebastian Reichel
2025-03-08  5:57       ` Greg Kroah-Hartman
2025-03-08  9:34         ` Konrad Dybcio
2025-03-08 16:33           ` Sebastian Reichel
2025-03-08 17:27             ` Greg Kroah-Hartman
2025-03-08 18:27               ` Konrad Dybcio
2025-03-21 16:36                 ` Konstantin Ryabitsev
2025-03-22  3:44                   ` Greg Kroah-Hartman
2025-04-11 12:45                   ` Greg Kroah-Hartman
2025-02-25 10:50   ` AngeloGioacchino Del Regno
2025-02-24 23:21 ` [PATCH 4/7] power: supply: all: " Sebastian Reichel
2025-02-25  2:40   ` Chen-Yu Tsai
2025-02-25  3:39   ` Baolin Wang [this message]
2025-02-25 10:47   ` AngeloGioacchino Del Regno
2025-02-24 23:21 ` [PATCH 5/7] power: supply: core: remove of_node from power_supply_config Sebastian Reichel
2025-02-25 10:49   ` AngeloGioacchino Del Regno
2025-02-24 23:21 ` [PATCH 6/7] power: supply: core: battery-info: fully switch to fwnode Sebastian Reichel
2025-02-25 10:49   ` AngeloGioacchino Del Regno
2025-02-24 23:21 ` [PATCH 7/7] power: supply: core: convert to fwnnode Sebastian Reichel
2025-02-25 10:49   ` AngeloGioacchino Del Regno
2025-02-25 13:16   ` Hans de Goede
2025-02-25 21:22     ` Sebastian Reichel
2025-03-08  0:45 ` (subset) [PATCH 0/7] power: supply: core: convert to fwnode Sebastian Reichel

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=0af9a7d7-e710-4634-ade8-6a3cf324bb5e@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=david@lechnology.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=kernel@puri.sm \
    --cc=konradybcio@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mazziesaccount@gmail.com \
    --cc=orsonzhai@gmail.com \
    --cc=pali@kernel.org \
    --cc=paul@crapouillou.net \
    --cc=samuel@sholland.org \
    --cc=sebastian.krzyszkowiak@puri.sm \
    --cc=sebastian.reichel@collabora.com \
    --cc=sre@kernel.org \
    --cc=wens@csie.org \
    --cc=zhang.lyra@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.