Lines Matching +full:mt6397 +full:- +full:regulator
1 // SPDX-License-Identifier: GPL-2.0-only
20 #include <linux/mfd/mt6397/core.h>
26 #include <linux/mfd/mt6397/registers.h>
113 .name = "mt6323-rtc",
116 .of_compatible = "mediatek,mt6323-rtc",
118 .name = "mt6323-regulator",
119 .of_compatible = "mediatek,mt6323-regulator"
121 .name = "mt6323-led",
122 .of_compatible = "mediatek,mt6323-led"
124 .name = "mtk-pmic-keys",
127 .of_compatible = "mediatek,mt6323-keys"
129 .name = "mt6323-pwrc",
132 .of_compatible = "mediatek,mt6323-pwrc"
138 .name = "mt6359-auxadc",
139 .of_compatible = "mediatek,mt6357-auxadc"
141 .name = "mt6357-regulator",
143 .name = "mt6357-rtc",
146 .of_compatible = "mediatek,mt6357-rtc",
148 .name = "mt6357-sound",
149 .of_compatible = "mediatek,mt6357-sound"
151 .name = "mtk-pmic-keys",
154 .of_compatible = "mediatek,mt6357-keys"
161 .name = "mt6331-rtc",
164 .of_compatible = "mediatek,mt6331-rtc",
166 .name = "mt6331-regulator",
167 .of_compatible = "mediatek,mt6331-regulator"
169 .name = "mt6332-regulator",
170 .of_compatible = "mediatek,mt6332-regulator"
172 .name = "mtk-pmic-keys",
175 .of_compatible = "mediatek,mt6331-keys"
181 .name = "mt6359-auxadc",
182 .of_compatible = "mediatek,mt6358-auxadc"
184 .name = "mt6358-regulator",
185 .of_compatible = "mediatek,mt6358-regulator"
187 .name = "mt6358-rtc",
190 .of_compatible = "mediatek,mt6358-rtc",
192 .name = "mt6358-sound",
193 .of_compatible = "mediatek,mt6358-sound"
195 .name = "mt6358-keys",
198 .of_compatible = "mediatek,mt6358-keys"
204 .name = "mt6359-auxadc",
205 .of_compatible = "mediatek,mt6359-auxadc"
207 { .name = "mt6359-regulator", },
209 .name = "mt6359-rtc",
212 .of_compatible = "mediatek,mt6358-rtc",
214 { .name = "mt6359-sound", },
216 .name = "mtk-pmic-keys",
219 .of_compatible = "mediatek,mt6359-keys"
225 .name = "mt6397-rtc",
228 .of_compatible = "mediatek,mt6397-rtc",
230 .name = "mt6397-regulator",
231 .of_compatible = "mediatek,mt6397-regulator",
233 .name = "mt6397-codec",
234 .of_compatible = "mediatek,mt6397-codec",
236 .name = "mt6397-clk",
237 .of_compatible = "mediatek,mt6397-clk",
239 .name = "mt6397-pinctrl",
240 .of_compatible = "mediatek,mt6397-pinctrl",
242 .name = "mtk-pmic-keys",
245 .of_compatible = "mediatek,mt6397-keys"
312 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in mt6397_probe()
314 return -ENOMEM; in mt6397_probe()
316 pmic->dev = &pdev->dev; in mt6397_probe()
319 * mt6397 MFD is child device of soc pmic wrapper. in mt6397_probe()
322 pmic->regmap = dev_get_regmap(pdev->dev.parent, NULL); in mt6397_probe()
323 if (!pmic->regmap) in mt6397_probe()
324 return -ENODEV; in mt6397_probe()
326 pmic_core = of_device_get_match_data(&pdev->dev); in mt6397_probe()
328 return -ENODEV; in mt6397_probe()
330 ret = regmap_read(pmic->regmap, pmic_core->cid_addr, &id); in mt6397_probe()
332 dev_err(&pdev->dev, "Failed to read chip id: %d\n", ret); in mt6397_probe()
336 pmic->chip_id = (id >> pmic_core->cid_shift) & 0xff; in mt6397_probe()
340 pmic->irq = platform_get_irq(pdev, 0); in mt6397_probe()
341 if (pmic->irq <= 0) in mt6397_probe()
342 return pmic->irq; in mt6397_probe()
344 ret = pmic_core->irq_init(pmic); in mt6397_probe()
348 ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, in mt6397_probe()
349 pmic_core->cells, pmic_core->cell_size, in mt6397_probe()
350 NULL, 0, pmic->irq_domain); in mt6397_probe()
352 irq_domain_remove(pmic->irq_domain); in mt6397_probe()
353 dev_err(&pdev->dev, "failed to add child devices: %d\n", ret); in mt6397_probe()
376 .compatible = "mediatek,mt6397",
385 { "mt6397", 0 },
393 .name = "mt6397",
402 MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC");