diff options
author | Quentin Schulz <[email protected]> | 2019-03-21 16:48:48 +0800 |
---|---|---|
committer | Lee Jones <[email protected]> | 2019-05-14 08:13:25 +0100 |
commit | 129fc67785fbcf7d059757b27182ca4e3a089a80 (patch) | |
tree | 3b9132a4e6919b4455b5f0c2cc86339aa66ca6d9 | |
parent | 48171d0ea7caccf21c9ee3ae75eb370f2a756062 (diff) |
mfd: axp20x: Add USB power supply mfd cell to AXP813
The AXP813 has a VBUS power input. Now that the axp20x_usb_power driver
supports this variant, we can add an mfd cell for it to use it.
Signed-off-by: Quentin Schulz <[email protected]>
[[email protected]: add commit message]
Signed-off-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
-rw-r--r-- | drivers/mfd/axp20x.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 3c97f2c0fdfe..902f9f27e748 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -198,6 +198,12 @@ static const struct resource axp22x_usb_power_supply_resources[] = { DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), }; +/* AXP803 and AXP813/AXP818 share the same interrupts */ +static const struct resource axp803_usb_power_supply_resources[] = { + DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_PLUGIN, "VBUS_PLUGIN"), + DEFINE_RES_IRQ_NAMED(AXP803_IRQ_VBUS_REMOVAL, "VBUS_REMOVAL"), +}; + static const struct resource axp22x_pek_resources[] = { DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_PEK_RIS_EDGE, "PEK_DBR"), DEFINE_RES_IRQ_NAMED(AXP22X_IRQ_PEK_FAL_EDGE, "PEK_DBF"), @@ -793,6 +799,11 @@ static const struct mfd_cell axp813_cells[] = { .of_compatible = "x-powers,axp813-ac-power-supply", .num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources), .resources = axp20x_ac_power_supply_resources, + }, { + .name = "axp20x-usb-power-supply", + .num_resources = ARRAY_SIZE(axp803_usb_power_supply_resources), + .resources = axp803_usb_power_supply_resources, + .of_compatible = "x-powers,axp813-usb-power-supply", }, }; |