Lines Matching refs:pmic
171 struct intel_soc_pmic *pmic; in crystal_cove_i2c_probe() local
179 pmic = devm_kzalloc(dev, sizeof(*pmic), GFP_KERNEL); in crystal_cove_i2c_probe()
180 if (!pmic) in crystal_cove_i2c_probe()
183 i2c_set_clientdata(i2c, pmic); in crystal_cove_i2c_probe()
185 pmic->regmap = devm_regmap_init_i2c(i2c, config->regmap_config); in crystal_cove_i2c_probe()
186 if (IS_ERR(pmic->regmap)) in crystal_cove_i2c_probe()
187 return PTR_ERR(pmic->regmap); in crystal_cove_i2c_probe()
189 pmic->irq = i2c->irq; in crystal_cove_i2c_probe()
191 ret = devm_regmap_add_irq_chip(dev, pmic->regmap, pmic->irq, in crystal_cove_i2c_probe()
193 0, config->irq_chip, &pmic->irq_chip_data); in crystal_cove_i2c_probe()
197 ret = enable_irq_wake(pmic->irq); in crystal_cove_i2c_probe()
205 irq_domain_update_bus_token(regmap_irq_get_domain(pmic->irq_chip_data), in crystal_cove_i2c_probe()
210 regmap_irq_get_domain(pmic->irq_chip_data)); in crystal_cove_i2c_probe()
227 struct intel_soc_pmic *pmic = i2c_get_clientdata(i2c); in crystal_cove_shutdown() local
229 disable_irq(pmic->irq); in crystal_cove_shutdown()
236 struct intel_soc_pmic *pmic = dev_get_drvdata(dev); in crystal_cove_suspend() local
238 disable_irq(pmic->irq); in crystal_cove_suspend()
245 struct intel_soc_pmic *pmic = dev_get_drvdata(dev); in crystal_cove_resume() local
247 enable_irq(pmic->irq); in crystal_cove_resume()