• Home
  • Raw
  • Download

Lines Matching refs:da9063

105 static int da9063_get_device_type(struct i2c_client *i2c, struct da9063 *da9063)  in da9063_get_device_type()  argument
116 dev_err(da9063->dev, in da9063_get_device_type()
122 dev_info(da9063->dev, in da9063_get_device_type()
126 da9063->variant_code = in da9063_get_device_type()
357 struct da9063 *da9063; in da9063_i2c_probe() local
360 da9063 = devm_kzalloc(&i2c->dev, sizeof(struct da9063), GFP_KERNEL); in da9063_i2c_probe()
361 if (da9063 == NULL) in da9063_i2c_probe()
364 i2c_set_clientdata(i2c, da9063); in da9063_i2c_probe()
365 da9063->dev = &i2c->dev; in da9063_i2c_probe()
366 da9063->chip_irq = i2c->irq; in da9063_i2c_probe()
367 da9063->type = id->driver_data; in da9063_i2c_probe()
369 ret = da9063_get_device_type(i2c, da9063); in da9063_i2c_probe()
373 switch (da9063->type) { in da9063_i2c_probe()
375 switch (da9063->variant_code) { in da9063_i2c_probe()
403 dev_err(da9063->dev, in da9063_i2c_probe()
409 switch (da9063->variant_code) { in da9063_i2c_probe()
429 dev_err(da9063->dev, in da9063_i2c_probe()
435 dev_err(da9063->dev, "Chip type not supported\n"); in da9063_i2c_probe()
439 da9063->regmap = devm_regmap_init_i2c(i2c, &da9063_regmap_config); in da9063_i2c_probe()
440 if (IS_ERR(da9063->regmap)) { in da9063_i2c_probe()
441 ret = PTR_ERR(da9063->regmap); in da9063_i2c_probe()
442 dev_err(da9063->dev, "Failed to allocate register map: %d\n", in da9063_i2c_probe()
449 ret = regmap_clear_bits(da9063->regmap, DA9063_REG_CONFIG_J, in da9063_i2c_probe()
452 dev_err(da9063->dev, "Failed to set Two-Wire Bus Mode.\n"); in da9063_i2c_probe()
457 return da9063_device_init(da9063, i2c->irq); in da9063_i2c_probe()