Lines Matching +full:uv +full:- +full:shutdown
1 // SPDX-License-Identifier: GPL-2.0
5 // Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
24 /* TPS6593 and LP8764 supports OV, UV, SC, ILIM */
26 /* TPS65224 supports OV or UV */
45 /* Multi-phase DCDC's */
500 if (irq_data->type->event_name[0] == '\0') { in tps6594_regulator_irq_handler()
502 dev_err(irq_data->dev, in tps6594_regulator_irq_handler()
503 "System was put in shutdown due to timeout during an active or standby transition.\n"); in tps6594_regulator_irq_handler()
507 dev_err(irq_data->dev, "Error IRQ trap %s for %s\n", in tps6594_regulator_irq_handler()
508 irq_data->type->event_name, irq_data->type->regulator_name); in tps6594_regulator_irq_handler()
510 regulator_notifier_call_chain(irq_data->rdev, in tps6594_regulator_irq_handler()
511 irq_data->type->event, NULL); in tps6594_regulator_irq_handler()
524 struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent); in tps6594_request_reg_irqs()
531 irq = platform_get_irq_byname(pdev, irq_type->irq_name); in tps6594_request_reg_irqs()
533 return -EINVAL; in tps6594_request_reg_irqs()
535 irq_data[*irq_idx].dev = tps->dev; in tps6594_request_reg_irqs()
539 error = devm_request_threaded_irq(tps->dev, irq, NULL, in tps6594_request_reg_irqs()
541 irq_type->irq_name, &irq_data[*irq_idx]); in tps6594_request_reg_irqs()
543 dev_err(tps->dev, "tps6594 failed to request %s IRQ %d: %d\n", in tps6594_request_reg_irqs()
544 irq_type->irq_name, irq, error); in tps6594_request_reg_irqs()
554 struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent); in tps6594_regulator_probe()
582 if (tps->chip_id == TPS65224) { in tps6594_regulator_probe()
605 config.dev = tps->dev; in tps6594_regulator_probe()
607 config.regmap = tps->regmap; in tps6594_regulator_probe()
618 np = of_find_node_by_name(tps->dev->of_node, multi_regs[multi].supply_name); in tps6594_regulator_probe()
621 if (of_node_cmp(of_node_full_name(np_pmic_parent), tps->dev->of_node->full_name)) in tps6594_regulator_probe()
656 if (tps->chip_id == TPS65224) { in tps6594_regulator_probe()
662 nr_ldo = (tps->chip_id == LP8764) ? 0 : ARRAY_SIZE(tps6594_ldo_regs); in tps6594_regulator_probe()
668 irq_data = devm_kmalloc_array(tps->dev, reg_irq_nb, in tps6594_regulator_probe()
671 return -ENOMEM; in tps6594_regulator_probe()
677 rdev = devm_regulator_register(&pdev->dev, &multi_regs[i], &config); in tps6594_regulator_probe()
679 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps6594_regulator_probe()
681 pdev->name); in tps6594_regulator_probe()
721 const struct regulator_desc *buck_cfg = (tps->chip_id == TPS65224) ? in tps6594_regulator_probe()
724 rdev = devm_regulator_register(&pdev->dev, &buck_cfg[i], &config); in tps6594_regulator_probe()
726 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps6594_regulator_probe()
727 "failed to register %s regulator\n", pdev->name); in tps6594_regulator_probe()
736 if (tps->chip_id != LP8764) { in tps6594_regulator_probe()
738 rdev = devm_regulator_register(&pdev->dev, &ldo_regs[i], &config); in tps6594_regulator_probe()
740 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps6594_regulator_probe()
742 pdev->name); in tps6594_regulator_probe()
752 if (tps->chip_id == TPS65224) { in tps6594_regulator_probe()
757 if (tps->chip_id == LP8764) in tps6594_regulator_probe()
760 /* TPS6593 supports only VCCA OV and UV */ in tps6594_regulator_probe()
764 irq_ext_reg_data = devm_kmalloc_array(tps->dev, in tps6594_regulator_probe()
769 return -ENOMEM; in tps6594_regulator_probe()
773 irq = platform_get_irq_byname(pdev, irq_type->irq_name); in tps6594_regulator_probe()
775 return -EINVAL; in tps6594_regulator_probe()
777 irq_ext_reg_data[i].dev = tps->dev; in tps6594_regulator_probe()
780 error = devm_request_threaded_irq(tps->dev, irq, NULL, in tps6594_regulator_probe()
783 irq_type->irq_name, in tps6594_regulator_probe()
786 return dev_err_probe(tps->dev, error, in tps6594_regulator_probe()
788 irq_type->irq_name, irq); in tps6594_regulator_probe()
795 .name = "tps6594-regulator",
802 MODULE_ALIAS("platform:tps6594-regulator");