Lines Matching refs:kset

36  - A kset is a group of kobjects.  These kobjects can be of the same ktype
37 or belong to different ktypes. The kset is the basic container type for
39 safely ignore that implementation detail as the kset core code handles
43 of those directories corresponds to a kobject in the same kset.
131 properly. If the kobject is to be associated with a specific kset,
132 kobj->kset must be assigned before calling kobject_add(). If a kset is
135 kset itself.
325 A kset is merely a collection of kobjects that want to be associated with
329 A kset serves these functions:
331 - It serves as a bag containing a group of objects. A kset can be used by
334 - A kset is also a subdirectory in sysfs, where the associated kobjects
335 with the kset can show up. Every kset contains a kobject which can be
342 In object-oriented terms, "kset" is the top-level container class; ksets
343 contain their own kobject, but that kobject is managed by the kset code and
346 A kset keeps its children in a standard kernel linked list. Kobjects point
347 back to their containing kset via their kset field. In almost all cases,
348 the kobjects belonging to a kset have that kset (or, strictly, its embedded
351 As a kset contains a kobject within it, it should always be dynamically
353 kset use::
355 struct kset *kset_create_and_add(const char *name,
359 When you are finished with the kset, call::
361 void kset_unregister(struct kset *k);
363 to destroy it. This removes the kset from sysfs and decrements its reference
364 count. When the reference count goes to zero, the kset will be released.
365 Because other references to the kset may still exist, the release may happen
368 An example of using a kset can be seen in the
369 ``samples/kobject/kset-example.c`` file in the kernel tree.
371 If a kset wishes to control the uevent operations of the kobjects
381 The filter function allows a kset to prevent a uevent from being emitted to
385 The name function will be called to override the default name of the kset
387 as the kset itself, but this function, if present, can override that name.
392 One might ask how, exactly, a kobject is added to a kset, given that no
395 kobject_add(), its kset member should point to the kset to which the
398 If the kobject belonging to a kset has no parent kobject set, it will be
399 added to the kset's directory. Not all members of a kset do necessarily
400 live in the kset directory. If an explicit parent kobject is assigned
401 before the kobject is added, the kobject is registered with the kset, but
433 example programs ``samples/kobject/{kobject-example.c,kset-example.c}``,