Index: ofw_regulator.c =================================================================== RCS file: /cvs/src/sys/dev/ofw/ofw_regulator.c,v retrieving revision 1.17 diff -u -p -r1.17 ofw_regulator.c --- ofw_regulator.c 1 Apr 2023 08:37:23 -0000 1.17 +++ ofw_regulator.c 6 Apr 2023 00:23:03 -0000 @@ -107,6 +107,14 @@ regulator_fixed_set(int node, int enable uint32_t startup_delay; int len; + /* + * This regulator may rely on another. That "parent" regulator + * may be used by multiple other devices/regulators, so unless + * we refcnt use of a shared regulator we can only turn it on. + */ + if (enable) + regulator_enable(OF_getpropint(node, "vin-supply", 0)); + pinctrl_byname(node, "default"); /* The "gpio" property is optional. */ @@ -128,7 +136,7 @@ regulator_fixed_set(int node, int enable */ gpio = malloc(len, M_TEMP, M_WAITOK); - OF_getpropintarray(node, "gpio", gpio, len); + OF_getpropintarray(node, prop, gpio, len); gpio_controller_config_pin(gpio, GPIO_CONFIG_OUTPUT); if (enable) gpio_controller_set_pin(gpio, 1);