Lines Matching refs:pmic
392 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_set_mode() local
396 reg = pmic->get_ctrl_reg(id); in tps65910_set_mode()
417 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_get_mode() local
421 reg = pmic->get_ctrl_reg(id); in tps65910_get_mode()
515 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_get_voltage_sel() local
519 reg = pmic->get_ctrl_reg(id); in tps65910_get_voltage_sel()
558 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_get_voltage_sel() local
563 reg = pmic->get_ctrl_reg(id); in tps65911_get_voltage_sel()
635 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65910_set_voltage_sel() local
639 reg = pmic->get_ctrl_reg(id); in tps65910_set_voltage_sel()
666 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_set_voltage_sel() local
670 reg = pmic->get_ctrl_reg(id); in tps65911_set_voltage_sel()
724 struct tps65910_reg *pmic = rdev_get_drvdata(dev); in tps65911_list_voltage() local
753 return pmic->info[id]->voltage_table[selector]; in tps65911_list_voltage()
822 static int tps65910_set_ext_sleep_config(struct tps65910_reg *pmic, in tps65910_set_ext_sleep_config() argument
825 struct tps65910 *mfd = pmic->mfd; in tps65910_set_ext_sleep_config()
826 u8 regoffs = (pmic->ext_sleep_control[id] >> 8) & 0xFF; in tps65910_set_ext_sleep_config()
827 u8 bit_pos = (1 << pmic->ext_sleep_control[id] & 0xFF); in tps65910_set_ext_sleep_config()
851 pmic->board_ext_control[id] = ext_sleep_config; in tps65910_set_ext_sleep_config()
918 int op_reg_add = pmic->get_ctrl_reg(id) + 1; in tps65910_set_ext_sleep_config()
919 int sr_reg_add = pmic->get_ctrl_reg(id) + 2; in tps65910_set_ext_sleep_config()
1078 struct tps65910_reg *pmic; in tps65910_probe() local
1093 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in tps65910_probe()
1094 if (!pmic) in tps65910_probe()
1097 pmic->mfd = tps65910; in tps65910_probe()
1098 platform_set_drvdata(pdev, pmic); in tps65910_probe()
1101 err = regmap_set_bits(pmic->mfd->regmap, TPS65910_DEVCTRL, in tps65910_probe()
1109 pmic->get_ctrl_reg = &tps65910_get_ctrl_register; in tps65910_probe()
1110 pmic->num_regulators = ARRAY_SIZE(tps65910_regs); in tps65910_probe()
1111 pmic->ext_sleep_control = tps65910_ext_sleep_control; in tps65910_probe()
1117 regmap_clear_bits(pmic->mfd->regmap, TPS65910_DCDCCTRL, in tps65910_probe()
1122 pmic->get_ctrl_reg = &tps65911_get_ctrl_register; in tps65910_probe()
1123 pmic->num_regulators = ARRAY_SIZE(tps65911_regs); in tps65910_probe()
1124 pmic->ext_sleep_control = tps65911_ext_sleep_control; in tps65910_probe()
1132 pmic->desc = devm_kcalloc(&pdev->dev, in tps65910_probe()
1133 pmic->num_regulators, in tps65910_probe()
1136 if (!pmic->desc) in tps65910_probe()
1139 pmic->info = devm_kcalloc(&pdev->dev, in tps65910_probe()
1140 pmic->num_regulators, in tps65910_probe()
1143 if (!pmic->info) in tps65910_probe()
1146 pmic->rdev = devm_kcalloc(&pdev->dev, in tps65910_probe()
1147 pmic->num_regulators, in tps65910_probe()
1150 if (!pmic->rdev) in tps65910_probe()
1153 for (i = 0; i < pmic->num_regulators; i++, info++) { in tps65910_probe()
1155 pmic->info[i] = info; in tps65910_probe()
1157 pmic->desc[i].name = info->name; in tps65910_probe()
1158 pmic->desc[i].supply_name = info->vin_name; in tps65910_probe()
1159 pmic->desc[i].id = i; in tps65910_probe()
1160 pmic->desc[i].n_voltages = info->n_voltages; in tps65910_probe()
1161 pmic->desc[i].enable_time = info->enable_time_us; in tps65910_probe()
1164 pmic->desc[i].ops = &tps65910_ops_dcdc; in tps65910_probe()
1165 pmic->desc[i].n_voltages = VDD1_2_NUM_VOLT_FINE * in tps65910_probe()
1167 pmic->desc[i].ramp_delay = 12500; in tps65910_probe()
1170 pmic->desc[i].ops = &tps65910_ops_vdd3; in tps65910_probe()
1171 pmic->desc[i].volt_table = info->voltage_table; in tps65910_probe()
1173 pmic->desc[i].ops = &tps65910_ops_dcdc; in tps65910_probe()
1174 pmic->desc[i].ramp_delay = 5000; in tps65910_probe()
1178 pmic->desc[i].ops = &tps65910_ops_vbb; in tps65910_probe()
1179 pmic->desc[i].volt_table = info->voltage_table; in tps65910_probe()
1182 pmic->desc[i].ops = &tps65910_ops; in tps65910_probe()
1183 pmic->desc[i].volt_table = info->voltage_table; in tps65910_probe()
1185 pmic->desc[i].ops = &tps65911_ops; in tps65910_probe()
1189 err = tps65910_set_ext_sleep_config(pmic, i, in tps65910_probe()
1199 pmic->desc[i].type = REGULATOR_VOLTAGE; in tps65910_probe()
1200 pmic->desc[i].owner = THIS_MODULE; in tps65910_probe()
1201 pmic->desc[i].enable_reg = pmic->get_ctrl_reg(i); in tps65910_probe()
1202 pmic->desc[i].enable_mask = TPS65910_SUPPLY_STATE_ENABLED; in tps65910_probe()
1206 config.driver_data = pmic; in tps65910_probe()
1212 rdev = devm_regulator_register(&pdev->dev, &pmic->desc[i], in tps65910_probe()
1220 pmic->rdev[i] = rdev; in tps65910_probe()
1227 struct tps65910_reg *pmic = platform_get_drvdata(pdev); in tps65910_shutdown() local
1243 for (i = 0; i < pmic->num_regulators; i++) { in tps65910_shutdown()
1245 if (!pmic->rdev[i]) in tps65910_shutdown()
1248 err = tps65910_set_ext_sleep_config(pmic, i, 0); in tps65910_shutdown()