Beispiel #1
0
static struct regulator_ops qpnp_ftsmps_ops = {
	.enable			= qpnp_regulator_common_enable,
	.disable		= qpnp_regulator_common_disable,
	.is_enabled		= qpnp_regulator_common_is_enabled,
	.set_voltage		= qpnp_regulator_common_set_voltage,
	.get_voltage		= qpnp_regulator_common_get_voltage,
	.list_voltage		= qpnp_regulator_common_list_voltage,
	.set_mode		= qpnp_regulator_common_set_mode,
	.get_mode		= qpnp_regulator_common_get_mode,
	.get_optimum_mode	= qpnp_regulator_common_get_optimum_mode,
	.enable_time		= qpnp_regulator_common_enable_time,
};

static const struct qpnp_regulator_mapping supported_regulators[] = {
	QPNP_VREG_MAP(HF_BUCK,  GP_CTL,    SMPS,   smps,   smps,   100000),
	QPNP_VREG_MAP(LDO,      N300,      LDO,    ldo,    nldo1,   10000),
	QPNP_VREG_MAP(LDO,      N600,      LDO,    ldo,    nldo2,   10000),
	QPNP_VREG_MAP(LDO,      N1200,     LDO,    ldo,    nldo2,   10000),
	QPNP_VREG_MAP(LDO,      P50,       LDO,    ldo,    pldo,     5000),
	QPNP_VREG_MAP(LDO,      P150,      LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,      P300,      LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,      P600,      LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,      P1200,     LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(VS,       LV100,     VS,     vs,     none,        0),
	QPNP_VREG_MAP(VS,       LV300,     VS,     vs,     none,        0),
	QPNP_VREG_MAP(VS,       MV300,     VS,     vs,     none,        0),
	QPNP_VREG_MAP(VS,       MV500,     VS,     vs,     none,        0),
	QPNP_VREG_MAP(VS,       HDMI,      VS,     vs,     none,        0),
	QPNP_VREG_MAP(VS,       OTG,       VS,     vs,     none,        0),
	QPNP_VREG_MAP(BOOST,    5V_BOOST,  BOOST,  boost,  boost,       0),
	.disable		= qpnp_regulator_common_disable,
	.is_enabled		= qpnp_regulator_common_is_enabled,
	.set_voltage		= qpnp_regulator_common_set_voltage,
	.get_voltage		= qpnp_regulator_common_get_voltage,
	.list_voltage		= qpnp_regulator_common_list_voltage,
	.set_mode		= qpnp_regulator_common_set_mode,
	.get_mode		= qpnp_regulator_common_get_mode,
	.get_optimum_mode	= qpnp_regulator_common_get_optimum_mode,
	.enable_time		= qpnp_regulator_common_enable_time,
};

#define INF 0xFF

static const struct qpnp_regulator_mapping supported_regulators[] = {
	
	QPNP_VREG_MAP(BUCK,  GP_CTL,   0, INF, SMPS,   smps,   smps,   100000),
	QPNP_VREG_MAP(LDO,   N300,     0, INF, LDO,    ldo,    nldo1,   10000),
	QPNP_VREG_MAP(LDO,   N600,     0,   0, LDO,    ldo,    nldo2,   10000),
	QPNP_VREG_MAP(LDO,   N1200,    0,   0, LDO,    ldo,    nldo2,   10000),
	QPNP_VREG_MAP(LDO,   N600,     1, INF, LDO,    ldo,    nldo3,   10000),
	QPNP_VREG_MAP(LDO,   N1200,    1, INF, LDO,    ldo,    nldo3,   10000),
	QPNP_VREG_MAP(LDO,   N600_ST,  0,   0, LDO,    ldo,    nldo2,   10000),
	QPNP_VREG_MAP(LDO,   N1200_ST, 0,   0, LDO,    ldo,    nldo2,   10000),
	QPNP_VREG_MAP(LDO,   N600_ST,  1, INF, LDO,    ldo,    nldo3,   10000),
	QPNP_VREG_MAP(LDO,   N1200_ST, 1, INF, LDO,    ldo,    nldo3,   10000),
	QPNP_VREG_MAP(LDO,   P50,      0, INF, LDO,    ldo,    pldo,     5000),
	QPNP_VREG_MAP(LDO,   P150,     0, INF, LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,   P300,     0, INF, LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,   P600,     0, INF, LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,   P1200,    0, INF, LDO,    ldo,    pldo,    10000),
	QPNP_VREG_MAP(LDO,   LV_P50,   0, INF, LDO,    ldo,    pldo,     5000),