Lines Matching refs:regulator

88 	struct da9055_regulator *regulator = rdev_get_drvdata(rdev);  in da9055_buck_get_mode()  local
89 struct da9055_regulator_info *info = regulator->info; in da9055_buck_get_mode()
92 ret = da9055_reg_read(regulator->da9055, info->mode.reg); in da9055_buck_get_mode()
114 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_buck_set_mode() local
115 struct da9055_regulator_info *info = regulator->info; in da9055_buck_set_mode()
130 return da9055_reg_update(regulator->da9055, info->mode.reg, in da9055_buck_set_mode()
136 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_ldo_get_mode() local
137 struct da9055_regulator_info *info = regulator->info; in da9055_ldo_get_mode()
140 ret = da9055_reg_read(regulator->da9055, info->volt.reg_b); in da9055_ldo_get_mode()
152 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_ldo_set_mode() local
153 struct da9055_regulator_info *info = regulator->info; in da9055_ldo_set_mode()
167 return da9055_reg_update(regulator->da9055, volt.reg_b, in da9055_ldo_set_mode()
174 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_buck_get_current_limit() local
175 struct da9055_regulator_info *info = regulator->info; in da9055_buck_get_current_limit()
178 ret = da9055_reg_read(regulator->da9055, DA9055_REG_BUCK_LIM); in da9055_buck_get_current_limit()
189 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_buck_set_current_limit() local
190 struct da9055_regulator_info *info = regulator->info; in da9055_buck_set_current_limit()
196 return da9055_reg_update(regulator->da9055, in da9055_buck_set_current_limit()
207 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_regulator_get_voltage_sel() local
208 struct da9055_regulator_info *info = regulator->info; in da9055_regulator_get_voltage_sel()
217 ret = da9055_reg_read(regulator->da9055, info->conf.reg); in da9055_regulator_get_voltage_sel()
225 ret = da9055_reg_read(regulator->da9055, volt.reg_a); in da9055_regulator_get_voltage_sel()
227 ret = da9055_reg_read(regulator->da9055, volt.reg_b); in da9055_regulator_get_voltage_sel()
239 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_regulator_set_voltage_sel() local
240 struct da9055_regulator_info *info = regulator->info; in da9055_regulator_set_voltage_sel()
247 if (regulator->reg_rselect == NO_GPIO) { in da9055_regulator_set_voltage_sel()
249 ret = da9055_reg_update(regulator->da9055, info->conf.reg, in da9055_regulator_set_voltage_sel()
255 return da9055_reg_update(regulator->da9055, info->volt.reg_a, in da9055_regulator_set_voltage_sel()
264 ret = da9055_reg_read(regulator->da9055, info->conf.reg); in da9055_regulator_set_voltage_sel()
272 return da9055_reg_update(regulator->da9055, info->volt.reg_a, in da9055_regulator_set_voltage_sel()
275 return da9055_reg_update(regulator->da9055, info->volt.reg_b, in da9055_regulator_set_voltage_sel()
282 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_regulator_set_suspend_voltage() local
283 struct da9055_regulator_info *info = regulator->info; in da9055_regulator_set_suspend_voltage()
287 if (regulator->reg_rselect == NO_GPIO) { in da9055_regulator_set_suspend_voltage()
288 ret = da9055_reg_update(regulator->da9055, info->conf.reg, in da9055_regulator_set_suspend_voltage()
298 return da9055_reg_update(regulator->da9055, info->volt.reg_b, in da9055_regulator_set_suspend_voltage()
304 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_suspend_enable() local
305 struct da9055_regulator_info *info = regulator->info; in da9055_suspend_enable()
308 if (regulator->reg_rselect == NO_GPIO) in da9055_suspend_enable()
309 return da9055_reg_update(regulator->da9055, info->conf.reg, in da9055_suspend_enable()
317 struct da9055_regulator *regulator = rdev_get_drvdata(rdev); in da9055_suspend_disable() local
318 struct da9055_regulator_info *info = regulator->info; in da9055_suspend_disable()
321 if (regulator->reg_rselect == NO_GPIO) in da9055_suspend_disable()
322 return da9055_reg_update(regulator->da9055, info->conf.reg, in da9055_suspend_disable()
445 static int da9055_gpio_init(struct da9055_regulator *regulator, in da9055_gpio_init() argument
449 struct da9055_regulator_info *info = regulator->info; in da9055_gpio_init()
476 ret = da9055_reg_update(regulator->da9055, info->conf.reg, in da9055_gpio_init()
488 regulator->reg_rselect = pdata->reg_rsel[id]; in da9055_gpio_init()
504 ret = da9055_reg_update(regulator->da9055, info->conf.reg, in da9055_gpio_init()
516 struct da9055_regulator *regulator = data; in da9055_ldo5_6_oc_irq() local
518 regulator_notifier_call_chain(regulator->rdev, in da9055_ldo5_6_oc_irq()
551 struct da9055_regulator *regulator, in da9055_regulator_dt_init() argument
583 struct da9055_regulator *regulator, in da9055_regulator_dt_init() argument
594 struct da9055_regulator *regulator; in da9055_regulator_probe() local
599 regulator = devm_kzalloc(&pdev->dev, sizeof(struct da9055_regulator), in da9055_regulator_probe()
601 if (!regulator) in da9055_regulator_probe()
604 regulator->info = find_regulator_info(pdev->id); in da9055_regulator_probe()
605 if (regulator->info == NULL) { in da9055_regulator_probe()
610 regulator->da9055 = da9055; in da9055_regulator_probe()
612 config.driver_data = regulator; in da9055_regulator_probe()
618 ret = da9055_regulator_dt_init(pdev, regulator, &config, in da9055_regulator_probe()
624 ret = da9055_gpio_init(regulator, &config, pdata, pdev->id); in da9055_regulator_probe()
628 regulator->rdev = devm_regulator_register(&pdev->dev, in da9055_regulator_probe()
629 &regulator->info->reg_desc, in da9055_regulator_probe()
631 if (IS_ERR(regulator->rdev)) { in da9055_regulator_probe()
633 regulator->info->reg_desc.name); in da9055_regulator_probe()
634 return PTR_ERR(regulator->rdev); in da9055_regulator_probe()
648 pdev->name, regulator); in da9055_regulator_probe()
659 platform_set_drvdata(pdev, regulator); in da9055_regulator_probe()