[PATCH v2 1/2] kernel: modules: package userspace consumer regulator
Tomasz Maciej Nowak
tmn505 at terefe.re
Thu May 29 13:15:15 PDT 2025
From: Tomasz Maciej Nowak <tmn505 at gmail.com>
Allows to enable/disable attached regulators from userspace, i.e. by
simply writing value to a sysfs exported state file. Useful in case of
USB port VBUS toggled by GPIO.
Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
package/kernel/linux/modules/other.mk | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
v1 -> v2
* load module before USB drivers as in some cases user could want USB
devices be present at earlier time
diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index 61e395813b6b..ce9fdcc79b26 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -1060,3 +1060,20 @@ define KernelPackage/mhi-pci-generic/description
endef
$(eval $(call KernelPackage,mhi-pci-generic))
+
+
+define KernelPackage/regulator-userspace-consumer
+ SUBMENU:=$(OTHER_MENU)
+ TITLE:=Userspace regulator consumer support
+ KCONFIG:=CONFIG_REGULATOR_USERSPACE_CONSUMER
+ FILES:=$(LINUX_DIR)/drivers/regulator/userspace-consumer.ko
+ AUTOLOAD:=$(call AutoLoad,10,userspace-consumer,1)
+endef
+
+define KernelPackage/regulator-userspace-consumer/description
+ There are some classes of devices that are controlled entirely
+ from user space. Userspace consumer driver provides ability to
+ control power supplies for such devices.
+endef
+
+$(eval $(call KernelPackage,regulator-userspace-consumer))
--
2.49.0
More information about the openwrt-devel
mailing list