Lines Matching refs:as3722_regs
335 struct as3722_regulators *as3722_regs = rdev_get_drvdata(rdev); in as3722_ldo_get_current_limit() local
336 struct as3722 *as3722 = as3722_regs->as3722; in as3722_ldo_get_current_limit()
343 dev_err(as3722_regs->dev, "Reg 0x%02x read failed: %d\n", in as3722_ldo_get_current_limit()
355 struct as3722_regulators *as3722_regs = rdev_get_drvdata(rdev); in as3722_ldo_set_current_limit() local
356 struct as3722 *as3722 = as3722_regs->as3722; in as3722_ldo_set_current_limit()
364 dev_err(as3722_regs->dev, in as3722_ldo_set_current_limit()
489 struct as3722_regulators *as3722_regs = rdev_get_drvdata(rdev); in as3722_sd_get_mode() local
490 struct as3722 *as3722 = as3722_regs->as3722; in as3722_sd_get_mode()
500 dev_err(as3722_regs->dev, "Reg 0x%02x read failed: %d\n", in as3722_sd_get_mode()
514 struct as3722_regulators *as3722_regs = rdev_get_drvdata(rdev); in as3722_sd_set_mode() local
515 struct as3722 *as3722 = as3722_regs->as3722; in as3722_sd_set_mode()
535 dev_err(as3722_regs->dev, "Reg 0x%02x update failed: %d\n", in as3722_sd_set_mode()
544 struct as3722_regulators *as3722_regs = rdev_get_drvdata(rdev); in as3722_sd016_get_current_limit() local
545 struct as3722 *as3722 = as3722_regs->as3722; in as3722_sd016_get_current_limit()
569 dev_err(as3722_regs->dev, "Reg 0x%02x read failed: %d\n", in as3722_sd016_get_current_limit()
583 struct as3722_regulators *as3722_regs = rdev_get_drvdata(rdev); in as3722_sd016_set_current_limit() local
584 struct as3722 *as3722 = as3722_regs->as3722; in as3722_sd016_set_current_limit()
594 dev_err(as3722_regs->dev, in as3722_sd016_set_current_limit()
621 static bool as3722_sd0_is_low_voltage(struct as3722_regulators *as3722_regs) in as3722_sd0_is_low_voltage() argument
626 err = as3722_read(as3722_regs->as3722, AS3722_FUSE7_REG, &val); in as3722_sd0_is_low_voltage()
628 dev_err(as3722_regs->dev, "Reg 0x%02x read failed: %d\n", in as3722_sd0_is_low_voltage()
690 static int as3722_extreg_init(struct as3722_regulators *as3722_regs, int id, in as3722_extreg_init() argument
701 ret = as3722_update_bits(as3722_regs->as3722, in as3722_extreg_init()
705 dev_err(as3722_regs->dev, "Reg 0x%02x update failed: %d\n", in as3722_extreg_init()
732 struct as3722_regulators *as3722_regs) in as3722_get_regulator_dt_data() argument
759 reg_config = &as3722_regs->reg_config_data[id]; in as3722_get_regulator_dt_data()
784 struct as3722_regulators *as3722_regs; in as3722_regulator_probe() local
792 as3722_regs = devm_kzalloc(&pdev->dev, sizeof(*as3722_regs), in as3722_regulator_probe()
794 if (!as3722_regs) in as3722_regulator_probe()
797 as3722_regs->dev = &pdev->dev; in as3722_regulator_probe()
798 as3722_regs->as3722 = as3722; in as3722_regulator_probe()
799 platform_set_drvdata(pdev, as3722_regs); in as3722_regulator_probe()
801 ret = as3722_get_regulator_dt_data(pdev, as3722_regs); in as3722_regulator_probe()
806 config.driver_data = as3722_regs; in as3722_regulator_probe()
810 reg_config = &as3722_regs->reg_config_data[id]; in as3722_regulator_probe()
812 as3722_regs->desc[id].name = as3722_reg_lookup[id].name; in as3722_regulator_probe()
813 as3722_regs->desc[id].supply_name = as3722_reg_lookup[id].sname; in as3722_regulator_probe()
814 as3722_regs->desc[id].id = as3722_reg_lookup[id].regulator_id; in as3722_regulator_probe()
815 as3722_regs->desc[id].n_voltages = in as3722_regulator_probe()
817 as3722_regs->desc[id].type = REGULATOR_VOLTAGE; in as3722_regulator_probe()
818 as3722_regs->desc[id].owner = THIS_MODULE; in as3722_regulator_probe()
819 as3722_regs->desc[id].enable_reg = in as3722_regulator_probe()
821 as3722_regs->desc[id].enable_mask = in as3722_regulator_probe()
823 as3722_regs->desc[id].vsel_reg = as3722_reg_lookup[id].vsel_reg; in as3722_regulator_probe()
824 as3722_regs->desc[id].vsel_mask = in as3722_regulator_probe()
832 as3722_regs->desc[id].min_uV = 825000; in as3722_regulator_probe()
833 as3722_regs->desc[id].uV_step = 25000; in as3722_regulator_probe()
834 as3722_regs->desc[id].linear_min_sel = 1; in as3722_regulator_probe()
835 as3722_regs->desc[id].enable_time = 500; in as3722_regulator_probe()
842 as3722_regs->desc[id].min_uV = 620000; in as3722_regulator_probe()
843 as3722_regs->desc[id].uV_step = 20000; in as3722_regulator_probe()
844 as3722_regs->desc[id].linear_min_sel = 1; in as3722_regulator_probe()
845 as3722_regs->desc[id].enable_time = 500; in as3722_regulator_probe()
847 ret = as3722_ldo3_set_tracking_mode(as3722_regs, in as3722_regulator_probe()
862 as3722_regs->desc[id].enable_time = 500; in as3722_regulator_probe()
863 as3722_regs->desc[id].bypass_reg = in as3722_regulator_probe()
865 as3722_regs->desc[id].bypass_mask = in as3722_regulator_probe()
867 as3722_regs->desc[id].bypass_val_on = in as3722_regulator_probe()
869 as3722_regs->desc[id].bypass_val_off = in as3722_regulator_probe()
871 as3722_regs->desc[id].linear_ranges = as3722_ldo_ranges; in as3722_regulator_probe()
872 as3722_regs->desc[id].n_linear_ranges = in as3722_regulator_probe()
883 as3722_sd0_is_low_voltage(as3722_regs)) { in as3722_regulator_probe()
884 as3722_regs->desc[id].n_voltages = in as3722_regulator_probe()
886 as3722_regs->desc[id].min_uV = 410000; in as3722_regulator_probe()
888 as3722_regs->desc[id].n_voltages = in as3722_regulator_probe()
890 as3722_regs->desc[id].min_uV = 610000; in as3722_regulator_probe()
892 as3722_regs->desc[id].uV_step = 10000; in as3722_regulator_probe()
893 as3722_regs->desc[id].linear_min_sel = 1; in as3722_regulator_probe()
894 as3722_regs->desc[id].enable_time = 600; in as3722_regulator_probe()
904 as3722_regs->desc[id].linear_ranges = in as3722_regulator_probe()
906 as3722_regs->desc[id].n_linear_ranges = in as3722_regulator_probe()
914 as3722_regs->desc[id].enable_time = 500; in as3722_regulator_probe()
915 as3722_regs->desc[id].linear_ranges = as3722_ldo_ranges; in as3722_regulator_probe()
916 as3722_regs->desc[id].n_linear_ranges = in as3722_regulator_probe()
920 as3722_regs->desc[id].ops = ops; in as3722_regulator_probe()
924 &as3722_regs->desc[id], &config); in as3722_regulator_probe()
932 as3722_regs->rdevs[id] = rdev; in as3722_regulator_probe()
941 ret = as3722_extreg_init(as3722_regs, id, in as3722_regulator_probe()