SmartAudio/lichee/linux-4.9/drivers/power/supply/axp/axp20x/axp20x-regulator.h

53 lines
1.6 KiB
C
Executable File

/*
* drivers/power/supply/axp/axp20x/axp20x-regulator.h
* (C) Copyright 2010-2016
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
* caiyongheng <caiyongheng@allwinnertech.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
*/
#ifndef AXP20X_REGULATOR_H
#define AXP20X_REGULATOR_H
#include "axp20x.h"
enum {
AXP20X_ID_LDO1, /* LDO1 */
AXP20X_ID_LDO2, /* LDO2 */
AXP20X_ID_LDO3, /* LDO3 */
AXP20X_ID_LDO4, /* LDO4 */
AXP20X_ID_LDOIO0 = AXP_LDOIO_ID_START,
AXP20X_ID_DCDC2 = AXP_DCDC_ID_START,
AXP20X_ID_DCDC3,
};
/* AXP20 Regulator Registers */
#define AXP20X_LDO1 AXP20X_STATUS
#define AXP20X_LDO2 AXP20X_LDO24OUT_VOL
#define AXP20X_LDO3 AXP20X_LDO3OUT_VOL
#define AXP20X_LDO4 AXP20X_LDO24OUT_VOL
#define AXP20X_DCDC2 AXP20X_DC2OUT_VOL
#define AXP20X_DCDC3 AXP20X_DC3OUT_VOL
#define AXP20X_LDOIO0 AXP20X_GPIO0_VOL
#define AXP20X_LDO1EN AXP20X_STATUS
#define AXP20X_LDO2EN AXP20X_LDO234_DC23_CTL
#define AXP20X_LDO3EN AXP20X_LDO234_DC23_CTL
#define AXP20X_LDO4EN AXP20X_LDO234_DC23_CTL
#define AXP20X_DCDC2EN AXP20X_LDO234_DC23_CTL
#define AXP20X_DCDC3EN AXP20X_LDO234_DC23_CTL
#define AXP20X_LDOIO0EN AXP20X_GPIO0_CTL
extern int axp20x_need_save_regulator;
extern int axp20x_regulator_save(void);
extern void axp20x_regulator_restore(void);
#endif /* AXP20X_REGULATOR_H */