twl-regulator: Define critical regulators as always_on

Defines VIO, VDD1, VDD2, VPLL1 and VINT* regulators as always_on by default
since they are critical to TWL and its master's functionality and should
be on in all cases where RegFW is used

Signed-off-by: Juha Keski-Saari <ext-juha.1.keski-saari@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by Juha Keski-Saari and committed by Liam Girdwood 205e5cd3 07fc493f

+13
+13
drivers/regulator/twl-regulator.c
··· 533 c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE 534 | REGULATOR_CHANGE_MODE 535 | REGULATOR_CHANGE_STATUS; 536 537 rdev = regulator_register(&info->desc, &pdev->dev, initdata, info); 538 if (IS_ERR(rdev)) {
··· 533 c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE 534 | REGULATOR_CHANGE_MODE 535 | REGULATOR_CHANGE_STATUS; 536 + switch (pdev->id) { 537 + case TWL4030_REG_VIO: 538 + case TWL4030_REG_VDD1: 539 + case TWL4030_REG_VDD2: 540 + case TWL4030_REG_VPLL1: 541 + case TWL4030_REG_VINTANA1: 542 + case TWL4030_REG_VINTANA2: 543 + case TWL4030_REG_VINTDIG: 544 + c->always_on = true; 545 + break; 546 + default: 547 + break; 548 + } 549 550 rdev = regulator_register(&info->desc, &pdev->dev, initdata, info); 551 if (IS_ERR(rdev)) {