'\" t .\" Title: subsys_system_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_SYSTEM_REGIST" "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_system_register \- register a subsystem at /sys/devices/system/ .SH "SYNOPSIS" .HP \w'int\ subsys_system_register('u .BI "int subsys_system_register(struct\ bus_type\ *\ " "subsys" ", const\ struct\ attribute_group\ **\ " "groups" ");" .SH "ARGUMENTS" .PP \fIsubsys\fR .RS 4 system subsystem .RE .PP \fIgroups\fR .RS 4 default attributes for the root device .RE .SH "DESCRIPTION" .PP All \*(Aqsystem\*(Aq subsystems have a /sys/devices/system/ root device with the name of the subsystem\&. The root device can carry subsystem\- wide attributes\&. All registered devices are below this single root device and are named after the subsystem with a simple enumeration number appended\&. The registered devices are not explicitly named; only \*(Aqid\*(Aq in the device needs to be set\&. .PP Do not use this interface for anything new, it exists for compatibility with bad ideas only\&. New subsystems should use plain subsystems; and add the subsystem\-wide attributes should be added to the subsystem directory itself and not some create fake root\-device placed in /sys/devices/system/\&. .SH "COPYRIGHT" .br