msm: subsystem_restart: Add a device node for each subsystem

Add a device node for each subsystem to help in trouble-free
ref counting by associating subsystem_get() with open() and
subsystem_put() with close() on the device file. This allows
userspace to power up/down subsystems directly. This should be
exposed via a userspace library and friendlier APIs. Having a
device node is a better idea than having debugfs nodes because
even if the user space process gets killed all open()'ed file
descriptors for that process will close()'ed automatically.
The same can't be said of debugfs nodes which we currently
have now. Besides, debugfs nodes may or may not be available
on commercial builds. So, add a device node for each subsystem.

Change-Id: I7a105ab7217245afb3b7702245647f57d32174c8
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
1 file changed