Lines Matching +full:comp +full:- +full:disable
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Split TWL6030 logic from twl-regulator.c:
94 &value, info->base + offset); in twlreg_read()
103 value, info->base + offset); in twlreg_write()
114 * Enable/disable regulators by joining/leaving the P1 (processor) group.
127 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) { in twl6030reg_is_enabled()
153 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) in twl6030reg_enable()
170 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) in twl6030reg_disable()
192 if (info->features & TWL6032_SUBCLASS) in twl6030reg_get_status()
219 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) in twl6030reg_set_mode()
237 return -EINVAL; in twl6030reg_set_mode()
246 return -ENODEV; in twl6030coresmps_set_voltage()
251 return -ENODEV; in twl6030coresmps_get_voltage()
264 if (info->flags & TWL_6030_WARM_RESET) in twl6030ldo_set_voltage_sel()
276 if (info->flags & TWL_6030_WARM_RESET) in twl6030ldo_get_voltage_sel()
289 .disable = twl6030reg_disable,
301 .disable = twl6030reg_disable,
319 switch (info->flags) { in twl6030smps_list_voltage()
344 voltage += (600000 + (12500 * (index - 1))); in twl6030smps_list_voltage()
368 voltage = (1852000 + (38600 * (index - 1))); in twl6030smps_list_voltage()
392 voltage = (2161000 + (38600 * (index - 1))); in twl6030smps_list_voltage()
406 switch (info->flags) { in twl6030smps_map_voltage()
411 vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl6030smps_map_voltage()
428 return -EINVAL; in twl6030smps_map_voltage()
434 vsel = DIV_ROUND_UP(min_uV - 700000, 12500); in twl6030smps_map_voltage()
449 return -EINVAL; in twl6030smps_map_voltage()
455 vsel = DIV_ROUND_UP(min_uV - 1852000, 38600); in twl6030smps_map_voltage()
463 vsel = DIV_ROUND_UP(min_uV - 2161000, 38600); in twl6030smps_map_voltage()
496 .disable = twl6030reg_disable,
504 /*----------------------------------------------------------------------*/
586 /* Turnon-delay and remap configuration values for 6030 are not
635 #define TWL_OF_MATCH(comp, family, label) \ argument
637 .compatible = comp, \
641 #define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label) argument
642 #define TWL6032_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6032, label) argument
643 #define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) argument
644 #define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) argument
647 TWL6030_OF_MATCH("ti,twl6030-vdd1", VDD1),
648 TWL6030_OF_MATCH("ti,twl6030-vdd2", VDD2),
649 TWL6030_OF_MATCH("ti,twl6030-vdd3", VDD3),
650 TWL6030_OF_MATCH("ti,twl6030-vaux1", VAUX1_6030),
651 TWL6030_OF_MATCH("ti,twl6030-vaux2", VAUX2_6030),
652 TWL6030_OF_MATCH("ti,twl6030-vaux3", VAUX3_6030),
653 TWL6030_OF_MATCH("ti,twl6030-vmmc", VMMC),
654 TWL6030_OF_MATCH("ti,twl6030-vpp", VPP),
655 TWL6030_OF_MATCH("ti,twl6030-vusim", VUSIM),
656 TWL6032_OF_MATCH("ti,twl6032-ldo2", LDO2),
657 TWL6032_OF_MATCH("ti,twl6032-ldo4", LDO4),
658 TWL6032_OF_MATCH("ti,twl6032-ldo3", LDO3),
659 TWL6032_OF_MATCH("ti,twl6032-ldo5", LDO5),
660 TWL6032_OF_MATCH("ti,twl6032-ldo1", LDO1),
661 TWL6032_OF_MATCH("ti,twl6032-ldo7", LDO7),
662 TWL6032_OF_MATCH("ti,twl6032-ldo6", LDO6),
663 TWL6032_OF_MATCH("ti,twl6032-ldoln", LDOLN),
664 TWL6032_OF_MATCH("ti,twl6032-ldousb", LDOUSB),
665 TWLFIXED_OF_MATCH("ti,twl6030-vana", VANA),
666 TWLFIXED_OF_MATCH("ti,twl6030-vcxio", VCXIO),
667 TWLFIXED_OF_MATCH("ti,twl6030-vdac", VDAC),
668 TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB),
669 TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8),
670 TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1),
671 TWLSMPS_OF_MATCH("ti,twl6032-smps3", SMPS3),
672 TWLSMPS_OF_MATCH("ti,twl6032-smps4", SMPS4),
673 TWLSMPS_OF_MATCH("ti,twl6032-vio", VIO),
687 struct device_node *np = pdev->dev.of_node; in twlreg_probe()
689 template = of_device_get_match_data(&pdev->dev); in twlreg_probe()
691 return -ENODEV; in twlreg_probe()
693 id = template->desc.id; in twlreg_probe()
694 initdata = of_get_regulator_init_data(&pdev->dev, np, &template->desc); in twlreg_probe()
696 return -EINVAL; in twlreg_probe()
698 info = devm_kmemdup(&pdev->dev, template, sizeof(*info), GFP_KERNEL); in twlreg_probe()
700 return -ENOMEM; in twlreg_probe()
702 /* Constrain board-specific capabilities according to what in twlreg_probe()
705 c = &initdata->constraints; in twlreg_probe()
706 c->valid_modes_mask &= REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY; in twlreg_probe()
707 c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE in twlreg_probe()
714 info->flags |= SMPS_EXTENDED_EN; in twlreg_probe()
716 info->flags |= SMPS_OFFSET_EN; in twlreg_probe()
720 info->flags |= SMPS_EXTENDED_EN; in twlreg_probe()
722 info->flags |= SMPS_OFFSET_EN; in twlreg_probe()
726 info->flags |= SMPS_EXTENDED_EN; in twlreg_probe()
728 info->flags |= SMPS_OFFSET_EN; in twlreg_probe()
732 if (of_get_property(np, "ti,retain-on-reset", NULL)) in twlreg_probe()
733 info->flags |= TWL_6030_WARM_RESET; in twlreg_probe()
735 config.dev = &pdev->dev; in twlreg_probe()
740 rdev = devm_regulator_register(&pdev->dev, &info->desc, &config); in twlreg_probe()
742 dev_err(&pdev->dev, "can't register %s, %ld\n", in twlreg_probe()
743 info->desc.name, PTR_ERR(rdev)); in twlreg_probe()
748 /* NOTE: many regulators support short-circuit IRQs (presentable in twlreg_probe()
750 * - SC_CONFIG in twlreg_probe()
751 * - SC_DETECT1 (vintana2, vmmc1/2, vaux1/2/3/4) in twlreg_probe()
752 * - SC_DETECT2 (vusb, vdac, vio, vdd1/2, vpll2) in twlreg_probe()
753 * - IT_CONFIG in twlreg_probe()