mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
regulator: Add support for different OMAP variants in the pbias regulator
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlmpiLATHGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0A7zB/4+ejX3TwY9Jbj5Fc7TchcxDogn9OJr fT7E8Nz4Q+XxMLTppOCRbE3t6/c/d5ILDwB4fG8Z2IJckrOcallB67hpX1ArXfT2 4VKBQQx6bN55Bu2WAMz4ZC//uhD62Mw9QJS0PuCzkGJtcCnLvb5YFUbrI6KBBoSD PirGdcatZezm4G5cPRIYu0vHtadokljUx1qx/ZyNsEU562RsLuvPtI8IjItBTQ9E ryRgQjM+rMoBajy9qeHWKLzQVXr5sGuVMtv7EGUx/YzJ+xDjsCjyK0lI/Z14XGgx yDnzkTQWWmI8o6Kmn5VW7/F6CVuck/g3ozLtVbSBJZQe2h/FJk7q/2vQ =jJF/ -----END PGP SIGNATURE----- Merge tag 'regulator-pbias-variants' This pulls in a regulator change for OMAP from git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator regulator: Add support for different OMAP variants in the pbias regulator Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
commit
7aaa2b64c9
@ -34,6 +34,8 @@ struct pbias_reg_info {
|
||||
u32 vmode;
|
||||
unsigned int enable_time;
|
||||
char *name;
|
||||
const unsigned int *pbias_volt_table;
|
||||
int n_voltages;
|
||||
};
|
||||
|
||||
struct pbias_regulator_data {
|
||||
@ -49,11 +51,16 @@ struct pbias_of_data {
|
||||
unsigned int offset;
|
||||
};
|
||||
|
||||
static const unsigned int pbias_volt_table[] = {
|
||||
static const unsigned int pbias_volt_table_3_0V[] = {
|
||||
1800000,
|
||||
3000000
|
||||
};
|
||||
|
||||
static const unsigned int pbias_volt_table_3_3V[] = {
|
||||
1800000,
|
||||
3300000
|
||||
};
|
||||
|
||||
static const struct regulator_ops pbias_regulator_voltage_ops = {
|
||||
.list_voltage = regulator_list_voltage_table,
|
||||
.get_voltage_sel = regulator_get_voltage_sel_regmap,
|
||||
@ -69,6 +76,8 @@ static const struct pbias_reg_info pbias_mmc_omap2430 = {
|
||||
.vmode = BIT(0),
|
||||
.disable_val = 0,
|
||||
.enable_time = 100,
|
||||
.pbias_volt_table = pbias_volt_table_3_0V,
|
||||
.n_voltages = 2,
|
||||
.name = "pbias_mmc_omap2430"
|
||||
};
|
||||
|
||||
@ -77,6 +86,8 @@ static const struct pbias_reg_info pbias_sim_omap3 = {
|
||||
.enable_mask = BIT(9),
|
||||
.vmode = BIT(8),
|
||||
.enable_time = 100,
|
||||
.pbias_volt_table = pbias_volt_table_3_0V,
|
||||
.n_voltages = 2,
|
||||
.name = "pbias_sim_omap3"
|
||||
};
|
||||
|
||||
@ -86,6 +97,8 @@ static const struct pbias_reg_info pbias_mmc_omap4 = {
|
||||
.disable_val = BIT(25),
|
||||
.vmode = BIT(21),
|
||||
.enable_time = 100,
|
||||
.pbias_volt_table = pbias_volt_table_3_0V,
|
||||
.n_voltages = 2,
|
||||
.name = "pbias_mmc_omap4"
|
||||
};
|
||||
|
||||
@ -95,6 +108,8 @@ static const struct pbias_reg_info pbias_mmc_omap5 = {
|
||||
.disable_val = BIT(25),
|
||||
.vmode = BIT(21),
|
||||
.enable_time = 100,
|
||||
.pbias_volt_table = pbias_volt_table_3_3V,
|
||||
.n_voltages = 2,
|
||||
.name = "pbias_mmc_omap5"
|
||||
};
|
||||
|
||||
@ -199,8 +214,8 @@ static int pbias_regulator_probe(struct platform_device *pdev)
|
||||
drvdata[data_idx].desc.owner = THIS_MODULE;
|
||||
drvdata[data_idx].desc.type = REGULATOR_VOLTAGE;
|
||||
drvdata[data_idx].desc.ops = &pbias_regulator_voltage_ops;
|
||||
drvdata[data_idx].desc.volt_table = pbias_volt_table;
|
||||
drvdata[data_idx].desc.n_voltages = 2;
|
||||
drvdata[data_idx].desc.volt_table = info->pbias_volt_table;
|
||||
drvdata[data_idx].desc.n_voltages = info->n_voltages;
|
||||
drvdata[data_idx].desc.enable_time = info->enable_time;
|
||||
drvdata[data_idx].desc.vsel_reg = offset;
|
||||
drvdata[data_idx].desc.vsel_mask = info->vmode;
|
||||
|
Loading…
Reference in New Issue
Block a user