'\" t .\" Title: subsys_virtual_register .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Device drivers infrastructure .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "SUBSYS_VIRTUAL_REGIS" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Device drivers infrastructure" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" subsys_virtual_register \- register a subsystem at /sys/devices/virtual/ .SH "SYNOPSIS" .HP \w'int\ subsys_virtual_register('u .BI "int subsys_virtual_register(struct\ bus_type\ *\ " "subsys" ", const\ struct\ attribute_group\ **\ " "groups" ");" .SH "ARGUMENTS" .PP \fIsubsys\fR .RS 4 virtual subsystem .RE .PP \fIgroups\fR .RS 4 default attributes for the root device .RE .SH "DESCRIPTION" .PP All \*(Aqvirtual\*(Aq subsystems have a /sys/devices/system/ root device with the name of the subystem\&. The root device can carry subsystem\-wide attributes\&. All registered devices are below this single root device\&. There\*(Aqs no restriction on device naming\&. This is for kernel software constructs which need sysfs interface\&. .SH "COPYRIGHT" .br