diff options
| author | Sebastian Reichel <sebastian.reichel@collabora.com> | 2024-09-03 23:33:25 +0200 |
|---|---|---|
| committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2024-09-03 23:33:25 +0200 |
| commit | 2ff28e97658af64ae22878ee4dd8c0b583cd431c (patch) | |
| tree | 90df8d4e34a2cfdb5780db58613c675a791eb9e2 /drivers/usb/typec/rt1719.c | |
| parent | 47271a9356192bf911a9f32de9236425063ed6d7 (diff) | |
| parent | 364ea7ccaef917a3068236a19a4b31a0623b561a (diff) | |
| download | linux-2ff28e97658af64ae22878ee4dd8c0b583cd431c.tar.gz linux-2ff28e97658af64ae22878ee4dd8c0b583cd431c.tar.bz2 linux-2ff28e97658af64ae22878ee4dd8c0b583cd431c.zip | |
Merge tag 'ib-psy-usb-types-signed' into psy-next
Changing usb_types type from array to bitmap in the power_supply_desc
struct requires updating power-supply drivers living in different
subsystem, so it is handled via an immutable branch.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/usb/typec/rt1719.c')
| -rw-r--r-- | drivers/usb/typec/rt1719.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/usb/typec/rt1719.c b/drivers/usb/typec/rt1719.c index be02d420920e..0b0c23a0b014 100644 --- a/drivers/usb/typec/rt1719.c +++ b/drivers/usb/typec/rt1719.c @@ -109,12 +109,6 @@ struct rt1719_data { u16 conn_stat; }; -static const enum power_supply_usb_type rt1719_psy_usb_types[] = { - POWER_SUPPLY_USB_TYPE_C, - POWER_SUPPLY_USB_TYPE_PD, - POWER_SUPPLY_USB_TYPE_PD_PPS -}; - static const enum power_supply_property rt1719_psy_properties[] = { POWER_SUPPLY_PROP_ONLINE, POWER_SUPPLY_PROP_USB_TYPE, @@ -572,8 +566,9 @@ static int devm_rt1719_psy_register(struct rt1719_data *data) data->psy_desc.name = psy_name; data->psy_desc.type = POWER_SUPPLY_TYPE_USB; - data->psy_desc.usb_types = rt1719_psy_usb_types; - data->psy_desc.num_usb_types = ARRAY_SIZE(rt1719_psy_usb_types); + data->psy_desc.usb_types = BIT(POWER_SUPPLY_USB_TYPE_C) | + BIT(POWER_SUPPLY_USB_TYPE_PD) | + BIT(POWER_SUPPLY_USB_TYPE_PD_PPS); data->psy_desc.properties = rt1719_psy_properties; data->psy_desc.num_properties = ARRAY_SIZE(rt1719_psy_properties); data->psy_desc.get_property = rt1719_psy_get_property; |
