Searched refs:ltc3589 (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/drivers/regulator/
H A Dltc3589.c29 #define DRIVER_NAME "ltc3589"
94 struct ltc3589 { struct
112 struct ltc3589 *ltc3589 = rdev_get_drvdata(rdev); ltc3589_set_ramp_delay() local
124 return regmap_update_bits(ltc3589->regmap, ltc3589_set_ramp_delay()
134 struct ltc3589 *ltc3589 = rdev_get_drvdata(rdev); ltc3589_set_suspend_voltage() local
142 return regmap_update_bits(ltc3589->regmap, rdev->desc->vsel_reg + 1, ltc3589_set_suspend_voltage()
149 struct ltc3589 *ltc3589 = rdev_get_drvdata(rdev); ltc3589_set_suspend_mode() local
160 return regmap_update_bits(ltc3589->regmap, LTC3589_VCCR, mask, bit); ltc3589_set_suspend_mode()
252 static int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589) ltc3589_parse_regulators_dt() argument
254 struct device *dev = ltc3589->dev; ltc3589_parse_regulators_dt()
279 struct ltc3589_regulator *desc = &ltc3589->regulator_descs[i]; ltc3589_parse_regulators_dt()
308 static inline int ltc3589_parse_regulators_dt(struct ltc3589 *ltc3589) ltc3589_parse_regulators_dt() argument
413 struct ltc3589 *ltc3589 = dev_id; ltc3589_isr() local
416 regmap_read(ltc3589->regmap, LTC3589_IRQSTAT, &irqstat); ltc3589_isr()
421 regulator_notifier_call_chain(ltc3589->regulators[i], ltc3589_isr()
428 regulator_notifier_call_chain(ltc3589->regulators[i], ltc3589_isr()
433 regmap_write(ltc3589->regmap, LTC3589_CLIRQ, 0); ltc3589_isr()
465 struct ltc3589 *ltc3589; ltc3589_probe() local
468 ltc3589 = devm_kzalloc(dev, sizeof(*ltc3589), GFP_KERNEL); ltc3589_probe()
469 if (!ltc3589) ltc3589_probe()
472 i2c_set_clientdata(client, ltc3589); ltc3589_probe()
473 ltc3589->variant = id->driver_data; ltc3589_probe()
474 ltc3589->dev = dev; ltc3589_probe()
476 descs = ltc3589->regulator_descs; ltc3589_probe()
478 if (ltc3589->variant == LTC3589) { ltc3589_probe()
486 ltc3589->regmap = devm_regmap_init_i2c(client, &ltc3589_regmap_config); ltc3589_probe()
487 if (IS_ERR(ltc3589->regmap)) { ltc3589_probe()
488 ret = PTR_ERR(ltc3589->regmap); ltc3589_probe()
493 ret = ltc3589_parse_regulators_dt(ltc3589); ltc3589_probe()
498 struct ltc3589_regulator *rdesc = &ltc3589->regulator_descs[i]; ltc3589_probe()
510 config.driver_data = ltc3589; ltc3589_probe()
513 ltc3589->regulators[i] = devm_regulator_register(dev, desc, ltc3589_probe()
515 if (IS_ERR(ltc3589->regulators[i])) { ltc3589_probe()
516 ret = PTR_ERR(ltc3589->regulators[i]); ltc3589_probe()
525 client->name, ltc3589); ltc3589_probe()
535 { "ltc3589", LTC3589 },
536 { "ltc3589-1", LTC3589_1 },
537 { "ltc3589-2", LTC3589_2 },
555 MODULE_ALIAS("i2c:ltc3589");

Completed in 37 milliseconds