Lines Matching refs:tps
151 struct tps_pmic *tps = rdev_get_drvdata(dev); in tps65023_dcdc_get_voltage_sel() local
157 if (dcdc != tps->core_regulator) in tps65023_dcdc_get_voltage_sel()
166 struct tps_pmic *tps = rdev_get_drvdata(dev); in tps65023_dcdc_set_voltage_sel() local
169 if (dcdc != tps->core_regulator) in tps65023_dcdc_set_voltage_sel()
210 struct tps_pmic *tps; in tps_65023_probe() local
225 tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); in tps_65023_probe()
226 if (!tps) in tps_65023_probe()
229 tps->regmap = devm_regmap_init_i2c(client, &tps65023_regmap_config); in tps_65023_probe()
230 if (IS_ERR(tps->regmap)) { in tps_65023_probe()
231 error = PTR_ERR(tps->regmap); in tps_65023_probe()
238 tps->core_regulator = drv_data->core_regulator; in tps_65023_probe()
242 tps->info[i] = info; in tps_65023_probe()
244 tps->desc[i].name = info->name; in tps_65023_probe()
245 tps->desc[i].id = i; in tps_65023_probe()
246 tps->desc[i].n_voltages = info->table_len; in tps_65023_probe()
247 tps->desc[i].volt_table = info->table; in tps_65023_probe()
248 tps->desc[i].ops = (i > TPS65023_DCDC_3 ? in tps_65023_probe()
250 tps->desc[i].type = REGULATOR_VOLTAGE; in tps_65023_probe()
251 tps->desc[i].owner = THIS_MODULE; in tps_65023_probe()
253 tps->desc[i].enable_reg = TPS65023_REG_REG_CTRL; in tps_65023_probe()
256 tps->desc[i].vsel_reg = TPS65023_REG_LDO_CTRL; in tps_65023_probe()
257 tps->desc[i].vsel_mask = 0x07; in tps_65023_probe()
258 tps->desc[i].enable_mask = 1 << 1; in tps_65023_probe()
261 tps->desc[i].vsel_reg = TPS65023_REG_LDO_CTRL; in tps_65023_probe()
262 tps->desc[i].vsel_mask = 0x70; in tps_65023_probe()
263 tps->desc[i].enable_mask = 1 << 2; in tps_65023_probe()
266 tps->desc[i].enable_mask = in tps_65023_probe()
268 tps->desc[i].vsel_reg = TPS65023_REG_DEF_CORE; in tps_65023_probe()
269 tps->desc[i].vsel_mask = info->table_len - 1; in tps_65023_probe()
270 tps->desc[i].apply_reg = TPS65023_REG_CON_CTRL2; in tps_65023_probe()
271 tps->desc[i].apply_bit = TPS65023_REG_CTRL2_GO; in tps_65023_probe()
276 config.driver_data = tps; in tps_65023_probe()
277 config.regmap = tps->regmap; in tps_65023_probe()
280 rdev = regulator_register(&tps->desc[i], &config); in tps_65023_probe()
289 tps->rdev[i] = rdev; in tps_65023_probe()
292 i2c_set_clientdata(client, tps); in tps_65023_probe()
295 regmap_update_bits(tps->regmap, TPS65023_REG_CON_CTRL2, in tps_65023_probe()
302 regulator_unregister(tps->rdev[i]); in tps_65023_probe()
308 struct tps_pmic *tps = i2c_get_clientdata(client); in tps_65023_remove() local
312 regulator_unregister(tps->rdev[i]); in tps_65023_remove()