Lines Matching refs:i2c
177 static int da9210_i2c_probe(struct i2c_client *i2c, in da9210_i2c_probe() argument
181 struct device *dev = &i2c->dev; in da9210_i2c_probe()
187 chip = devm_kzalloc(&i2c->dev, sizeof(struct da9210), GFP_KERNEL); in da9210_i2c_probe()
191 chip->regmap = devm_regmap_init_i2c(i2c, &da9210_regmap_config); in da9210_i2c_probe()
194 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in da9210_i2c_probe()
199 config.dev = &i2c->dev; in da9210_i2c_probe()
211 dev_err(&i2c->dev, "Failed to write to mask reg: %d\n", error); in da9210_i2c_probe()
215 rdev = devm_regulator_register(&i2c->dev, &da9210_reg, &config); in da9210_i2c_probe()
217 dev_err(&i2c->dev, "Failed to register DA9210 regulator\n"); in da9210_i2c_probe()
222 if (i2c->irq) { in da9210_i2c_probe()
223 error = devm_request_threaded_irq(&i2c->dev, i2c->irq, NULL, in da9210_i2c_probe()
229 dev_err(&i2c->dev, "Failed to request IRQ%u: %d\n", in da9210_i2c_probe()
230 i2c->irq, error); in da9210_i2c_probe()
239 dev_err(&i2c->dev, "Failed to update mask reg: %d\n", in da9210_i2c_probe()
244 dev_warn(&i2c->dev, "No IRQ configured\n"); in da9210_i2c_probe()
247 i2c_set_clientdata(i2c, chip); in da9210_i2c_probe()
257 MODULE_DEVICE_TABLE(i2c, da9210_i2c_id);