Skip to content

Commit f8568cb

Browse files
AxelLinbroonie
authored andcommitted
regulator: ab3100: Set enable enable_time in regulator_desc
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 8c5e461 commit f8568cb

1 file changed

Lines changed: 9 additions & 28 deletions

File tree

‎drivers/regulator/ab3100.c‎

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -347,31 +347,6 @@ static int ab3100_get_voltage_regulator_external(struct regulator_dev *reg)
347347
return abreg->plfdata->external_voltage;
348348
}
349349

350-
static int ab3100_enable_time_regulator(struct regulator_dev *reg)
351-
{
352-
struct ab3100_regulator *abreg = reg->reg_data;
353-
354-
/* Per-regulator power on delay from spec */
355-
switch (abreg->regreg) {
356-
case AB3100_LDO_A: /* Fallthrough */
357-
case AB3100_LDO_C: /* Fallthrough */
358-
case AB3100_LDO_D: /* Fallthrough */
359-
case AB3100_LDO_E: /* Fallthrough */
360-
case AB3100_LDO_H: /* Fallthrough */
361-
case AB3100_LDO_K:
362-
return 200;
363-
case AB3100_LDO_F:
364-
return 600;
365-
case AB3100_LDO_G:
366-
return 400;
367-
case AB3100_BUCK:
368-
return 1000;
369-
default:
370-
break;
371-
}
372-
return 0;
373-
}
374-
375350
static int ab3100_get_fixed_voltage_regulator(struct regulator_dev *reg)
376351
{
377352
return reg->desc->min_uV;
@@ -383,7 +358,6 @@ static struct regulator_ops regulator_ops_fixed = {
383358
.disable = ab3100_disable_regulator,
384359
.is_enabled = ab3100_is_enabled_regulator,
385360
.get_voltage = ab3100_get_fixed_voltage_regulator,
386-
.enable_time = ab3100_enable_time_regulator,
387361
};
388362

389363
static struct regulator_ops regulator_ops_variable = {
@@ -393,7 +367,6 @@ static struct regulator_ops regulator_ops_variable = {
393367
.get_voltage = ab3100_get_voltage_regulator,
394368
.set_voltage_sel = ab3100_set_voltage_regulator_sel,
395369
.list_voltage = regulator_list_voltage_table,
396-
.enable_time = ab3100_enable_time_regulator,
397370
};
398371

399372
static struct regulator_ops regulator_ops_variable_sleepable = {
@@ -404,7 +377,6 @@ static struct regulator_ops regulator_ops_variable_sleepable = {
404377
.set_voltage_sel = ab3100_set_voltage_regulator_sel,
405378
.set_suspend_voltage = ab3100_set_suspend_voltage_regulator,
406379
.list_voltage = regulator_list_voltage_table,
407-
.enable_time = ab3100_enable_time_regulator,
408380
};
409381

410382
/*
@@ -430,6 +402,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
430402
.type = REGULATOR_VOLTAGE,
431403
.owner = THIS_MODULE,
432404
.min_uV = LDO_A_VOLTAGE,
405+
.enable_time = 200,
433406
},
434407
{
435408
.name = "LDO_C",
@@ -439,6 +412,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
439412
.type = REGULATOR_VOLTAGE,
440413
.owner = THIS_MODULE,
441414
.min_uV = LDO_C_VOLTAGE,
415+
.enable_time = 200,
442416
},
443417
{
444418
.name = "LDO_D",
@@ -448,6 +422,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
448422
.type = REGULATOR_VOLTAGE,
449423
.owner = THIS_MODULE,
450424
.min_uV = LDO_D_VOLTAGE,
425+
.enable_time = 200,
451426
},
452427
{
453428
.name = "LDO_E",
@@ -457,6 +432,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
457432
.volt_table = ldo_e_buck_typ_voltages,
458433
.type = REGULATOR_VOLTAGE,
459434
.owner = THIS_MODULE,
435+
.enable_time = 200,
460436
},
461437
{
462438
.name = "LDO_F",
@@ -466,6 +442,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
466442
.volt_table = ldo_f_typ_voltages,
467443
.type = REGULATOR_VOLTAGE,
468444
.owner = THIS_MODULE,
445+
.enable_time = 600,
469446
},
470447
{
471448
.name = "LDO_G",
@@ -475,6 +452,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
475452
.volt_table = ldo_g_typ_voltages,
476453
.type = REGULATOR_VOLTAGE,
477454
.owner = THIS_MODULE,
455+
.enable_time = 400,
478456
},
479457
{
480458
.name = "LDO_H",
@@ -484,6 +462,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
484462
.volt_table = ldo_h_typ_voltages,
485463
.type = REGULATOR_VOLTAGE,
486464
.owner = THIS_MODULE,
465+
.enable_time = 200,
487466
},
488467
{
489468
.name = "LDO_K",
@@ -493,6 +472,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
493472
.volt_table = ldo_k_typ_voltages,
494473
.type = REGULATOR_VOLTAGE,
495474
.owner = THIS_MODULE,
475+
.enable_time = 200,
496476
},
497477
{
498478
.name = "LDO_EXT",
@@ -508,6 +488,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
508488
.n_voltages = ARRAY_SIZE(ldo_e_buck_typ_voltages),
509489
.type = REGULATOR_VOLTAGE,
510490
.owner = THIS_MODULE,
491+
.enable_time = 1000,
511492
},
512493
};
513494

0 commit comments

Comments
 (0)