Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: axp20x: Add separate MFD cell for AXP223

The AXP223 shares most of its logic with the AXP221 but has some
differences for the VBUS power supply driver. Thus, to probe the driver
with the correct compatible, the AXP221 and the AXP223 now have separate
MFD cells.

AXP221 MFD cells are renamed from axp22x_cells to axp221_cells to avoid
confusion.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Quentin Schulz and committed by
Lee Jones
4c650561 cd532166

+24 -4
+24 -4
drivers/mfd/axp20x.c
··· 599 599 }, 600 600 }; 601 601 602 - static struct mfd_cell axp22x_cells[] = { 602 + static struct mfd_cell axp221_cells[] = { 603 + { 604 + .name = "axp20x-pek", 605 + .num_resources = ARRAY_SIZE(axp22x_pek_resources), 606 + .resources = axp22x_pek_resources, 607 + }, { 608 + .name = "axp20x-regulator", 609 + }, { 610 + .name = "axp20x-usb-power-supply", 611 + .of_compatible = "x-powers,axp221-usb-power-supply", 612 + .num_resources = ARRAY_SIZE(axp22x_usb_power_supply_resources), 613 + .resources = axp22x_usb_power_supply_resources, 614 + }, 615 + }; 616 + 617 + static struct mfd_cell axp223_cells[] = { 603 618 { 604 619 .name = "axp20x-pek", 605 620 .num_resources = ARRAY_SIZE(axp22x_pek_resources), ··· 623 608 .name = "axp20x-regulator", 624 609 }, { 625 610 .name = "axp20x-usb-power-supply", 626 - .of_compatible = "x-powers,axp221-usb-power-supply", 611 + .of_compatible = "x-powers,axp223-usb-power-supply", 627 612 .num_resources = ARRAY_SIZE(axp22x_usb_power_supply_resources), 628 613 .resources = axp22x_usb_power_supply_resources, 629 614 }, ··· 816 801 axp20x->regmap_irq_chip = &axp20x_regmap_irq_chip; 817 802 break; 818 803 case AXP221_ID: 804 + axp20x->nr_cells = ARRAY_SIZE(axp221_cells); 805 + axp20x->cells = axp221_cells; 806 + axp20x->regmap_cfg = &axp22x_regmap_config; 807 + axp20x->regmap_irq_chip = &axp22x_regmap_irq_chip; 808 + break; 819 809 case AXP223_ID: 820 - axp20x->nr_cells = ARRAY_SIZE(axp22x_cells); 821 - axp20x->cells = axp22x_cells; 810 + axp20x->nr_cells = ARRAY_SIZE(axp223_cells); 811 + axp20x->cells = axp223_cells; 822 812 axp20x->regmap_cfg = &axp22x_regmap_config; 823 813 axp20x->regmap_irq_chip = &axp22x_regmap_irq_chip; 824 814 break;