summaryrefslogtreecommitdiff
path: root/drivers/usb/typec/tipd/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/typec/tipd/core.c')
-rw-r--r--drivers/usb/typec/tipd/core.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index dd51a25480bf..d532670885e4 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -150,11 +150,6 @@ static enum power_supply_property tps6598x_psy_props[] = {
POWER_SUPPLY_PROP_ONLINE,
};
-static enum power_supply_usb_type tps6598x_psy_usb_types[] = {
- POWER_SUPPLY_USB_TYPE_C,
- POWER_SUPPLY_USB_TYPE_PD,
-};
-
static const char *tps6598x_psy_name_prefix = "tps6598x-source-psy-";
/*
@@ -827,8 +822,8 @@ static int devm_tps6598_psy_register(struct tps6598x *tps)
tps->psy_desc.name = psy_name;
tps->psy_desc.type = POWER_SUPPLY_TYPE_USB;
- tps->psy_desc.usb_types = tps6598x_psy_usb_types;
- tps->psy_desc.num_usb_types = ARRAY_SIZE(tps6598x_psy_usb_types);
+ tps->psy_desc.usb_types = BIT(POWER_SUPPLY_USB_TYPE_C) |
+ BIT(POWER_SUPPLY_USB_TYPE_PD);
tps->psy_desc.properties = tps6598x_psy_props;
tps->psy_desc.num_properties = ARRAY_SIZE(tps6598x_psy_props);
tps->psy_desc.get_property = tps6598x_psy_get_prop;