Lines Matching +full:mt6323 +full:- +full:regulator
1 // SPDX-License-Identifier: GPL-2.0-only
15 #include <linux/mfd/mt6323/core.h>
22 #include <linux/mfd/mt6323/registers.h>
122 .name = "mt6323-rtc",
125 .of_compatible = "mediatek,mt6323-rtc",
127 .name = "mt6323-regulator",
128 .of_compatible = "mediatek,mt6323-regulator"
130 .name = "mt6323-led",
131 .of_compatible = "mediatek,mt6323-led"
133 .name = "mtk-pmic-keys",
136 .of_compatible = "mediatek,mt6323-keys"
138 .name = "mt6323-pwrc",
141 .of_compatible = "mediatek,mt6323-pwrc"
147 .name = "mt6328-regulator",
148 .of_compatible = "mediatek,mt6328-regulator"
150 .name = "mtk-pmic-keys",
153 .of_compatible = "mediatek,mt6328-keys"
159 .name = "mt6359-auxadc",
160 .of_compatible = "mediatek,mt6357-auxadc"
162 .name = "mt6357-regulator",
164 .name = "mt6357-rtc",
167 .of_compatible = "mediatek,mt6357-rtc",
169 .name = "mt6357-sound",
170 .of_compatible = "mediatek,mt6357-sound"
172 .name = "mtk-pmic-keys",
175 .of_compatible = "mediatek,mt6357-keys"
182 .name = "mt6331-rtc",
185 .of_compatible = "mediatek,mt6331-rtc",
187 .name = "mt6331-regulator",
188 .of_compatible = "mediatek,mt6331-regulator"
190 .name = "mt6332-regulator",
191 .of_compatible = "mediatek,mt6332-regulator"
193 .name = "mtk-pmic-keys",
196 .of_compatible = "mediatek,mt6331-keys"
202 .name = "mt6359-auxadc",
203 .of_compatible = "mediatek,mt6358-auxadc"
205 .name = "mt6358-regulator",
206 .of_compatible = "mediatek,mt6358-regulator"
208 .name = "mt6358-rtc",
211 .of_compatible = "mediatek,mt6358-rtc",
213 .name = "mt6358-sound",
214 .of_compatible = "mediatek,mt6358-sound"
216 .name = "mt6358-keys",
219 .of_compatible = "mediatek,mt6358-keys"
225 .name = "mt6359-auxadc",
226 .of_compatible = "mediatek,mt6359-auxadc"
228 { .name = "mt6359-regulator", },
230 .name = "mt6359-rtc",
233 .of_compatible = "mediatek,mt6358-rtc",
235 { .name = "mt6359-sound", },
237 .name = "mtk-pmic-keys",
240 .of_compatible = "mediatek,mt6359-keys"
246 .name = "mt6397-rtc",
249 .of_compatible = "mediatek,mt6397-rtc",
251 .name = "mt6397-regulator",
252 .of_compatible = "mediatek,mt6397-regulator",
254 .name = "mt6397-codec",
255 .of_compatible = "mediatek,mt6397-codec",
257 .name = "mt6397-clk",
258 .of_compatible = "mediatek,mt6397-clk",
260 .name = "mt6397-pinctrl",
261 .of_compatible = "mediatek,mt6397-pinctrl",
263 .name = "mtk-pmic-keys",
266 .of_compatible = "mediatek,mt6397-keys"
341 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in mt6397_probe()
343 return -ENOMEM; in mt6397_probe()
345 pmic->dev = &pdev->dev; in mt6397_probe()
351 pmic->regmap = dev_get_regmap(pdev->dev.parent, NULL); in mt6397_probe()
352 if (!pmic->regmap) in mt6397_probe()
353 return -ENODEV; in mt6397_probe()
355 pmic_core = of_device_get_match_data(&pdev->dev); in mt6397_probe()
357 return -ENODEV; in mt6397_probe()
359 ret = regmap_read(pmic->regmap, pmic_core->cid_addr, &id); in mt6397_probe()
361 dev_err(&pdev->dev, "Failed to read chip id: %d\n", ret); in mt6397_probe()
365 pmic->chip_id = (id >> pmic_core->cid_shift) & 0xff; in mt6397_probe()
369 pmic->irq = platform_get_irq(pdev, 0); in mt6397_probe()
370 if (pmic->irq <= 0) in mt6397_probe()
371 return pmic->irq; in mt6397_probe()
373 ret = pmic_core->irq_init(pmic); in mt6397_probe()
377 ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, in mt6397_probe()
378 pmic_core->cells, pmic_core->cell_size, in mt6397_probe()
379 NULL, 0, pmic->irq_domain); in mt6397_probe()
381 irq_domain_remove(pmic->irq_domain); in mt6397_probe()
382 dev_err(&pdev->dev, "failed to add child devices: %d\n", ret); in mt6397_probe()
390 .compatible = "mediatek,mt6323",