Lines Matching refs:regl

208 	struct da9063_regulator *regl = rdev_get_drvdata(rdev);  in da9063_buck_set_mode()  local
225 return regmap_field_write(regl->mode, val); in da9063_buck_set_mode()
236 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_buck_get_mode() local
240 ret = regmap_field_read(regl->mode, &val); in da9063_buck_get_mode()
257 ret = regmap_field_read(regl->sleep, &val); in da9063_buck_get_mode()
274 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_ldo_set_mode() local
288 return regmap_field_write(regl->sleep, val); in da9063_ldo_set_mode()
293 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_ldo_get_mode() local
296 ret = regmap_field_read(regl->sleep, &val); in da9063_ldo_get_mode()
342 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_set_suspend_voltage() local
343 const struct da9063_regulator_info *rinfo = regl->info; in da9063_set_suspend_voltage()
352 ret = regmap_update_bits(regl->hw->regmap, rinfo->suspend_vsel_reg, in da9063_set_suspend_voltage()
360 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_suspend_enable() local
362 return regmap_field_write(regl->suspend, 1); in da9063_suspend_enable()
367 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_suspend_disable() local
369 return regmap_field_write(regl->suspend, 0); in da9063_suspend_disable()
375 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_buck_set_suspend_mode() local
392 return regmap_field_write(regl->mode, val); in da9063_buck_set_suspend_mode()
398 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_ldo_set_suspend_mode() local
412 return regmap_field_write(regl->suspend_sleep, val); in da9063_ldo_set_suspend_mode()
438 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_buck_set_limit_set_overdrive() local
442 ret = regmap_read(regl->hw->regmap, DA9063_REG_CONFIG_H, in da9063_buck_set_limit_set_overdrive()
449 ret = regmap_set_bits(regl->hw->regmap, DA9063_REG_CONFIG_H, in da9063_buck_set_limit_set_overdrive()
463 regmap_clear_bits(regl->hw->regmap, DA9063_REG_CONFIG_H, in da9063_buck_set_limit_set_overdrive()
477 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_buck_set_limit_clear_overdrive() local
488 ret = regmap_clear_bits(regl->hw->regmap, DA9063_REG_CONFIG_H, in da9063_buck_set_limit_clear_overdrive()
525 struct da9063_regulator *regl = rdev_get_drvdata(rdev); in da9063_buck_get_current_limit() local
534 ret = regmap_read(regl->hw->regmap, DA9063_REG_CONFIG_H, &val); in da9063_buck_get_current_limit()
692 struct da9063_regulator *regl; in da9063_ldo_lim_event() local
700 regl = &regulators->regulator[i]; in da9063_ldo_lim_event()
701 if (regl->info->oc_event.reg != DA9063_REG_STATUS_D) in da9063_ldo_lim_event()
704 if (BIT(regl->info->oc_event.lsb) & bits) { in da9063_ldo_lim_event()
705 regulator_notifier_call_chain(regl->rdev, in da9063_ldo_lim_event()
814 struct da9063_regulator *regl; in da9063_regulator_probe() local
901 regl = &regulators->regulator[n]; in da9063_regulator_probe()
902 regl->hw = da9063; in da9063_regulator_probe()
903 regl->info = &model->regulator_info[id]; in da9063_regulator_probe()
904 regl->desc = regl->info->desc; in da9063_regulator_probe()
905 regl->desc.type = REGULATOR_VOLTAGE; in da9063_regulator_probe()
906 regl->desc.owner = THIS_MODULE; in da9063_regulator_probe()
908 if (regl->info->mode.reg) { in da9063_regulator_probe()
909 regl->mode = devm_regmap_field_alloc(&pdev->dev, in da9063_regulator_probe()
910 da9063->regmap, regl->info->mode); in da9063_regulator_probe()
911 if (IS_ERR(regl->mode)) in da9063_regulator_probe()
912 return PTR_ERR(regl->mode); in da9063_regulator_probe()
915 if (regl->info->suspend.reg) { in da9063_regulator_probe()
916 regl->suspend = devm_regmap_field_alloc(&pdev->dev, in da9063_regulator_probe()
917 da9063->regmap, regl->info->suspend); in da9063_regulator_probe()
918 if (IS_ERR(regl->suspend)) in da9063_regulator_probe()
919 return PTR_ERR(regl->suspend); in da9063_regulator_probe()
922 if (regl->info->sleep.reg) { in da9063_regulator_probe()
923 regl->sleep = devm_regmap_field_alloc(&pdev->dev, in da9063_regulator_probe()
924 da9063->regmap, regl->info->sleep); in da9063_regulator_probe()
925 if (IS_ERR(regl->sleep)) in da9063_regulator_probe()
926 return PTR_ERR(regl->sleep); in da9063_regulator_probe()
929 if (regl->info->suspend_sleep.reg) { in da9063_regulator_probe()
930 regl->suspend_sleep = devm_regmap_field_alloc(&pdev->dev, in da9063_regulator_probe()
931 da9063->regmap, regl->info->suspend_sleep); in da9063_regulator_probe()
932 if (IS_ERR(regl->suspend_sleep)) in da9063_regulator_probe()
933 return PTR_ERR(regl->suspend_sleep); in da9063_regulator_probe()
940 config.driver_data = regl; in da9063_regulator_probe()
944 regl->rdev = devm_regulator_register(&pdev->dev, &regl->desc, in da9063_regulator_probe()
946 if (IS_ERR(regl->rdev)) { in da9063_regulator_probe()
949 regl->desc.name); in da9063_regulator_probe()
950 return PTR_ERR(regl->rdev); in da9063_regulator_probe()