Lines Matching +full:regulator +full:- +full:external
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Regulator driver for STw4810/STw4811 VMMC regulator.
5 * Copyright (C) 2013 ST-Ericsson SA
6 * Written on behalf of Linaro for ST-Ericsson
16 #include <linux/regulator/driver.h>
17 #include <linux/regulator/of_regulator.h>
57 struct stw481x *stw481x = dev_get_platdata(&pdev->dev); in stw481x_vmmc_regulator_probe()
62 /* First disable the external VMMC if it's active */ in stw481x_vmmc_regulator_probe()
63 ret = regmap_update_bits(stw481x->map, STW_CONF2, in stw481x_vmmc_regulator_probe()
66 dev_err(&pdev->dev, "could not disable external VMMC\n"); in stw481x_vmmc_regulator_probe()
70 /* Register VMMC regulator */ in stw481x_vmmc_regulator_probe()
71 config.dev = &pdev->dev; in stw481x_vmmc_regulator_probe()
73 config.regmap = stw481x->map; in stw481x_vmmc_regulator_probe()
74 config.of_node = pdev->dev.of_node; in stw481x_vmmc_regulator_probe()
75 config.init_data = of_get_regulator_init_data(&pdev->dev, in stw481x_vmmc_regulator_probe()
76 pdev->dev.of_node, in stw481x_vmmc_regulator_probe()
79 rdev = devm_regulator_register(&pdev->dev, &vmmc_regulator, &config); in stw481x_vmmc_regulator_probe()
81 dev_err(&pdev->dev, in stw481x_vmmc_regulator_probe()
82 "error initializing STw481x VMMC regulator\n"); in stw481x_vmmc_regulator_probe()
86 dev_info(&pdev->dev, "initialized STw481x VMMC regulator\n"); in stw481x_vmmc_regulator_probe()
91 { .compatible = "st,stw481x-vmmc", },
97 .name = "stw481x-vmmc-regulator",