Re: [PATCH 08/10] power: supply: bq25890: Support boards with more then one charger IC

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

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 the bq25890_charger code to use a unique name per
> registered power_supply class device, rather then hardcoding
> "bq25890-charger" as power_supply class device name.
>
> Add a "-%d" prefix to the name, allocated through idr in the same way
> as several other power_supply drivers are already doing this.
>
> Note this also updates: drivers/platform/x86/x86-android-tablets.c
> which refers to the charger by power_supply-class-device-name for
> the purpose of setting the "supplied-from" property on the fuel-gauge
> to this name.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

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