Lines Matching refs:palmas

398 static int palmas_smps_read(struct palmas *palmas, unsigned int reg,  in palmas_smps_read()  argument
405 return regmap_read(palmas->regmap[REGULATOR_SLAVE], addr, dest); in palmas_smps_read()
408 static int palmas_smps_write(struct palmas *palmas, unsigned int reg, in palmas_smps_write() argument
415 return regmap_write(palmas->regmap[REGULATOR_SLAVE], addr, value); in palmas_smps_write()
418 static int palmas_ldo_read(struct palmas *palmas, unsigned int reg, in palmas_ldo_read() argument
425 return regmap_read(palmas->regmap[REGULATOR_SLAVE], addr, dest); in palmas_ldo_read()
428 static int palmas_ldo_write(struct palmas *palmas, unsigned int reg, in palmas_ldo_write() argument
435 return regmap_write(palmas->regmap[REGULATOR_SLAVE], addr, value); in palmas_ldo_write()
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()
473 palmas_smps_write(pmic->palmas, rinfo->ctrl_addr, reg); in palmas_set_mode_smps()
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()
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()
673 static int palmas_regulator_config_external(struct palmas *palmas, int id, in palmas_regulator_config_external() argument
676 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_regulator_config_external()
680 ret = palmas_ext_control_req_config(palmas, rinfo->sleep_id, in palmas_regulator_config_external()
683 dev_err(palmas->dev, in palmas_regulator_config_external()
695 static int palmas_smps_init(struct palmas *palmas, int id, in palmas_smps_init() argument
700 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_smps_init()
704 ret = palmas_smps_read(palmas, addr, &reg); in palmas_smps_init()
733 ret = palmas_smps_write(palmas, addr, reg); in palmas_smps_init()
741 ret = palmas_smps_write(palmas, rinfo->vsel_addr, reg); in palmas_smps_init()
749 ret = palmas_smps_read(palmas, addr, &reg); in palmas_smps_init()
755 ret = palmas_smps_write(palmas, addr, reg); in palmas_smps_init()
759 return palmas_regulator_config_external(palmas, id, reg_init); in palmas_smps_init()
764 static int palmas_ldo_init(struct palmas *palmas, int id, in palmas_ldo_init() argument
770 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_ldo_init()
775 ret = palmas_ldo_read(palmas, addr, &reg); in palmas_ldo_init()
789 ret = palmas_ldo_write(palmas, addr, reg); in palmas_ldo_init()
795 ret = palmas_update_bits(palmas, PALMAS_LDO_BASE, in palmas_ldo_init()
799 dev_err(palmas->dev, in palmas_ldo_init()
804 return palmas_regulator_config_external(palmas, id, reg_init); in palmas_ldo_init()
809 static int palmas_extreg_init(struct palmas *palmas, int id, in palmas_extreg_init() argument
815 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_extreg_init()
823 ret = palmas_update_bits(palmas, PALMAS_RESOURCE_BASE, in palmas_extreg_init()
826 dev_err(palmas->dev, "Resource reg 0x%02x update failed %d\n", in palmas_extreg_init()
833 ret = palmas_update_bits(palmas, PALMAS_RESOURCE_BASE, in palmas_extreg_init()
837 dev_err(palmas->dev, in palmas_extreg_init()
842 return palmas_regulator_config_external(palmas, id, reg_init); in palmas_extreg_init()
847 static void palmas_enable_ldo8_track(struct palmas *palmas) in palmas_enable_ldo8_track() argument
852 struct palmas_pmic_driver_data *ddata = palmas->pmic_ddata; in palmas_enable_ldo8_track()
858 ret = palmas_ldo_read(palmas, addr, &reg); in palmas_enable_ldo8_track()
860 dev_err(palmas->dev, "Error in reading ldo8 control reg\n"); in palmas_enable_ldo8_track()
865 ret = palmas_ldo_write(palmas, addr, reg); in palmas_enable_ldo8_track()
867 dev_err(palmas->dev, "Error in enabling tracking mode\n"); in palmas_enable_ldo8_track()
876 ret = palmas_ldo_read(palmas, addr, &reg); in palmas_enable_ldo8_track()
878 dev_err(palmas->dev, "Error in reading ldo8 voltage reg\n"); in palmas_enable_ldo8_track()
883 ret = palmas_ldo_write(palmas, addr, reg); in palmas_enable_ldo8_track()
885 dev_err(palmas->dev, "Error in setting ldo8 voltage reg\n"); in palmas_enable_ldo8_track()
940 palmas_enable_ldo8_track(pmic->palmas); 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()
1101 ret = palmas_ldo_init(pmic->palmas, in tps65917_ldo_registration()
1104 ret = palmas_extreg_init(pmic->palmas, in tps65917_ldo_registration()
1162 if (!PALMAS_PMIC_HAS(pmic->palmas, SMPS10_BOOST)) in palmas_smps_registration()
1173 ret = palmas_smps_read(pmic->palmas, addr, &reg); 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()
1249 ret = palmas_smps_read(pmic->palmas, addr, &reg); in palmas_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()
1355 ret = palmas_smps_read(pmic->palmas, addr, &reg); in tps65917_smps_registration()
1597 struct palmas *palmas = dev_get_drvdata(pdev->dev.parent); in palmas_regulators_probe() local
1629 pmic->palmas = palmas; in palmas_regulators_probe()
1630 palmas->pmic = pmic; in palmas_regulators_probe()
1632 pmic->palmas->pmic_ddata = driver_data; in palmas_regulators_probe()
1638 ret = palmas_smps_read(palmas, PALMAS_SMPS_CTRL, &reg); in palmas_regulators_probe()
1650 config.regmap = palmas->regmap[REGULATOR_SLAVE]; in palmas_regulators_probe()