Home | History | Annotate | Download | only in i2c

Lines Matching defs:regulator

127 	bool can_track;			/* regulator can track U of other r. */
128 struct tps_reg_param *tracked_reg; /* ptr to tracked regulator */
142 bool is_enabled; /* regulator is enabled */
143 bool is_pg; /* regulator is "power good" */
623 /* Read regulator state and save it to tps_reg_param. */
626 tps_reg_param *regulator)
633 if (regenable & (regulator->enable_bit))
634 regulator->is_enabled = true;
636 regulator->is_enabled = false;
641 regulator->defreg_num);
643 switch (regulator->nvoltages) {
645 voltage = regulator->voltages[defreg &
649 voltage = regulator->voltages[defreg &
653 voltage = regulator->voltages[defreg &
662 /* Handle regulator tracking other regulator voltage. */
663 if (regulator->can_track)
665 regulator->is_tracking = true;
666 voltage = 0; /* see regulator->tracked_reg */
669 /* Handle regulator configured into load switch mode. */
670 if (regulator->can_ls)
672 regulator->is_ls = true;
676 if (regulator->can_xadj)
678 regulator->is_xadj = true;
685 regulator->current_voltage = voltage;
830 "error attaching regulator sensor %d\n", i);
888 struct tps_reg_param *regulator = NULL;
893 regulator = &tps_regulators[i];
897 if (regulator == NULL)
900 if (regulator->voltage_min > mvolt || regulator->voltage_max < mvolt)
903 if (!regulator->is_enabled)
906 if (regulator->is_tracking)
909 if (regulator->is_xadj)
913 for (i = 0; i < regulator->nvoltages; i++) {
914 if (mvolt <= regulator->voltages[i]) {
918 KASSERT(i < regulator->nvoltages);
919 tps65217pmic_reg_write_l2(sc, regulator->defreg_num, i);
929 regulator->current_voltage = regulator->voltages[i];
961 compat_name = fdtbus_get_string(child, "regulator-compatible");
990 struct tps_reg_param *regulator = sc->sc_param;
1000 val |= regulator->enable_bit;
1002 val &= ~regulator->enable_bit;
1005 regulator->is_enabled = enable;
1017 struct tps_reg_param *regulator = sc->sc_param;
1024 error = tps65217pmic_set_volt(pmic_sc->sc_dev, regulator->name, min_uvol / 1000);
1035 struct tps_reg_param *regulator = sc->sc_param;
1037 *puvol = (u_int)regulator->current_voltage * 1000;
1070 regname = fdtbus_get_string(sc->sc_phandle, "regulator-name");
1072 regname = fdtbus_get_string(sc->sc_phandle, "regulator-compatible");