Lines Matching refs:pmic
295 struct mt6397_chip *pmic; in mt6397_probe() local
298 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in mt6397_probe()
299 if (!pmic) in mt6397_probe()
302 pmic->dev = &pdev->dev; in mt6397_probe()
308 pmic->regmap = dev_get_regmap(pdev->dev.parent, NULL); in mt6397_probe()
309 if (!pmic->regmap) in mt6397_probe()
316 ret = regmap_read(pmic->regmap, pmic_core->cid_addr, &id); in mt6397_probe()
322 pmic->chip_id = (id >> pmic_core->cid_shift) & 0xff; in mt6397_probe()
324 platform_set_drvdata(pdev, pmic); in mt6397_probe()
326 pmic->irq = platform_get_irq(pdev, 0); in mt6397_probe()
327 if (pmic->irq <= 0) in mt6397_probe()
328 return pmic->irq; in mt6397_probe()
330 ret = pmic_core->irq_init(pmic); in mt6397_probe()
336 NULL, 0, pmic->irq_domain); in mt6397_probe()
338 irq_domain_remove(pmic->irq_domain); in mt6397_probe()