Skip to content

Commit cd7cf27

Browse files
mhaasLee Jones
authored andcommitted
mfd: axp20x: Add a cell for the ac power_supply part of the axp20x PMICs
As a counterpart to the usb power_supply cell, this commit adds an AC power_supply cell to the axp20x driver. Still missing are the RTC backup battery and the main battery charger cells. Signed-off-by: Michael Haas <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent 36e6d08 commit cd7cf27

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/mfd/axp20x.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ static struct resource axp152_pek_resources[] = {
130130
DEFINE_RES_IRQ_NAMED(AXP152_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
131131
};
132132

133+
static struct resource axp20x_ac_power_supply_resources[] = {
134+
DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_PLUGIN, "ACIN_PLUGIN"),
135+
DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_REMOVAL, "ACIN_REMOVAL"),
136+
DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_OVER_V, "ACIN_OVER_V"),
137+
};
138+
133139
static struct resource axp20x_pek_resources[] = {
134140
{
135141
.name = "PEK_DBR",
@@ -498,6 +504,11 @@ static struct mfd_cell axp20x_cells[] = {
498504
.resources = axp20x_pek_resources,
499505
}, {
500506
.name = "axp20x-regulator",
507+
}, {
508+
.name = "axp20x-ac-power-supply",
509+
.of_compatible = "x-powers,axp202-ac-power-supply",
510+
.num_resources = ARRAY_SIZE(axp20x_ac_power_supply_resources),
511+
.resources = axp20x_ac_power_supply_resources,
501512
}, {
502513
.name = "axp20x-usb-power-supply",
503514
.of_compatible = "x-powers,axp202-usb-power-supply",

0 commit comments

Comments
 (0)