Re: [PATCH v2 3/6] mfd: axp20x: Add a cell for the ac power_supply part of the axp20x PMICs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

On Sun, May 1, 2016 at 4:57 PM, Michael Haas <haas@xxxxxxxxxxxxxxxxxxxx> wrote:
> 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 <haas@xxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/mfd/axp20x.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index a57d6e9..9351c0e 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -178,6 +178,12 @@ static struct resource axp288_power_button_resources[] = {
>         },
>  };
>
> +static struct resource axp20x_ac_power_supply_resources[] = {
> +       DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_PLUGIN, "ACIN_PLUGIN"),
> +       DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_REMOVAL, "ACIN_REMOVAL"),
> +       DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_OVER_V, "ACIN_OVER_V"),
> +};
> +

Please group the resources by family, i.e. put this one above
axp20x_pek_resources.

>  static struct resource axp288_fuel_gauge_resources[] = {
>         {
>                 .start = AXP288_IRQ_QWBTU,
> @@ -440,6 +446,11 @@ static struct mfd_cell axp20x_cells[] = {
>                 .of_compatible  = "x-powers,axp202-usb-power-supply",
>                 .num_resources  = ARRAY_SIZE(axp20x_usb_power_supply_resources),
>                 .resources      = axp20x_usb_power_supply_resources,
> +       }, {
> +               .name           = "axp20x-ac-power-supply",
> +               .of_compatible  = "x-powers,axp202-ac-power-supply",
> +               .num_resources  = ARRAY_SIZE(axp20x_ac_power_supply_resources),
> +               .resources      = axp20x_ac_power_supply_resources,

I would put this before "x-powers,axp202-usb-power-supply", as it's the primary
power supply, but keeping the power supplies grouped. The list is already out of
alphabetic order anyway.

ChenYu

>         },
>  };
>
> --
> 2.8.0
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux