Re: [PATCH 09/10] power: supply: bq25890: Add support for having a secondary charger IC

Marek Vasut
2022-11-27T21:36:13Z

On 11/27/22 19:02, Hans de Goede wrote:
> Some devices, such as the Lenovo Yoga Tab 3 Pro (YT3-X90F) have multiple
> batteries with a separate bq25890 charger for each battery.
>
> This requires some coordination between the chargers specifically
> the main charger needs to put the secondary charger in Hi-Z mode when:
>
> 1. Enabling its 5V boost (OTG) output to power an external USB device,
> to avoid the secondary charger IC seeing this as external Vbus and
> then trying to charge the secondary battery from this.
>
> 2. Talking the Pump Express protocol to increase the external Vbus voltage.
> Having the secondary charger drawing current when the main charger is
> trying to talk the Pump Express protocol results in the external Vbus
> voltage not being raised.
>
> Add a new "linux,secondary-charger-name" string device-property, which
> can be set to the power_supply class device's name of the secondary
> charger when there is a secondary charger; and make the Vbus regulator and
> Pump Express code put the secondary charger in Hi-Z mode when necessary.
>
> So far this new property is only used on x86/ACPI (non devicetree) devs,
> IOW it is not used in actual devicetree files. The devicetree-bindings
> maintainers have requested properties like these to not be added to the
> devicetree-bindings, so the new property is deliberately not added
> to the existing devicetree-bindings.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

I kind-of wonder whether there shouldn't be some generic implementation
of this kind of charger interaction on subsystem level. But maybe that
is something for a subsequent series.

Reviewed-by: Marek Vasut <marex@denx.de>