Re: [PATCH v4 04/10] power: supply: max77693: Set charge current limits during init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 16.08.2024 11:54, Krzysztof Kozlowski wrote:
On 16/08/2024 10:19, Artur Weber wrote:
@@ -732,6 +794,15 @@ static int max77693_charger_probe(struct platform_device *pdev)
  	chg->dev = &pdev->dev;
  	chg->max77693 = max77693;
+ psy_cfg.drv_data = chg;
+
+	chg->charger = devm_power_supply_register(&pdev->dev,
+						  &max77693_charger_desc,
+						  &psy_cfg);
+	if (IS_ERR(chg->charger))
+		return dev_err_probe(&pdev->dev, PTR_ERR(chg->charger),
+				     "failed: power supply register\n");

This code move is not explained in the commit msg. At least I could not
find it. Please explain why you need it in the commit msg.

This is done because the call to power_supply_get_battery_info in
max77693_dt_init requires chg->charger to be set. (I was considering
putting this in the commit message, can't remember why I didn't do it.
I'll add it in the next version.)

Best regards
Artur




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux