14 #include <linux/module.h>
17 #include <linux/bitops.h>
22 #include <linux/slab.h>
33 #define WM8994_LDO1_MAX_SELECTOR 0x7
34 #define WM8994_LDO2_MAX_SELECTOR 0x3
51 switch (ldo->
wm8994->type) {
53 return (selector * 100000) + 900000;
55 return (selector * 100000) + 1000000;
61 return (selector * 100000) + 950000;
70 .list_voltage = wm8994_ldo2_list_voltage,
83 .ops = &wm8994_ldo1_ops,
96 .ops = &wm8994_ldo2_ops,
111 dev_dbg(&pdev->
dev,
"Probing LDO%d\n",
id + 1);
115 dev_err(&pdev->
dev,
"Unable to allocate private data\n");
132 dev_err(wm8994->
dev,
"Failed to register LDO%d: %d\n",
137 platform_set_drvdata(pdev, ldo);
147 struct wm8994_ldo *ldo = platform_get_drvdata(pdev);
149 platform_set_drvdata(pdev,
NULL);
157 .probe = wm8994_ldo_probe,
160 .name =
"wm8994-ldo",
165 static int __init wm8994_ldo_init(
void)
171 pr_err(
"Failed to register Wm8994 GP LDO driver: %d\n", ret);
177 static void __exit wm8994_ldo_exit(
void)