Lines Matching refs:mpd
213 struct mt6360_pmu_data *mpd = irq_drv_data; in mt6360_pmu_handle_post_irq() local
215 return regmap_update_bits(mpd->regmap, in mt6360_pmu_handle_post_irq()
318 struct mt6360_pmu_data *mpd; in mt6360_pmu_probe() local
322 mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL); in mt6360_pmu_probe()
323 if (!mpd) in mt6360_pmu_probe()
326 mpd->dev = &client->dev; in mt6360_pmu_probe()
327 i2c_set_clientdata(client, mpd); in mt6360_pmu_probe()
329 mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config); in mt6360_pmu_probe()
330 if (IS_ERR(mpd->regmap)) { in mt6360_pmu_probe()
332 return PTR_ERR(mpd->regmap); in mt6360_pmu_probe()
335 ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, ®_data); in mt6360_pmu_probe()
341 mpd->chip_rev = reg_data & CHIP_REV_MASK; in mt6360_pmu_probe()
342 if (mpd->chip_rev != CHIP_VEN_MT6360) { in mt6360_pmu_probe()
347 mt6360_pmu_irq_chip.irq_drv_data = mpd; in mt6360_pmu_probe()
348 ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq, in mt6360_pmu_probe()
350 &mt6360_pmu_irq_chip, &mpd->irq_data); in mt6360_pmu_probe()
356 mpd->i2c[0] = client; in mt6360_pmu_probe()
358 mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev, in mt6360_pmu_probe()
361 if (IS_ERR(mpd->i2c[i])) { in mt6360_pmu_probe()
365 return PTR_ERR(mpd->i2c[i]); in mt6360_pmu_probe()
367 i2c_set_clientdata(mpd->i2c[i], mpd); in mt6360_pmu_probe()
372 0, regmap_irq_get_domain(mpd->irq_data)); in mt6360_pmu_probe()