subsys_system_register
Prev | Device Drivers Base | Next

## Name

subsys_system_register — register a subsystem at /sys/devices/system/

## Synopsis

`int subsys_system_register (` | struct bus_type * subsys,
| const struct attribute_group ** groups`)`;

## Arguments

`subsys`

  system subsystem

`groups`

  default attributes for the root device

## Description

All 'system' subsystems have a /sys/devices/system/<name> 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 explicitely named; only 'id' in the device needs to be set.

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/<name>.

Prev | Up | Next
subsys_dev_iter_exit | Home | subsys_virtual_register