Lines Matching +full:ldo6 +full:- +full:8

1 // SPDX-License-Identifier: GPL-2.0
15 #include <dt-bindings/mfd/st,stpmic1.h>
18 * struct stpmic1_regulator_cfg - this structure is used as driver data
48 STPMIC1_LDO5 = 8,
103 REGULATOR_LINEAR_RANGE(1700000, 8, 24, 100000),
109 REGULATOR_LINEAR_RANGE(1700000, 8, 24, 100000),
115 REGULATOR_LINEAR_RANGE(1700000, 8, 24, 100000),
123 REGULATOR_LINEAR_RANGE(1700000, 8, 30, 100000),
422 .desc = REG_LDO(LDO6, ldo6),
467 regmap_read(regmap, rdev->desc->enable_reg, &value); in stpmic1_get_mode()
488 return -EINVAL; in stpmic1_set_mode()
491 return regmap_update_bits(regmap, rdev->desc->enable_reg, in stpmic1_set_mode()
513 return -EINVAL; in stpmic1_set_icc()
516 return regmap_update_bits(regmap, cfg->icc_reg, cfg->icc_mask, in stpmic1_set_icc()
517 cfg->icc_mask); in stpmic1_set_icc()
548 MATCH(ldo6, LDO6),
559 struct stpmic1 *pmic_dev = dev_get_drvdata(pdev->dev.parent); in stpmic1_regulator_register()
565 config.dev = &pdev->dev; in stpmic1_regulator_register()
566 config.init_data = match->init_data; in stpmic1_regulator_register()
567 config.of_node = match->of_node; in stpmic1_regulator_register()
568 config.regmap = pmic_dev->regmap; in stpmic1_regulator_register()
571 rdev = devm_regulator_register(&pdev->dev, &cfg->desc, &config); in stpmic1_regulator_register()
573 dev_err(&pdev->dev, "failed to register %s regulator\n", in stpmic1_regulator_register()
574 cfg->desc.name); in stpmic1_regulator_register()
579 if (of_property_read_bool(config.of_node, "st,mask-reset") && in stpmic1_regulator_register()
580 cfg->mask_reset_reg != 0) { in stpmic1_regulator_register()
581 ret = regmap_update_bits(pmic_dev->regmap, in stpmic1_regulator_register()
582 cfg->mask_reset_reg, in stpmic1_regulator_register()
583 cfg->mask_reset_mask, in stpmic1_regulator_register()
584 cfg->mask_reset_mask); in stpmic1_regulator_register()
586 dev_err(&pdev->dev, "set mask reset failed\n"); in stpmic1_regulator_register()
591 /* setup an irq handler for over-current detection */ in stpmic1_regulator_register()
594 ret = devm_request_threaded_irq(&pdev->dev, in stpmic1_regulator_register()
598 pdev->name, rdev); in stpmic1_regulator_register()
600 dev_err(&pdev->dev, "Request IRQ failed\n"); in stpmic1_regulator_register()
611 ret = of_regulator_match(&pdev->dev, pdev->dev.of_node, stpmic1_matches, in stpmic1_regulator_probe()
614 dev_err(&pdev->dev, in stpmic1_regulator_probe()
626 dev_dbg(&pdev->dev, "stpmic1_regulator driver probed\n"); in stpmic1_regulator_probe()
632 { .compatible = "st,stpmic1-regulators" },
640 .name = "stpmic1-regulator",