Lines Matching +full:comp +full:- +full:disable

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Split TWL6030 logic from twl-regulator.c:
93 &value, info->base + offset); in twlreg_read()
102 value, info->base + offset); in twlreg_write()
113 * Enable/disable regulators by joining/leaving the P1 (processor) group.
126 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) { in twl6030reg_is_enabled()
152 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) in twl6030reg_enable()
169 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) in twl6030reg_disable()
191 if (info->features & TWL6032_SUBCLASS) in twl6030reg_get_status()
218 if (!(twl_class_is_6030() && (info->features & TWL6032_SUBCLASS))) in twl6030reg_set_mode()
236 return -EINVAL; in twl6030reg_set_mode()
245 return -ENODEV; in twl6030coresmps_set_voltage()
250 return -ENODEV; in twl6030coresmps_get_voltage()
263 if (info->flags & TWL_6030_WARM_RESET) in twl6030ldo_set_voltage_sel()
275 if (info->flags & TWL_6030_WARM_RESET) in twl6030ldo_get_voltage_sel()
288 .disable = twl6030reg_disable,
300 .disable = twl6030reg_disable,
318 switch (info->flags) { in twl6030smps_list_voltage()
343 voltage += (600000 + (12500 * (index - 1))); in twl6030smps_list_voltage()
367 voltage = (1852000 + (38600 * (index - 1))); in twl6030smps_list_voltage()
391 voltage = (2161000 + (38600 * (index - 1))); in twl6030smps_list_voltage()
405 switch (info->flags) { in twl6030smps_map_voltage()
410 vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl6030smps_map_voltage()
427 return -EINVAL; in twl6030smps_map_voltage()
433 vsel = DIV_ROUND_UP(min_uV - 700000, 12500); in twl6030smps_map_voltage()
448 return -EINVAL; in twl6030smps_map_voltage()
454 vsel = DIV_ROUND_UP(min_uV - 1852000, 38600); in twl6030smps_map_voltage()
462 vsel = DIV_ROUND_UP(min_uV - 2161000, 38600); in twl6030smps_map_voltage()
495 .disable = twl6030reg_disable,
503 /*----------------------------------------------------------------------*/
585 /* Turnon-delay and remap configuration values for 6030 are not
634 #define TWL_OF_MATCH(comp, family, label) \ argument
636 .compatible = comp, \
640 #define TWL6030_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6030, label) argument
641 #define TWL6032_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWL6032, label) argument
642 #define TWLFIXED_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLFIXED, label) argument
643 #define TWLSMPS_OF_MATCH(comp, label) TWL_OF_MATCH(comp, TWLSMPS, label) argument
646 TWL6030_OF_MATCH("ti,twl6030-vdd1", VDD1),
647 TWL6030_OF_MATCH("ti,twl6030-vdd2", VDD2),
648 TWL6030_OF_MATCH("ti,twl6030-vdd3", VDD3),
649 TWL6030_OF_MATCH("ti,twl6030-vaux1", VAUX1_6030),
650 TWL6030_OF_MATCH("ti,twl6030-vaux2", VAUX2_6030),
651 TWL6030_OF_MATCH("ti,twl6030-vaux3", VAUX3_6030),
652 TWL6030_OF_MATCH("ti,twl6030-vmmc", VMMC),
653 TWL6030_OF_MATCH("ti,twl6030-vpp", VPP),
654 TWL6030_OF_MATCH("ti,twl6030-vusim", VUSIM),
655 TWL6032_OF_MATCH("ti,twl6032-ldo2", LDO2),
656 TWL6032_OF_MATCH("ti,twl6032-ldo4", LDO4),
657 TWL6032_OF_MATCH("ti,twl6032-ldo3", LDO3),
658 TWL6032_OF_MATCH("ti,twl6032-ldo5", LDO5),
659 TWL6032_OF_MATCH("ti,twl6032-ldo1", LDO1),
660 TWL6032_OF_MATCH("ti,twl6032-ldo7", LDO7),
661 TWL6032_OF_MATCH("ti,twl6032-ldo6", LDO6),
662 TWL6032_OF_MATCH("ti,twl6032-ldoln", LDOLN),
663 TWL6032_OF_MATCH("ti,twl6032-ldousb", LDOUSB),
664 TWLFIXED_OF_MATCH("ti,twl6030-vana", VANA),
665 TWLFIXED_OF_MATCH("ti,twl6030-vcxio", VCXIO),
666 TWLFIXED_OF_MATCH("ti,twl6030-vdac", VDAC),
667 TWLFIXED_OF_MATCH("ti,twl6030-vusb", VUSB),
668 TWLFIXED_OF_MATCH("ti,twl6030-v1v8", V1V8),
669 TWLFIXED_OF_MATCH("ti,twl6030-v2v1", V2V1),
670 TWLSMPS_OF_MATCH("ti,twl6032-smps3", SMPS3),
671 TWLSMPS_OF_MATCH("ti,twl6032-smps4", SMPS4),
672 TWLSMPS_OF_MATCH("ti,twl6032-vio", VIO),
686 struct device_node *np = pdev->dev.of_node; in twlreg_probe()
688 template = of_device_get_match_data(&pdev->dev); in twlreg_probe()
690 return -ENODEV; in twlreg_probe()
692 id = template->desc.id; in twlreg_probe()
693 initdata = of_get_regulator_init_data(&pdev->dev, np, &template->desc); in twlreg_probe()
695 return -EINVAL; in twlreg_probe()
697 info = devm_kmemdup(&pdev->dev, template, sizeof(*info), GFP_KERNEL); in twlreg_probe()
699 return -ENOMEM; in twlreg_probe()
701 /* Constrain board-specific capabilities according to what in twlreg_probe()
704 c = &initdata->constraints; in twlreg_probe()
705 c->valid_modes_mask &= REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY; in twlreg_probe()
706 c->valid_ops_mask &= REGULATOR_CHANGE_VOLTAGE in twlreg_probe()
713 info->flags |= SMPS_EXTENDED_EN; in twlreg_probe()
715 info->flags |= SMPS_OFFSET_EN; in twlreg_probe()
719 info->flags |= SMPS_EXTENDED_EN; in twlreg_probe()
721 info->flags |= SMPS_OFFSET_EN; in twlreg_probe()
725 info->flags |= SMPS_EXTENDED_EN; in twlreg_probe()
727 info->flags |= SMPS_OFFSET_EN; in twlreg_probe()
731 if (of_property_read_bool(np, "ti,retain-on-reset")) in twlreg_probe()
732 info->flags |= TWL_6030_WARM_RESET; in twlreg_probe()
734 config.dev = &pdev->dev; in twlreg_probe()
739 rdev = devm_regulator_register(&pdev->dev, &info->desc, &config); in twlreg_probe()
741 dev_err(&pdev->dev, "can't register %s, %ld\n", in twlreg_probe()
742 info->desc.name, PTR_ERR(rdev)); in twlreg_probe()
747 /* NOTE: many regulators support short-circuit IRQs (presentable in twlreg_probe()
749 * - SC_CONFIG in twlreg_probe()
750 * - SC_DETECT1 (vintana2, vmmc1/2, vaux1/2/3/4) in twlreg_probe()
751 * - SC_DETECT2 (vusb, vdac, vio, vdd1/2, vpll2) in twlreg_probe()
752 * - IT_CONFIG in twlreg_probe()