diff options
Diffstat (limited to 'include/axp209.h')
-rw-r--r-- | include/axp209.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/axp209.h b/include/axp209.h index 43e3873e24..dc27d65a43 100644 --- a/include/axp209.h +++ b/include/axp209.h @@ -34,6 +34,19 @@ enum axp209_reg { #define AXP209_OUTPUT_CTRL_DCDC2 BIT(4) #define AXP209_OUTPUT_CTRL_LDO3 BIT(6) +#define AXP209_LDO24_LDO2_MASK 0xf0 +#define AXP209_LDO24_LDO4_MASK 0x0f +#define AXP209_LDO24_LDO2_SET(reg, cfg) \ + (((reg) & ~AXP209_LDO24_LDO2_MASK) | \ + (((cfg) << 4) & AXP209_LDO24_LDO2_MASK)) +#define AXP209_LDO24_LDO4_SET(reg, cfg) \ + (((reg) & ~AXP209_LDO24_LDO4_MASK) | \ + (((cfg) << 0) & AXP209_LDO24_LDO4_MASK)) + +#define AXP209_LDO3_VOLTAGE_FROM_LDO3IN BIT(7) +#define AXP209_LDO3_VOLTAGE_MASK 0x7f +#define AXP209_LDO3_VOLTAGE_SET(x) ((x) & AXP209_LDO3_VOLTAGE_MASK) + #define AXP209_IRQ5_PEK_UP BIT(6) #define AXP209_IRQ5_PEK_DOWN BIT(5) |