Lines Matching refs:regl

117 	struct da9062_regulator *regl = rdev_get_drvdata(rdev);  in da9062_buck_set_mode()  local
134 return regmap_field_write(regl->mode, val); in da9062_buck_set_mode()
145 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_buck_get_mode() local
149 ret = regmap_field_read(regl->mode, &val); in da9062_buck_get_mode()
165 ret = regmap_field_read(regl->sleep, &val); in da9062_buck_get_mode()
182 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_ldo_set_mode() local
196 return regmap_field_write(regl->sleep, val); in da9062_ldo_set_mode()
201 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_ldo_get_mode() local
204 ret = regmap_field_read(regl->sleep, &val); in da9062_ldo_get_mode()
250 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_set_suspend_voltage() local
251 const struct da9062_regulator_info *rinfo = regl->info; in da9062_set_suspend_voltage()
260 ret = regmap_update_bits(regl->hw->regmap, rinfo->suspend_vsel_reg, in da9062_set_suspend_voltage()
268 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_suspend_enable() local
270 return regmap_field_write(regl->suspend, 1); in da9062_suspend_enable()
275 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_suspend_disable() local
277 return regmap_field_write(regl->suspend, 0); in da9062_suspend_disable()
283 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_buck_set_suspend_mode() local
300 return regmap_field_write(regl->mode, val); in da9062_buck_set_suspend_mode()
306 struct da9062_regulator *regl = rdev_get_drvdata(rdev); in da9062_ldo_set_suspend_mode() local
320 return regmap_field_write(regl->suspend_sleep, val); in da9062_ldo_set_suspend_mode()
893 struct da9062_regulator *regl; in da9062_ldo_lim_event() local
905 regl = &regulators->regulator[i]; in da9062_ldo_lim_event()
906 if (regl->info->oc_event.reg != DA9062AA_STATUS_D) in da9062_ldo_lim_event()
909 if (BIT(regl->info->oc_event.lsb) & bits) { in da9062_ldo_lim_event()
910 regulator_notifier_call_chain(regl->rdev, in da9062_ldo_lim_event()
924 struct da9062_regulator *regl; in da9062_regulator_probe() local
955 regl = &regulators->regulator[n]; in da9062_regulator_probe()
956 regl->hw = chip; in da9062_regulator_probe()
957 regl->info = &rinfo[n]; in da9062_regulator_probe()
958 regl->desc = regl->info->desc; in da9062_regulator_probe()
959 regl->desc.type = REGULATOR_VOLTAGE; in da9062_regulator_probe()
960 regl->desc.owner = THIS_MODULE; in da9062_regulator_probe()
962 if (regl->info->mode.reg) { in da9062_regulator_probe()
963 regl->mode = devm_regmap_field_alloc( in da9062_regulator_probe()
966 regl->info->mode); in da9062_regulator_probe()
967 if (IS_ERR(regl->mode)) in da9062_regulator_probe()
968 return PTR_ERR(regl->mode); in da9062_regulator_probe()
971 if (regl->info->suspend.reg) { in da9062_regulator_probe()
972 regl->suspend = devm_regmap_field_alloc( in da9062_regulator_probe()
975 regl->info->suspend); in da9062_regulator_probe()
976 if (IS_ERR(regl->suspend)) in da9062_regulator_probe()
977 return PTR_ERR(regl->suspend); in da9062_regulator_probe()
980 if (regl->info->sleep.reg) { in da9062_regulator_probe()
981 regl->sleep = devm_regmap_field_alloc( in da9062_regulator_probe()
984 regl->info->sleep); in da9062_regulator_probe()
985 if (IS_ERR(regl->sleep)) in da9062_regulator_probe()
986 return PTR_ERR(regl->sleep); in da9062_regulator_probe()
989 if (regl->info->suspend_sleep.reg) { in da9062_regulator_probe()
990 regl->suspend_sleep = devm_regmap_field_alloc( in da9062_regulator_probe()
993 regl->info->suspend_sleep); in da9062_regulator_probe()
994 if (IS_ERR(regl->suspend_sleep)) in da9062_regulator_probe()
995 return PTR_ERR(regl->suspend_sleep); in da9062_regulator_probe()
1001 config.driver_data = regl; in da9062_regulator_probe()
1004 regl->rdev = devm_regulator_register(&pdev->dev, &regl->desc, in da9062_regulator_probe()
1006 if (IS_ERR(regl->rdev)) { in da9062_regulator_probe()
1009 regl->desc.name); in da9062_regulator_probe()
1010 return PTR_ERR(regl->rdev); in da9062_regulator_probe()