• Home
  • Raw
  • Download

Lines Matching refs:desc

53 	const struct regulator_desc *desc = rdev->desc;  in rt5739_set_mode()  local
57 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_mode()
78 const struct regulator_desc *desc = rdev->desc; in rt5739_get_mode() local
83 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_get_mode()
100 const struct regulator_desc *desc = rdev->desc; in rt5739_set_suspend_voltage() local
105 max_uV = desc->min_uV + desc->uV_step * (desc->n_voltages - 1); in rt5739_set_suspend_voltage()
107 if (uV < desc->min_uV || uV > max_uV) in rt5739_set_suspend_voltage()
110 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_suspend_voltage()
115 vsel = (uV - desc->min_uV) / desc->uV_step; in rt5739_set_suspend_voltage()
121 const struct regulator_desc *desc = rdev->desc; in rt5739_set_suspend_enable() local
125 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_suspend_enable()
130 return regmap_update_bits(regmap, desc->enable_reg, mask, mask); in rt5739_set_suspend_enable()
135 const struct regulator_desc *desc = rdev->desc; in rt5739_set_suspend_disable() local
139 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_suspend_disable()
144 return regmap_update_bits(regmap, desc->enable_reg, mask, 0); in rt5739_set_suspend_disable()
150 const struct regulator_desc *desc = rdev->desc; in rt5739_set_suspend_mode() local
154 if (desc->vsel_reg == RT5739_REG_NSEL0) in rt5739_set_suspend_mode()
201 static void rt5739_init_regulator_desc(struct regulator_desc *desc, in rt5739_init_regulator_desc() argument
205 desc->name = "rt5739-regulator"; in rt5739_init_regulator_desc()
206 desc->owner = THIS_MODULE; in rt5739_init_regulator_desc()
207 desc->ops = &rt5739_regulator_ops; in rt5739_init_regulator_desc()
208 desc->vsel_mask = RT5739_VSEL_MASK; in rt5739_init_regulator_desc()
209 desc->enable_reg = RT5739_REG_CNTL2; in rt5739_init_regulator_desc()
210 desc->active_discharge_reg = RT5739_REG_CNTL1; in rt5739_init_regulator_desc()
211 desc->active_discharge_mask = RT5739_ACTD_MASK; in rt5739_init_regulator_desc()
212 desc->active_discharge_on = RT5739_ACTD_MASK; in rt5739_init_regulator_desc()
213 desc->of_map_mode = rt5739_of_map_mode; in rt5739_init_regulator_desc()
217 desc->vsel_reg = RT5739_REG_NSEL1; in rt5739_init_regulator_desc()
218 desc->enable_mask = RT5739_ENVSEL1_MASK; in rt5739_init_regulator_desc()
220 desc->vsel_reg = RT5739_REG_NSEL0; in rt5739_init_regulator_desc()
221 desc->enable_mask = RT5739_ENVSEL0_MASK; in rt5739_init_regulator_desc()
227 desc->n_voltages = RT5733_N_VOLTS; in rt5739_init_regulator_desc()
228 desc->min_uV = RT5733_VOLT_MINUV; in rt5739_init_regulator_desc()
229 desc->uV_step = RT5733_VOLT_STPUV; in rt5739_init_regulator_desc()
232 desc->n_voltages = RT5739_N_VOLTS; in rt5739_init_regulator_desc()
233 desc->min_uV = RT5739_VOLT_MINUV; in rt5739_init_regulator_desc()
234 desc->uV_step = RT5739_VOLT_STPUV; in rt5739_init_regulator_desc()
249 struct regulator_desc *desc; in rt5739_probe() local
258 desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL); in rt5739_probe()
259 if (!desc) in rt5739_probe()
282 rt5739_init_regulator_desc(desc, vsel_acth, vid & RT5739_DID_MASK); in rt5739_probe()
286 cfg.init_data = of_get_regulator_init_data(dev, dev_of_node(dev), desc); in rt5739_probe()
287 rdev = devm_regulator_register(dev, desc, &cfg); in rt5739_probe()