Re: [PATCH v3 08/16] mfd: axp20x: Add support for AXP192

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

 



On Sat, Jun 18, 2022 at 11:40 PM Aidan MacDonald
<aidanmacdonald.0x0@xxxxxxxxx> wrote:
>
> The AXP192 PMIC is similar to the AXP202/AXP209, but with different
> regulators, additional GPIOs, and a different IRQ register layout.

...

> +static int axp192_get_irq_reg(unsigned int base_reg, int i)
> +{
> +       /* linear mapping for IRQ1 to IRQ4 */
> +       if (i < 4)
> +               return base_reg + i;
> +
> +       /* handle IRQ5 separately */
> +       if (base_reg == AXP192_IRQ1_EN)
> +               return AXP192_IRQ5_EN;

> +       else

Redundant 'else'.

> +               return AXP192_IRQ5_STATE;
> +}

...

> +enum {
> +       AXP192_DCDC1 = 0,
> +       AXP192_DCDC2,
> +       AXP192_DCDC3,
> +       AXP192_LDO1,
> +       AXP192_LDO2,
> +       AXP192_LDO3,
> +       AXP192_LDO_IO0,

> +       AXP192_REG_ID_MAX,

Comma is not needed for a terminator.

> +};

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux