Lines Matching +full:short +full:- +full:circuit
1 // SPDX-License-Identifier: GPL-2.0
3 // tps65219-regulator.c
7 // Copyright (C) 2022 BayLibre Incorporated - https://www.baylibre.com/
10 // "J Keerthy <j-keerthy@ti.com>"
34 { "LDO3_SCG", "LDO3", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
37 { "LDO4_SCG", "LDO4", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
40 { "LDO1_SCG", "LDO1", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
43 { "LDO2_SCG", "LDO2", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
46 { "BUCK3_SCG", "BUCK3", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
50 { "BUCK1_SCG", "BUCK1", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
54 { "BUCK2_SCG", "BUCK2", "short circuit to ground", REGULATOR_EVENT_REGULATION_OUT },
145 return regmap_set_bits(tps->regmap, TPS65219_REG_STBY_1_CONFIG, in tps65219_set_mode()
146 dev->desc->enable_mask); in tps65219_set_mode()
149 return regmap_clear_bits(tps->regmap, in tps65219_set_mode()
151 dev->desc->enable_mask); in tps65219_set_mode()
153 return -EINVAL; in tps65219_set_mode()
163 ret = regmap_read(tps->regmap, TPS65219_REG_STBY_1_CONFIG, &value); in tps65219_get_mode()
165 dev_dbg(tps->dev, "%s failed for regulator %s: %d ", in tps65219_get_mode()
166 __func__, dev->desc->name, ret); in tps65219_get_mode()
275 if (irq_data->type->event_name[0] == '\0') { in tps65219_regulator_irq_handler()
277 dev_err(irq_data->dev, in tps65219_regulator_irq_handler()
282 regulator_notifier_call_chain(irq_data->rdev, in tps65219_regulator_irq_handler()
283 irq_data->type->event, NULL); in tps65219_regulator_irq_handler()
285 dev_err(irq_data->dev, "Error IRQ trap %s for %s\n", in tps65219_regulator_irq_handler()
286 irq_data->type->event_name, irq_data->type->regulator_name); in tps65219_regulator_irq_handler()
302 return -EINVAL; in tps65219_get_rdev_by_name()
307 struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent); in tps65219_regulator_probe()
317 config.dev = tps->dev; in tps65219_regulator_probe()
319 config.regmap = tps->regmap; in tps65219_regulator_probe()
322 dev_dbg(tps->dev, "%s regul i= %d START", __func__, i); in tps65219_regulator_probe()
323 rdev = devm_regulator_register(&pdev->dev, ®ulators[i], in tps65219_regulator_probe()
326 dev_err(tps->dev, "failed to register %s regulator\n", in tps65219_regulator_probe()
331 dev_dbg(tps->dev, "%s regul i= %d COMPLETED", __func__, i); in tps65219_regulator_probe()
334 irq_data = devm_kmalloc(tps->dev, in tps65219_regulator_probe()
339 return -ENOMEM; in tps65219_regulator_probe()
344 irq = platform_get_irq_byname(pdev, irq_type->irq_name); in tps65219_regulator_probe()
346 return -EINVAL; in tps65219_regulator_probe()
348 irq_data[i].dev = tps->dev; in tps65219_regulator_probe()
351 tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, &rdev); in tps65219_regulator_probe()
353 dev_err(tps->dev, "Failed to get rdev for %s\n", in tps65219_regulator_probe()
354 irq_type->regulator_name); in tps65219_regulator_probe()
355 return -EINVAL; in tps65219_regulator_probe()
359 error = devm_request_threaded_irq(tps->dev, irq, NULL, in tps65219_regulator_probe()
362 irq_type->irq_name, in tps65219_regulator_probe()
365 dev_err(tps->dev, "failed to request %s IRQ %d: %d\n", in tps65219_regulator_probe()
366 irq_type->irq_name, irq, error); in tps65219_regulator_probe()
375 { "tps65219-regulator", },
382 .name = "tps65219-pmic",
391 MODULE_AUTHOR("Jerome Neanne <j-neanne@baylibre.com>");
393 MODULE_ALIAS("platform:tps65219-pmic");