summaryrefslogtreecommitdiff
path: root/drivers/power/supply/mt6360_charger.c
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2024-09-03 23:33:25 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-09-03 23:33:25 +0200
commit2ff28e97658af64ae22878ee4dd8c0b583cd431c (patch)
tree90df8d4e34a2cfdb5780db58613c675a791eb9e2 /drivers/power/supply/mt6360_charger.c
parent47271a9356192bf911a9f32de9236425063ed6d7 (diff)
parent364ea7ccaef917a3068236a19a4b31a0623b561a (diff)
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/power/supply/mt6360_charger.c')
-rw-r--r--drivers/power/supply/mt6360_charger.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/power/supply/mt6360_charger.c b/drivers/power/supply/mt6360_charger.c
index aca123783efc..e99e55148976 100644
--- a/drivers/power/supply/mt6360_charger.c
+++ b/drivers/power/supply/mt6360_charger.c
@@ -154,13 +154,6 @@ enum mt6360_pmu_chg_type {
MT6360_CHG_TYPE_MAX,
};
-static enum power_supply_usb_type mt6360_charger_usb_types[] = {
- POWER_SUPPLY_USB_TYPE_UNKNOWN,
- POWER_SUPPLY_USB_TYPE_SDP,
- POWER_SUPPLY_USB_TYPE_DCP,
- POWER_SUPPLY_USB_TYPE_CDP,
-};
-
static int mt6360_get_chrdet_ext_stat(struct mt6360_chg_info *mci,
bool *pwr_rdy)
{
@@ -574,8 +567,10 @@ static const struct power_supply_desc mt6360_charger_desc = {
.get_property = mt6360_charger_get_property,
.set_property = mt6360_charger_set_property,
.property_is_writeable = mt6360_charger_property_is_writeable,
- .usb_types = mt6360_charger_usb_types,
- .num_usb_types = ARRAY_SIZE(mt6360_charger_usb_types),
+ .usb_types = BIT(POWER_SUPPLY_USB_TYPE_SDP) |
+ BIT(POWER_SUPPLY_USB_TYPE_CDP) |
+ BIT(POWER_SUPPLY_USB_TYPE_DCP) |
+ BIT(POWER_SUPPLY_USB_TYPE_UNKNOWN),
};
static const struct regulator_ops mt6360_chg_otg_ops = {