Lines Matching +full:rt4803 +full:- +full:regulator
1 // SPDX-License-Identifier: GPL-2.0-only
14 #include <linux/regulator/driver.h>
15 #include <linux/regulator/of_regulator.h>
51 return -EINVAL; in rt4803_set_mode()
54 modeval <<= ffs(RT4803_MODE_MASK) - 1; in rt4803_set_mode()
69 modeval >>= ffs(RT4803_MODE_MASK) - 1; in rt4803_get_mode()
113 if (rdev->desc->vsel_reg == RT4803_REG_VSELL) in rt4803_set_suspend_voltage()
118 vsel = (uV - rdev->desc->min_uV) / rdev->desc->uV_step; in rt4803_set_suspend_voltage()
119 vsel <<= ffs(RT4803_VSEL_MASK) - 1; in rt4803_set_suspend_voltage()
154 struct device *dev = &i2c->dev; in rt4803_probe()
164 return -ENOMEM; in rt4803_probe()
175 vsel_act_high = device_property_read_bool(dev, "richtek,vsel-active-high"); in rt4803_probe()
177 desc->name = "rt4803-regulator"; in rt4803_probe()
178 desc->type = REGULATOR_VOLTAGE; in rt4803_probe()
179 desc->owner = THIS_MODULE; in rt4803_probe()
180 desc->ops = &rt4803_regulator_ops; in rt4803_probe()
181 desc->min_uV = RT4803_VOUT_MINUV; in rt4803_probe()
182 desc->uV_step = RT4803_VOUT_STEPUV; in rt4803_probe()
183 desc->n_voltages = RT4803_VOUT_NUM; in rt4803_probe()
184 desc->vsel_mask = RT4803_VSEL_MASK; in rt4803_probe()
185 desc->of_map_mode = rt4803_of_map_mode; in rt4803_probe()
187 desc->vsel_reg = RT4803_REG_VSELH; in rt4803_probe()
189 desc->vsel_reg = RT4803_REG_VSELL; in rt4803_probe()
200 { .compatible = "richtek,rt4803" },
207 .name = "rt4803",
214 MODULE_DESCRIPTION("Richtek RT4803 voltage regulator driver");