Searched refs:pfuze_chip (Results 1 - 1 of 1) sorted by relevance
/linux-4.4.14/drivers/regulator/ |
H A D | pfuze100-regulator.c | 67 struct pfuze_chip { struct 109 struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev); pfuze100_set_ramp_delay() 397 static int pfuze_parse_regulators_dt(struct pfuze_chip *chip) pfuze_parse_regulators_dt() 453 static int pfuze_parse_regulators_dt(struct pfuze_chip *chip) pfuze_parse_regulators_dt() 469 static int pfuze_identify(struct pfuze_chip *pfuze_chip) pfuze_identify() argument 474 ret = regmap_read(pfuze_chip->regmap, PFUZE100_DEVICEID, &value); pfuze_identify() 478 if (((value & 0x0f) == 0x8) && (pfuze_chip->chip_id == PFUZE100)) { pfuze_identify() 483 dev_info(pfuze_chip->dev, "Assuming misprogrammed ID=0x8"); pfuze_identify() 484 } else if ((value & 0x0f) != pfuze_chip->chip_id && pfuze_identify() 485 (value & 0xf0) >> 4 != pfuze_chip->chip_id) { pfuze_identify() 487 dev_warn(pfuze_chip->dev, "Illegal ID: %x\n", value); pfuze_identify() 491 ret = regmap_read(pfuze_chip->regmap, PFUZE100_REVID, &value); pfuze_identify() 494 dev_info(pfuze_chip->dev, pfuze_identify() 498 ret = regmap_read(pfuze_chip->regmap, PFUZE100_FABID, &value); pfuze_identify() 501 dev_info(pfuze_chip->dev, "FAB: %x, FIN: %x\n", pfuze_identify() 517 struct pfuze_chip *pfuze_chip; pfuze100_regulator_probe() local 526 pfuze_chip = devm_kzalloc(&client->dev, sizeof(*pfuze_chip), pfuze100_regulator_probe() 528 if (!pfuze_chip) pfuze100_regulator_probe() 538 pfuze_chip->chip_id = (int)(long)match->data; pfuze100_regulator_probe() 540 pfuze_chip->chip_id = id->driver_data; pfuze100_regulator_probe() 546 i2c_set_clientdata(client, pfuze_chip); pfuze100_regulator_probe() 547 pfuze_chip->dev = &client->dev; pfuze100_regulator_probe() 549 pfuze_chip->regmap = devm_regmap_init_i2c(client, &pfuze_regmap_config); pfuze100_regulator_probe() 550 if (IS_ERR(pfuze_chip->regmap)) { pfuze100_regulator_probe() 551 ret = PTR_ERR(pfuze_chip->regmap); pfuze100_regulator_probe() 557 ret = pfuze_identify(pfuze_chip); pfuze100_regulator_probe() 564 switch (pfuze_chip->chip_id) { pfuze100_regulator_probe() 587 (pfuze_chip->chip_id == PFUZE100) ? "100" : pfuze100_regulator_probe() 588 ((pfuze_chip->chip_id == PFUZE200) ? "200" : "3000")); pfuze100_regulator_probe() 590 memcpy(pfuze_chip->regulator_descs, pfuze_regulators, pfuze100_regulator_probe() 591 sizeof(pfuze_chip->regulator_descs)); pfuze100_regulator_probe() 593 ret = pfuze_parse_regulators_dt(pfuze_chip); pfuze100_regulator_probe() 602 desc = &pfuze_chip->regulator_descs[i].desc; pfuze100_regulator_probe() 611 regmap_read(pfuze_chip->regmap, desc->vsel_reg, &val); pfuze100_regulator_probe() 613 if (pfuze_chip->chip_id == PFUZE3000) { pfuze100_regulator_probe() 626 config.driver_data = pfuze_chip; pfuze100_regulator_probe() 630 pfuze_chip->regulators[i] = pfuze100_regulator_probe() 632 if (IS_ERR(pfuze_chip->regulators[i])) { pfuze100_regulator_probe() 635 return PTR_ERR(pfuze_chip->regulators[i]); pfuze100_regulator_probe()
|
Completed in 31 milliseconds