extcon: intel-cht-wc: Add support for registering a power_supply class-device
authorHans de Goede <hdegoede@redhat.com>
Tue, 1 Feb 2022 13:07:05 +0000 (14:07 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 1 Feb 2022 13:55:12 +0000 (14:55 +0100)
commit66e31186cd2aa7ee325b64555321e2ba06f141ab
tree29f4409dfc401421e77a9f0306cdcd31243fc501
parent73b5ae341588ddb6480dff5471e66e4016be26a0
extcon: intel-cht-wc: Add support for registering a power_supply class-device

The bq25890 used on the Yogabook YB1-X90 / -X91 models relies on
the extcon-driver's BC-1.2 charger detection, and the bq25890 driver
expect this info to be  available through a parent power_supply
class-device which models the detected charger (idem to how the Type-C
TCPM code registers a power_supply classdev for the connected charger).

Add support for registering the power_supply class-device expected
by this setup.

Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/extcon/extcon-intel-cht-wc.c