• Home
  • Raw
  • Download

Lines Matching refs:pmic

442 	struct palmas_pmic *pmic = rdev_get_drvdata(dev);  in palmas_set_mode_smps()  local
443 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_set_mode_smps()
448 ret = palmas_smps_read(pmic->palmas, rinfo->ctrl_addr, &reg); in palmas_set_mode_smps()
471 pmic->current_reg_mode[id] = reg & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; in palmas_set_mode_smps()
473 palmas_smps_write(pmic->palmas, rinfo->ctrl_addr, reg); in palmas_set_mode_smps()
476 pmic->desc[id].enable_val = pmic->current_reg_mode[id]; in palmas_set_mode_smps()
483 struct palmas_pmic *pmic = rdev_get_drvdata(dev); in palmas_get_mode_smps() local
487 reg = pmic->current_reg_mode[id] & PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK; in palmas_get_mode_smps()
505 struct palmas_pmic *pmic = rdev_get_drvdata(rdev); in palmas_smps_set_ramp_delay() local
506 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_smps_set_ramp_delay()
527 ret = palmas_smps_write(pmic->palmas, rinfo->tstep_addr, reg); in palmas_smps_set_ramp_delay()
529 dev_err(pmic->palmas->dev, "TSTEP write failed: %d\n", ret); in palmas_smps_set_ramp_delay()
533 pmic->ramp_delay[id] = palmas_smps_ramp_delay[reg]; in palmas_smps_set_ramp_delay()
599 struct palmas_pmic *pmic = rdev_get_drvdata(dev); in palmas_is_enabled_ldo() local
600 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_is_enabled_ldo()
604 palmas_ldo_read(pmic->palmas, rinfo->ctrl_addr, &reg); in palmas_is_enabled_ldo()
890 static int palmas_ldo_registration(struct palmas_pmic *pmic, in palmas_ldo_registration() argument
914 desc = &pmic->desc[id]; in palmas_ldo_registration()
940 palmas_enable_ldo8_track(pmic->palmas); in palmas_ldo_registration()
981 rdev = devm_regulator_register(pmic->dev, desc, &config); in palmas_ldo_registration()
983 dev_err(pmic->dev, in palmas_ldo_registration()
994 ret = palmas_ldo_init(pmic->palmas, id, in palmas_ldo_registration()
997 ret = palmas_extreg_init(pmic->palmas, in palmas_ldo_registration()
1008 static int tps65917_ldo_registration(struct palmas_pmic *pmic, in tps65917_ldo_registration() argument
1032 desc = &pmic->desc[id]; in tps65917_ldo_registration()
1088 rdev = devm_regulator_register(pmic->dev, desc, &config); in tps65917_ldo_registration()
1090 dev_err(pmic->dev, in tps65917_ldo_registration()
1101 ret = palmas_ldo_init(pmic->palmas, in tps65917_ldo_registration()
1104 ret = palmas_extreg_init(pmic->palmas, in tps65917_ldo_registration()
1115 static int palmas_smps_registration(struct palmas_pmic *pmic, in palmas_smps_registration() argument
1138 if (pmic->smps123) in palmas_smps_registration()
1144 if (!pmic->smps123) in palmas_smps_registration()
1150 if (pmic->smps457) in palmas_smps_registration()
1156 if (!pmic->smps457) in palmas_smps_registration()
1162 if (!PALMAS_PMIC_HAS(pmic->palmas, SMPS10_BOOST)) in palmas_smps_registration()
1166 desc = &pmic->desc[id]; in palmas_smps_registration()
1173 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_smps_registration()
1175 dev_err(pmic->dev, in palmas_smps_registration()
1180 pmic->ramp_delay[id] = desc->ramp_delay; in palmas_smps_registration()
1186 ret = palmas_smps_init(pmic->palmas, id, reg_init); in palmas_smps_registration()
1228 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_smps_registration()
1232 pmic->range[id] = 1; in palmas_smps_registration()
1233 if (pmic->range[id]) in palmas_smps_registration()
1249 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_smps_registration()
1252 pmic->current_reg_mode[id] = reg & in palmas_smps_registration()
1273 rdev = devm_regulator_register(pmic->dev, desc, &config); in palmas_smps_registration()
1275 dev_err(pmic->dev, in palmas_smps_registration()
1285 static int tps65917_smps_registration(struct palmas_pmic *pmic, in tps65917_smps_registration() argument
1303 desc = &pmic->desc[id]; in tps65917_smps_registration()
1306 pmic->smps12) in tps65917_smps_registration()
1312 ret = palmas_smps_init(pmic->palmas, id, reg_init); in tps65917_smps_registration()
1332 ret = palmas_smps_read(pmic->palmas, addr, &reg); in tps65917_smps_registration()
1336 pmic->range[id] = 1; in tps65917_smps_registration()
1338 if (pmic->range[id]) in tps65917_smps_registration()
1355 ret = palmas_smps_read(pmic->palmas, addr, &reg); in tps65917_smps_registration()
1358 pmic->current_reg_mode[id] = reg & in tps65917_smps_registration()
1377 rdev = devm_regulator_register(pmic->dev, desc, &config); in tps65917_smps_registration()
1379 dev_err(pmic->dev, in tps65917_smps_registration()
1602 struct palmas_pmic *pmic; in palmas_regulators_probe() local
1618 pmic = devm_kzalloc(&pdev->dev, sizeof(*pmic), GFP_KERNEL); in palmas_regulators_probe()
1619 if (!pmic) in palmas_regulators_probe()
1628 pmic->dev = &pdev->dev; in palmas_regulators_probe()
1629 pmic->palmas = palmas; in palmas_regulators_probe()
1630 palmas->pmic = pmic; in palmas_regulators_probe()
1631 platform_set_drvdata(pdev, pmic); in palmas_regulators_probe()
1632 pmic->palmas->pmic_ddata = driver_data; in palmas_regulators_probe()
1643 pmic->smps123 = 1; in palmas_regulators_probe()
1644 pmic->smps12 = 1; in palmas_regulators_probe()
1648 pmic->smps457 = 1; in palmas_regulators_probe()
1652 config.driver_data = pmic; in palmas_regulators_probe()
1655 ret = driver_data->smps_register(pmic, driver_data, pdata, pdev_name, in palmas_regulators_probe()
1660 ret = driver_data->ldo_register(pmic, driver_data, pdata, pdev_name, in palmas_regulators_probe()