• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/extres/regulator/

Lines Matching refs:regulator

50 #include <dev/extres/regulator/regulator.h>
54 SYSCTL_NODE(_hw, OID_AUTO, regulator, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
57 MALLOC_DEFINE(M_REGULATOR, "regulator", "Regulator framework");
62 struct regulator;
66 typedef TAILQ_HEAD(regulator_list, regulator) regulator_list_t;
68 /* Default regulator methods. */
115 phandle_t ofw_node; /* OFW node of regulator */
118 struct sx lock; /* Lock for this regulator */
128 * Per consumer data, information about how a consumer is using a regulator
132 struct regulator {
135 TAILQ_ENTRY(regulator) link; /* Consumers list entry */
175 printf("regulator: setting constraint on %s failed (%d)\n",
182 * Disable unused regulator
184 * regulator should have already enable them.
195 TUNABLE_INT_FETCH("hw.regulator.disable_unused", &disable);
201 printf("regulator: shutting down unused regulators\n");
207 printf("regulator: shutting down %s... ",
214 * shutdown if the regulator is simply
255 * Default regulator methods for base class.
350 * Create and initialize regulator object, but do not register it.
359 KASSERT(def->name != NULL, ("regulator name is NULL"));
360 KASSERT(def->name[0] != '\0', ("regulator name is empty"));
364 panic("Duplicated regulator registration: %s\n", def->name);
406 CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "A regulator node");
442 "The regulator enable counter");
465 /* Register regulator object. */
610 * Enable regulator.
620 /* Enable regulator for each node in chain, starting from source. */
646 * Disable regulator.
658 /* Disable regulator for each node in chain, starting from consumer. */
681 * Stop regulator.
698 /* Disable regulator for each node in chain, starting from consumer */
719 * Get regulator status. (REGULATOR_STATUS_*)
735 * Get actual regulator voltage.
748 /* Pass call into parent, if regulator is in bypass mode. */
761 * Set regulator voltage.
784 regnode_set_voltage_checked(struct regnode *regnode, struct regulator *reg,
790 struct regulator *tmp;
796 /* Return error if requested range is outside of regulator range. */
847 printf("Cannot get regulator status for %s\n",
858 printf("Cannot get regulator voltage for %s\n",
877 printf("Cannot enable regulator %s\n",
903 struct regulator *reg;
907 reg = malloc(sizeof(struct regulator), M_REGULATOR,
931 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
948 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
950 ("Attempt to disable already disabled regulator: %s\n",
968 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
970 ("Attempt to stop already enabled regulator: %s\n", regnode->name));
986 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
1002 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
1018 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
1039 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
1054 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
1099 ("Attempt to access unreferenced regulator: %s\n", regnode->name));
1140 rv = OF_getprop_alloc(node, "regulator-name",
1143 device_printf(pdev, "%s: Missing regulator name\n",
1148 rv = OF_getencprop(node, "regulator-min-microvolt", &par->min_uvolt,
1153 rv = OF_getencprop(node, "regulator-max-microvolt", &par->max_uvolt,
1158 rv = OF_getencprop(node, "regulator-min-microamp", &par->min_uamp,
1163 rv = OF_getencprop(node, "regulator-max-microamp", &par->max_uamp,
1168 rv = OF_getencprop(node, "regulator-ramp-delay", &par->ramp_delay,
1173 rv = OF_getencprop(node, "regulator-enable-ramp-delay",
1178 if (OF_hasprop(node, "regulator-boot-on"))
1181 if (OF_hasprop(node, "regulator-always-on"))
1190 rv = OF_getprop_alloc(supply_xref, "regulator-name",
1230 /* Map regulator to number */
1254 panic("Voltage regulator have zero ranges\n");
1282 panic("Voltage regulator have zero ranges\n");