Lines Matching +full:short +full:- +full:circuit

1 // SPDX-License-Identifier: GPL-2.0
5 // Copyright (C) 2022 BayLibre Incorporated - https://www.baylibre.com/
6 // Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
9 // "J Keerthy <j-keerthy@ti.com>"
38 { "LDO3_SCG", "LDO3", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
41 { "LDO4_SCG", "LDO4", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
54 { "LDO1_SCG", "LDO1", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
57 { "LDO2_SCG", "LDO2", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
60 { "BUCK3_SCG", "BUCK3", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
64 { "BUCK1_SCG", "BUCK1", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
68 { "BUCK2_SCG", "BUCK2", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
169 return regmap_set_bits(tps->regmap, TPS65219_REG_STBY_1_CONFIG, in tps65219_set_mode()
170 dev->desc->enable_mask); in tps65219_set_mode()
173 return regmap_clear_bits(tps->regmap, in tps65219_set_mode()
175 dev->desc->enable_mask); in tps65219_set_mode()
177 return -EINVAL; in tps65219_set_mode()
187 ret = regmap_read(tps->regmap, TPS65219_REG_STBY_1_CONFIG, &value); in tps65219_get_mode()
189 dev_dbg(tps->dev, "%s failed for regulator %s: %d ", in tps65219_get_mode()
190 __func__, dev->desc->name, ret); in tps65219_get_mode()
288 * configurable as load switch and bypass-mode.
342 if (irq_data->type->event_name[0] == '\0') { in tps65219_regulator_irq_handler()
344 dev_err(irq_data->dev, in tps65219_regulator_irq_handler()
349 regulator_notifier_call_chain(irq_data->rdev, in tps65219_regulator_irq_handler()
350 irq_data->type->event, NULL); in tps65219_regulator_irq_handler()
352 dev_err(irq_data->dev, "Error IRQ trap %s for %s\n", in tps65219_regulator_irq_handler()
353 irq_data->type->event_name, irq_data->type->regulator_name); in tps65219_regulator_irq_handler()
411 struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent); in tps65219_regulator_probe()
413 enum pmic_id chip = platform_get_device_id(pdev)->driver_data; in tps65219_regulator_probe()
417 config.dev = tps->dev; in tps65219_regulator_probe()
419 config.regmap = tps->regmap; in tps65219_regulator_probe()
421 for (i = 0; i < pmic->common_rdesc_size; i++) { in tps65219_regulator_probe()
422 rdev = devm_regulator_register(&pdev->dev, &pmic->common_rdesc[i], in tps65219_regulator_probe()
425 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps65219_regulator_probe()
427 pmic->common_rdesc[i].name); in tps65219_regulator_probe()
430 for (i = 0; i < pmic->rdesc_size; i++) { in tps65219_regulator_probe()
431 rdev = devm_regulator_register(&pdev->dev, &pmic->rdesc[i], in tps65219_regulator_probe()
434 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps65219_regulator_probe()
436 pmic->rdesc[i].name); in tps65219_regulator_probe()
439 for (i = 0; i < pmic->common_irq_size; ++i) { in tps65219_regulator_probe()
440 irq_type = &pmic->common_irq_types[i]; in tps65219_regulator_probe()
441 irq = platform_get_irq_byname(pdev, irq_type->irq_name); in tps65219_regulator_probe()
443 return -EINVAL; in tps65219_regulator_probe()
445 irq_data = devm_kmalloc(tps->dev, sizeof(*irq_data), GFP_KERNEL); in tps65219_regulator_probe()
447 return -ENOMEM; in tps65219_regulator_probe()
449 irq_data->dev = tps->dev; in tps65219_regulator_probe()
450 irq_data->type = irq_type; in tps65219_regulator_probe()
451 error = devm_request_threaded_irq(tps->dev, irq, NULL, in tps65219_regulator_probe()
454 irq_type->irq_name, in tps65219_regulator_probe()
457 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps65219_regulator_probe()
459 irq_type->irq_name, irq, error); in tps65219_regulator_probe()
462 for (i = 0; i < pmic->dev_irq_size; ++i) { in tps65219_regulator_probe()
463 irq_type = &pmic->irq_types[i]; in tps65219_regulator_probe()
464 irq = platform_get_irq_byname(pdev, irq_type->irq_name); in tps65219_regulator_probe()
466 return -EINVAL; in tps65219_regulator_probe()
468 irq_data = devm_kmalloc(tps->dev, sizeof(*irq_data), GFP_KERNEL); in tps65219_regulator_probe()
470 return -ENOMEM; in tps65219_regulator_probe()
472 irq_data->dev = tps->dev; in tps65219_regulator_probe()
473 irq_data->type = irq_type; in tps65219_regulator_probe()
474 error = devm_request_threaded_irq(tps->dev, irq, NULL, in tps65219_regulator_probe()
477 irq_type->irq_name, in tps65219_regulator_probe()
480 return dev_err_probe(tps->dev, PTR_ERR(rdev), in tps65219_regulator_probe()
482 irq_type->irq_name, irq, error); in tps65219_regulator_probe()
489 { "tps65214-regulator", TPS65214 },
490 { "tps65215-regulator", TPS65215 },
491 { "tps65219-regulator", TPS65219 },
498 .name = "tps65219-regulator",
507 MODULE_AUTHOR("Jerome Neanne <j-neanne@baylibre.com>");