Lines Matching +full:use +full:- +full:vsel +full:- +full:dvs

1 // SPDX-License-Identifier: GPL-2.0+
80 (struct rtq2134_regulator_desc *)rdev->desc; in rtq2134_buck_set_mode()
88 return -EINVAL; in rtq2134_buck_set_mode()
90 val <<= ffs(desc->mode_mask) - 1; in rtq2134_buck_set_mode()
91 return regmap_update_bits(rdev->regmap, desc->mode_reg, desc->mode_mask, in rtq2134_buck_set_mode()
98 (struct rtq2134_regulator_desc *)rdev->desc; in rtq2134_buck_get_mode()
102 ret = regmap_read(rdev->regmap, desc->mode_reg, &mode); in rtq2134_buck_get_mode()
106 if (mode & desc->mode_mask) in rtq2134_buck_get_mode()
114 (struct rtq2134_regulator_desc *)rdev->desc; in rtq2134_buck_set_suspend_voltage()
121 sel <<= ffs(desc->suspend_vsel_mask) - 1; in rtq2134_buck_set_suspend_voltage()
123 return regmap_update_bits(rdev->regmap, desc->suspend_vsel_reg, in rtq2134_buck_set_suspend_voltage()
124 desc->suspend_vsel_mask, sel); in rtq2134_buck_set_suspend_voltage()
130 (struct rtq2134_regulator_desc *)rdev->desc; in rtq2134_buck_set_suspend_enable()
131 unsigned int val = desc->suspend_enable_mask; in rtq2134_buck_set_suspend_enable()
133 return regmap_update_bits(rdev->regmap, desc->suspend_enable_reg, in rtq2134_buck_set_suspend_enable()
134 desc->suspend_enable_mask, val); in rtq2134_buck_set_suspend_enable()
140 (struct rtq2134_regulator_desc *)rdev->desc; in rtq2134_buck_set_suspend_disable()
142 return regmap_update_bits(rdev->regmap, desc->suspend_enable_reg, in rtq2134_buck_set_suspend_disable()
143 desc->suspend_enable_mask, 0); in rtq2134_buck_set_suspend_disable()
150 (struct rtq2134_regulator_desc *)rdev->desc; in rtq2134_buck_set_suspend_mode()
158 return -EINVAL; in rtq2134_buck_set_suspend_mode()
160 val <<= ffs(desc->suspend_mode_mask) - 1; in rtq2134_buck_set_suspend_mode()
161 return regmap_update_bits(rdev->regmap, desc->suspend_mode_reg, in rtq2134_buck_set_suspend_mode()
162 desc->suspend_mode_mask, val); in rtq2134_buck_set_suspend_mode()
172 ret = regmap_read(rdev->regmap, RTQ2134_REG_FLT_RECORDTEMP, in rtq2134_buck_get_error_flags()
175 dev_err(&rdev->dev, "Failed to get chip error flag\n"); in rtq2134_buck_get_error_flags()
179 ret = regmap_read(rdev->regmap, RTQ2134_REG_FLT_RECORDBUCK(rid), in rtq2134_buck_get_error_flags()
182 dev_err(&rdev->dev, "Failed to get buck error flag\n"); in rtq2134_buck_get_error_flags()
240 int rid = desc->id; in rtq2134_buck_of_parse_cb()
245 vsel_dvs = of_property_read_bool(np, "richtek,use-vsel-dvs"); in rtq2134_buck_of_parse_cb()
251 ret = regmap_update_bits(cfg->regmap, rdesc->dvs_ctrl_reg, in rtq2134_buck_of_parse_cb()
256 uv_shutdown = of_property_read_bool(np, "richtek,uv-shutdown"); in rtq2134_buck_of_parse_cb()
262 return regmap_update_bits(cfg->regmap, RTQ2134_REG_FLT_BUCKCTRL(rid), in rtq2134_buck_of_parse_cb()
338 dev_err(&i2c->dev, "Failed to allocate regmap\n"); in rtq2134_probe()
342 regulator_cfg.dev = &i2c->dev; in rtq2134_probe()
345 rdev = devm_regulator_register(&i2c->dev, in rtq2134_probe()
349 dev_err(&i2c->dev, "Failed to init %d regulator\n", i); in rtq2134_probe()