Lines Matching +full:pmic +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-only
73 .name = "mt6323-rtc",
76 .of_compatible = "mediatek,mt6323-rtc",
78 .name = "mt6323-regulator",
79 .of_compatible = "mediatek,mt6323-regulator"
81 .name = "mt6323-led",
82 .of_compatible = "mediatek,mt6323-led"
84 .name = "mtk-pmic-keys",
87 .of_compatible = "mediatek,mt6323-keys"
89 .name = "mt6323-pwrc",
92 .of_compatible = "mediatek,mt6323-pwrc"
98 .name = "mt6358-regulator",
99 .of_compatible = "mediatek,mt6358-regulator"
101 .name = "mt6358-rtc",
104 .of_compatible = "mediatek,mt6358-rtc",
106 .name = "mt6358-sound",
107 .of_compatible = "mediatek,mt6358-sound"
109 .name = "mt6358-keys",
112 .of_compatible = "mediatek,mt6358-keys"
117 { .name = "mt6359-regulator", },
119 .name = "mt6359-rtc",
122 .of_compatible = "mediatek,mt6358-rtc",
124 { .name = "mt6359-sound", },
129 .name = "mt6397-rtc",
132 .of_compatible = "mediatek,mt6397-rtc",
134 .name = "mt6397-regulator",
135 .of_compatible = "mediatek,mt6397-regulator",
137 .name = "mt6397-codec",
138 .of_compatible = "mediatek,mt6397-codec",
140 .name = "mt6397-clk",
141 .of_compatible = "mediatek,mt6397-clk",
143 .name = "mt6397-pinctrl",
144 .of_compatible = "mediatek,mt6397-pinctrl",
146 .name = "mtk-pmic-keys",
149 .of_compatible = "mediatek,mt6397-keys"
196 unsigned int id = 0; in mt6397_probe() local
197 struct mt6397_chip *pmic; in mt6397_probe() local
200 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in mt6397_probe()
201 if (!pmic) in mt6397_probe()
202 return -ENOMEM; in mt6397_probe()
204 pmic->dev = &pdev->dev; in mt6397_probe()
207 * mt6397 MFD is child device of soc pmic wrapper. in mt6397_probe()
210 pmic->regmap = dev_get_regmap(pdev->dev.parent, NULL); in mt6397_probe()
211 if (!pmic->regmap) in mt6397_probe()
212 return -ENODEV; in mt6397_probe()
214 pmic_core = of_device_get_match_data(&pdev->dev); in mt6397_probe()
216 return -ENODEV; in mt6397_probe()
218 ret = regmap_read(pmic->regmap, pmic_core->cid_addr, &id); in mt6397_probe()
220 dev_err(&pdev->dev, "Failed to read chip id: %d\n", ret); in mt6397_probe()
224 pmic->chip_id = (id >> pmic_core->cid_shift) & 0xff; in mt6397_probe()
226 platform_set_drvdata(pdev, pmic); in mt6397_probe()
228 pmic->irq = platform_get_irq(pdev, 0); in mt6397_probe()
229 if (pmic->irq <= 0) in mt6397_probe()
230 return pmic->irq; in mt6397_probe()
232 ret = pmic_core->irq_init(pmic); in mt6397_probe()
236 ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, in mt6397_probe()
237 pmic_core->cells, pmic_core->cell_size, in mt6397_probe()
238 NULL, 0, pmic->irq_domain); in mt6397_probe()
240 irq_domain_remove(pmic->irq_domain); in mt6397_probe()
241 dev_err(&pdev->dev, "failed to add child devices: %d\n", ret); in mt6397_probe()
284 MODULE_DESCRIPTION("Driver for MediaTek MT6397 PMIC");