]> git.baikalelectronics.ru Git - kernel.git/commit
extcon: intel-cht-wc: Refactor cht_wc_extcon_get_charger()
authorHans de Goede <hdegoede@redhat.com>
Tue, 1 Feb 2022 13:07:04 +0000 (14:07 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 1 Feb 2022 13:55:12 +0000 (14:55 +0100)
commit8609fd538d034908f6aae68c4f59aaad579f4ac9
treed74d6115e3957bc9121084aa5ffb8a11e6a4b429
parent676b8c65a0f5d17aee280cd321788183380e147a
extcon: intel-cht-wc: Refactor cht_wc_extcon_get_charger()

This is a preparation patch for adding support for registering
a power_supply class device.

Setting usbsrc to "CHT_WC_USBSRC_TYPE_SDP << CHT_WC_USBSRC_TYPE_SHIFT"
will make the following switch-case return EXTCON_CHG_USB_SDP
just as before, so there is no functional change.

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