Source
x
dev_err(&i2c->dev, "No IRQ configured\n");
return -EINVAL;
}
bd718xx = devm_kzalloc(&i2c->dev, sizeof(struct bd718xx), GFP_KERNEL);
if (!bd718xx)
return -ENOMEM;
bd718xx->chip_irq = i2c->irq;
bd718xx->chip_type = (unsigned int)
bd718xx->chip_type = (unsigned int)(uintptr_t)
of_device_get_match_data(&i2c->dev);
bd718xx->dev = &i2c->dev;
dev_set_drvdata(&i2c->dev, bd718xx);
bd718xx->regmap = devm_regmap_init_i2c(i2c, &bd718xx_regmap_config);
if (IS_ERR(bd718xx->regmap)) {
dev_err(&i2c->dev, "regmap initialization failed\n");
return PTR_ERR(bd718xx->regmap);
}