PowerOP, PowerOP Sysfs 2/3
PATCH 1/1 PowerOP, PowerOP Sysfs 2/3
Reference SysFS code for PowerOP
drivers/powerop/Kconfig +5 -0
@@ -8,5 +8,10 @@ config POWEROP bool "PowerOP Core" help +config POWEROP_SYSFS + bool " Enable PowerOP sysfs interface" + depends on POWEROP && SYSFS + help + endmenu
drivers/powerop/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_POWEROP) += powerop.o +obj-$(CONFIG_POWEROP_SYSFS) += powerop_sysfs.o
drivers/powerop/powerop_sysfs.c new file +99 -0
99 lines not on this page · raw message
Quoted 7 lines · Eugeny S. Mints
Reference SysFS code for PowerOP
drivers/powerop/Kconfig +0
-0
drivers/powerop/Kconfig config POWEROP · line 14
Quoted 7 lines
drivers/powerop/Kconfig +4
-0@@ -8,5 +8,10 @@ config POWEROP bool "PowerOP Core" help +config POWEROP_SYSFS + bool " Enable PowerOP sysfs interface" + depends on POWEROP && SYSFS + help
Why would you not want this? Why not always force it enabled?
drivers/powerop/Kconfig config POWEROP
Quoted 12 lines
drivers/powerop/Kconfig +12
-0+static ssize_t active_store(struct subsystem * subsys, const char * buf, + size_t n) +{ + int error; + + error = powerop_set_point(buf); + if (error != 0) + return error; + + strcpy(active_name, buf); + return n; +}
This seems to be an abuse of the "one value per file" rule of sysfs, right?
drivers/powerop/Kconfig
Quoted 1 line
drivers/powerop/Kconfig +1
-0+ if ((error = subsystem_register(&powerop_subsys))) {
So now there is both a /sys/power and /sys/powerop? That will be confusing for everyone, why not just use the /sys/power place?
thanks,
greg k-h