• Home
  • Raw
  • Download

Lines Matching refs:ldo

49 	struct wm8994_ldo *ldo = rdev_get_drvdata(rdev);  in wm8994_ldo2_list_voltage()  local
54 switch (ldo->wm8994->type) { in wm8994_ldo2_list_voltage()
129 int id = pdev->id % ARRAY_SIZE(pdata->ldo); in wm8994_ldo_probe()
131 struct wm8994_ldo *ldo; in wm8994_ldo_probe() local
136 ldo = devm_kzalloc(&pdev->dev, sizeof(struct wm8994_ldo), GFP_KERNEL); in wm8994_ldo_probe()
137 if (ldo == NULL) { in wm8994_ldo_probe()
142 ldo->wm8994 = wm8994; in wm8994_ldo_probe()
143 ldo->supply = wm8994_ldo_consumer[id]; in wm8994_ldo_probe()
144 ldo->supply.dev_name = dev_name(wm8994->dev); in wm8994_ldo_probe()
147 config.driver_data = ldo; in wm8994_ldo_probe()
149 config.init_data = &ldo->init_data; in wm8994_ldo_probe()
151 config.ena_gpio = pdata->ldo[id].enable; in wm8994_ldo_probe()
153 config.ena_gpio = wm8994->pdata.ldo[id].enable; in wm8994_ldo_probe()
156 if (!pdata || !pdata->ldo[id].init_data || wm8994->dev->of_node) { in wm8994_ldo_probe()
158 ldo->supply.dev_name, ldo->supply.supply); in wm8994_ldo_probe()
160 ldo->init_data = wm8994_ldo_default[id]; in wm8994_ldo_probe()
161 ldo->init_data.consumer_supplies = &ldo->supply; in wm8994_ldo_probe()
163 ldo->init_data.constraints.valid_ops_mask = 0; in wm8994_ldo_probe()
165 ldo->init_data = *pdata->ldo[id].init_data; in wm8994_ldo_probe()
168 ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &config); in wm8994_ldo_probe()
169 if (IS_ERR(ldo->regulator)) { in wm8994_ldo_probe()
170 ret = PTR_ERR(ldo->regulator); in wm8994_ldo_probe()
176 platform_set_drvdata(pdev, ldo); in wm8994_ldo_probe()
186 struct wm8994_ldo *ldo = platform_get_drvdata(pdev); in wm8994_ldo_remove() local
190 regulator_unregister(ldo->regulator); in wm8994_ldo_remove()