Lines Matching full:pmic

391 	struct tps65910_reg *pmic = rdev_get_drvdata(dev);  in tps65910_set_mode()  local
395 reg = pmic->get_ctrl_reg(id); in tps65910_set_mode()
416 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_get_mode() local
420 reg = pmic->get_ctrl_reg(id); in tps65910_get_mode()
514 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_get_voltage_sel() local
518 reg = pmic->get_ctrl_reg(id); in tps65910_get_voltage_sel()
557 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_get_voltage_sel() local
562 reg = pmic->get_ctrl_reg(id); in tps65911_get_voltage_sel()
634 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_set_voltage_sel() local
638 reg = pmic->get_ctrl_reg(id); in tps65910_set_voltage_sel()
665 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_set_voltage_sel() local
669 reg = pmic->get_ctrl_reg(id); in tps65911_set_voltage_sel()
723 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_list_voltage() local
752 return pmic->info[id]->voltage_table[selector]; in tps65911_list_voltage()
821 static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic, in tps65910_set_ext_sleep_config() argument
824 struct tps65910 *mfd = pmic->mfd; in tps65910_set_ext_sleep_config()
825 u8 regoffs = (pmic->ext_sleep_control[id] >> 8) & 0xFF; in tps65910_set_ext_sleep_config()
826 u8 bit_pos = (1 << pmic->ext_sleep_control[id] & 0xFF); in tps65910_set_ext_sleep_config()
850 pmic->board_ext_control[id] = ext_sleep_config; in tps65910_set_ext_sleep_config()
917 int op_reg_add = pmic->get_ctrl_reg(id) + 1; in tps65910_set_ext_sleep_config()
918 int sr_reg_add = pmic->get_ctrl_reg(id) + 2; in tps65910_set_ext_sleep_config()
1077 struct tps65910_reg *pmic; in tps65910_probe() local
1092 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in tps65910_probe()
1093 if (!pmic) in tps65910_probe()
1096 pmic->mfd = tps65910; in tps65910_probe()
1097 platform_set_drvdata(pdev, pmic); in tps65910_probe()
1100 err = regmap_set_bits(pmic->mfd->regmap, TPS65910_DEVCTRL, in tps65910_probe()
1108 pmic->get_ctrl_reg = &tps65910_get_ctrl_register; in tps65910_probe()
1109 pmic->num_regulators = ARRAY_SIZE(tps65910_regs); in tps65910_probe()
1110 pmic->ext_sleep_control = tps65910_ext_sleep_control; in tps65910_probe()
1116 regmap_clear_bits(pmic->mfd->regmap, TPS65910_DCDCCTRL, in tps65910_probe()
1121 pmic->get_ctrl_reg = &tps65911_get_ctrl_register; in tps65910_probe()
1122 pmic->num_regulators = ARRAY_SIZE(tps65911_regs); in tps65910_probe()
1123 pmic->ext_sleep_control = tps65911_ext_sleep_control; in tps65910_probe()
1131 pmic->desc = devm_kcalloc(&pdev->dev, in tps65910_probe()
1132 pmic->num_regulators, in tps65910_probe()
1135 if (!pmic->desc) in tps65910_probe()
1138 pmic->info = devm_kcalloc(&pdev->dev, in tps65910_probe()
1139 pmic->num_regulators, in tps65910_probe()
1142 if (!pmic->info) in tps65910_probe()
1145 pmic->rdev = devm_kcalloc(&pdev->dev, in tps65910_probe()
1146 pmic->num_regulators, in tps65910_probe()
1149 if (!pmic->rdev) in tps65910_probe()
1152 for (i = 0; i < pmic->num_regulators; i++, info++) { in tps65910_probe()
1154 pmic->info[i] = info; in tps65910_probe()
1156 pmic->desc[i].name = info->name; in tps65910_probe()
1157 pmic->desc[i].supply_name = info->vin_name; in tps65910_probe()
1158 pmic->desc[i].id = i; in tps65910_probe()
1159 pmic->desc[i].n_voltages = info->n_voltages; in tps65910_probe()
1160 pmic->desc[i].enable_time = info->enable_time_us; in tps65910_probe()
1163 pmic->desc[i].ops = &tps65910_ops_dcdc; in tps65910_probe()
1164 pmic->desc[i].n_voltages = VDD1_2_NUM_VOLT_FINE * in tps65910_probe()
1166 pmic->desc[i].ramp_delay = 12500; in tps65910_probe()
1169 pmic->desc[i].ops = &tps65910_ops_vdd3; in tps65910_probe()
1170 pmic->desc[i].volt_table = info->voltage_table; in tps65910_probe()
1172 pmic->desc[i].ops = &tps65910_ops_dcdc; in tps65910_probe()
1173 pmic->desc[i].ramp_delay = 5000; in tps65910_probe()
1177 pmic->desc[i].ops = &tps65910_ops_vbb; in tps65910_probe()
1178 pmic->desc[i].volt_table = info->voltage_table; in tps65910_probe()
1181 pmic->desc[i].ops = &tps65910_ops; in tps65910_probe()
1182 pmic->desc[i].volt_table = info->voltage_table; in tps65910_probe()
1184 pmic->desc[i].ops = &tps65911_ops; in tps65910_probe()
1188 err = tps65910_set_ext_sleep_config(pmic, i, in tps65910_probe()
1198 pmic->desc[i].type = REGULATOR_VOLTAGE; in tps65910_probe()
1199 pmic->desc[i].owner = THIS_MODULE; in tps65910_probe()
1200 pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i); in tps65910_probe()
1201 pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED; in tps65910_probe()
1205 config.driver_data = pmic; in tps65910_probe()
1211 rdev = devm_regulator_register(&pdev->dev, &pmic->desc[i], in tps65910_probe()
1219 pmic->rdev[i] = rdev; in tps65910_probe()
1226 struct tps65910_reg *pmic = platform_get_drvdata(pdev); in tps65910_shutdown() local
1242 for (i = 0; i < pmic->num_regulators; i++) { in tps65910_shutdown()
1244 if (!pmic->rdev[i]) in tps65910_shutdown()
1247 err = tps65910_set_ext_sleep_config(pmic, i, 0); in tps65910_shutdown()
1256 .name = "tps65910-pmic",
1278 MODULE_ALIAS("platform:tps65910-pmic");