Lines Matching refs:palmas

397 static int palmas_smps_read(struct palmas *palmas, unsigned int reg,  in palmas_smps_read()  argument
404 return regmap_read(palmas->regmap[REGULATOR_SLAVE], addr, dest); in palmas_smps_read()
407 static int palmas_smps_write(struct palmas *palmas, unsigned int reg, in palmas_smps_write() argument
414 return regmap_write(palmas->regmap[REGULATOR_SLAVE], addr, value); in palmas_smps_write()
417 static int palmas_ldo_read(struct palmas *palmas, unsigned int reg, in palmas_ldo_read() argument
424 return regmap_read(palmas->regmap[REGULATOR_SLAVE], addr, dest); in palmas_ldo_read()
427 static int palmas_ldo_write(struct palmas *palmas, unsigned int reg, in palmas_ldo_write() argument
434 return regmap_write(palmas->regmap[REGULATOR_SLAVE], addr, value); in palmas_ldo_write()
442 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_set_mode_smps()
447 ret = palmas_smps_read(pmic->palmas, rinfo->ctrl_addr, &reg); in palmas_set_mode_smps()
472 palmas_smps_write(pmic->palmas, rinfo->ctrl_addr, reg); in palmas_set_mode_smps()
505 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_smps_set_ramp_delay()
526 ret = palmas_smps_write(pmic->palmas, rinfo->tstep_addr, reg); in palmas_smps_set_ramp_delay()
528 dev_err(pmic->palmas->dev, "TSTEP write failed: %d\n", ret); in palmas_smps_set_ramp_delay()
599 struct palmas_pmic_driver_data *ddata = pmic->palmas->pmic_ddata; in palmas_is_enabled_ldo()
603 palmas_ldo_read(pmic->palmas, rinfo->ctrl_addr, &reg); in palmas_is_enabled_ldo()
672 static int palmas_regulator_config_external(struct palmas *palmas, int id, in palmas_regulator_config_external() argument
675 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_regulator_config_external()
679 ret = palmas_ext_control_req_config(palmas, rinfo->sleep_id, in palmas_regulator_config_external()
682 dev_err(palmas->dev, in palmas_regulator_config_external()
694 static int palmas_smps_init(struct palmas *palmas, int id, in palmas_smps_init() argument
699 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_smps_init()
703 ret = palmas_smps_read(palmas, addr, &reg); in palmas_smps_init()
732 ret = palmas_smps_write(palmas, addr, reg); in palmas_smps_init()
740 ret = palmas_smps_write(palmas, rinfo->vsel_addr, reg); in palmas_smps_init()
748 ret = palmas_smps_read(palmas, addr, &reg); in palmas_smps_init()
754 ret = palmas_smps_write(palmas, addr, reg); in palmas_smps_init()
758 return palmas_regulator_config_external(palmas, id, reg_init); in palmas_smps_init()
763 static int palmas_ldo_init(struct palmas *palmas, int id, in palmas_ldo_init() argument
769 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_ldo_init()
774 ret = palmas_ldo_read(palmas, addr, &reg); in palmas_ldo_init()
788 ret = palmas_ldo_write(palmas, addr, reg); in palmas_ldo_init()
794 ret = palmas_update_bits(palmas, PALMAS_LDO_BASE, in palmas_ldo_init()
798 dev_err(palmas->dev, in palmas_ldo_init()
803 return palmas_regulator_config_external(palmas, id, reg_init); in palmas_ldo_init()
808 static int palmas_extreg_init(struct palmas *palmas, int id, in palmas_extreg_init() argument
814 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_extreg_init()
822 ret = palmas_update_bits(palmas, PALMAS_RESOURCE_BASE, in palmas_extreg_init()
825 dev_err(palmas->dev, "Resource reg 0x%02x update failed %d\n", in palmas_extreg_init()
832 ret = palmas_update_bits(palmas, PALMAS_RESOURCE_BASE, in palmas_extreg_init()
836 dev_err(palmas->dev, in palmas_extreg_init()
841 return palmas_regulator_config_external(palmas, id, reg_init); in palmas_extreg_init()
846 static void palmas_enable_ldo8_track(struct palmas *palmas) in palmas_enable_ldo8_track() argument
851 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_enable_ldo8_track()
857 ret = palmas_ldo_read(palmas, addr, &reg); in palmas_enable_ldo8_track()
859 dev_err(palmas->dev, "Error in reading ldo8 control reg\n"); in palmas_enable_ldo8_track()
864 ret = palmas_ldo_write(palmas, addr, reg); in palmas_enable_ldo8_track()
866 dev_err(palmas->dev, "Error in enabling tracking mode\n"); in palmas_enable_ldo8_track()
875 ret = palmas_ldo_read(palmas, addr, &reg); in palmas_enable_ldo8_track()
877 dev_err(palmas->dev, "Error in reading ldo8 voltage reg\n"); in palmas_enable_ldo8_track()
882 ret = palmas_ldo_write(palmas, addr, reg); in palmas_enable_ldo8_track()
884 dev_err(palmas->dev, "Error in setting ldo8 voltage reg\n"); in palmas_enable_ldo8_track()
939 palmas_enable_ldo8_track(pmic->palmas); in palmas_ldo_registration()
993 ret = palmas_ldo_init(pmic->palmas, id, in palmas_ldo_registration()
996 ret = palmas_extreg_init(pmic->palmas, in palmas_ldo_registration()
1100 ret = palmas_ldo_init(pmic->palmas, in tps65917_ldo_registration()
1103 ret = palmas_extreg_init(pmic->palmas, in tps65917_ldo_registration()
1161 if (!PALMAS_PMIC_HAS(pmic->palmas, SMPS10_BOOST)) in palmas_smps_registration()
1172 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_smps_registration()
1185 ret = palmas_smps_init(pmic->palmas, id, reg_init); in palmas_smps_registration()
1227 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_smps_registration()
1248 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_smps_registration()
1311 ret = palmas_smps_init(pmic->palmas, id, reg_init); in tps65917_smps_registration()
1331 ret = palmas_smps_read(pmic->palmas, addr, &reg); in tps65917_smps_registration()
1354 ret = palmas_smps_read(pmic->palmas, addr, &reg); in tps65917_smps_registration()
1596 struct palmas *palmas = dev_get_drvdata(pdev->dev.parent); in palmas_regulators_probe() local
1625 pmic->palmas = palmas; in palmas_regulators_probe()
1626 palmas->pmic = pmic; in palmas_regulators_probe()
1628 pmic->palmas->pmic_ddata = driver_data; in palmas_regulators_probe()
1634 ret = palmas_smps_read(palmas, PALMAS_SMPS_CTRL, &reg); in palmas_regulators_probe()
1646 config.regmap = palmas->regmap[REGULATOR_SLAVE]; in palmas_regulators_probe()