Lines Matching refs:ldo
44 struct wm8994_ldo *ldo = rdev_get_drvdata(rdev);
49 switch (ldo->wm8994->type) {
153 int id = pdev->id % ARRAY_SIZE(pdata->ldo);
155 struct wm8994_ldo *ldo;
161 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm8994_ldo), GFP_KERNEL);
162 if (!ldo)
165 ldo->wm8994 = wm8994;
166 ldo->supply = wm8994_ldo_consumer[id];
167 ldo->supply.dev_name = dev_name(wm8994->dev);
170 config.driver_data = ldo;
172 config.init_data = &ldo->init_data;
187 if (!pdata || !pdata->ldo[id].init_data || wm8994->dev->of_node) {
189 ldo->supply.dev_name, ldo->supply.supply);
191 ldo->init_data = wm8994_ldo_default[id];
192 ldo->init_data.consumer_supplies = &ldo->supply;
194 ldo->init_data.constraints.valid_ops_mask = 0;
196 ldo->init_data = *pdata->ldo[id].init_data;
204 if (ldo->wm8994->type == WM8994) {
205 ldo->regulator = devm_regulator_register(&pdev->dev,
209 ldo->regulator = devm_regulator_register(&pdev->dev,
214 if (IS_ERR(ldo->regulator)) {
215 ret = PTR_ERR(ldo->regulator);
221 platform_set_drvdata(pdev, ldo);
229 .name = "wm8994-ldo",
239 MODULE_ALIAS("platform:wm8994-ldo");