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.
128 properly. If the kobject is to be associated with a specific kset,
129 kobj->kset must be assigned before calling kobject_add(). If a kset is
132 kset itself.
310 A kset is merely a collection of kobjects that want to be associated with
314 A kset serves these functions:
316 - It serves as a bag containing a group of objects. A kset can be used by
319 - A kset is also a subdirectory in sysfs, where the associated kobjects
320 with the kset can show up. Every kset contains a kobject which can be
327 In object-oriented terms, "kset" is the top-level container class; ksets
328 contain their own kobject, but that kobject is managed by the kset code and
331 A kset keeps its children in a standard kernel linked list. Kobjects point
332 back to their containing kset via their kset field. In almost all cases,
333 the kobjects belonging to a kset have that kset (or, strictly, its embedded
336 As a kset contains a kobject within it, it should always be dynamically
338 kset use:
339 struct kset *kset_create_and_add(const char *name,
343 When you are finished with the kset, call:
344 void kset_unregister(struct kset *kset);
345 to destroy it. This removes the kset from sysfs and decrements its reference
346 count. When the reference count goes to zero, the kset will be released.
347 Because other references to the kset may still exist, the release may happen
350 An example of using a kset can be seen in the
351 samples/kobject/kset-example.c file in the kernel tree.
353 If a kset wishes to control the uevent operations of the kobjects
357 int (*filter)(struct kset *kset, struct kobject *kobj);
358 const char *(*name)(struct kset *kset, struct kobject *kobj);
359 int (*uevent)(struct kset *kset, struct kobject *kobj,
364 The filter function allows a kset to prevent a uevent from being emitted to
368 The name function will be called to override the default name of the kset
370 as the kset itself, but this function, if present, can override that name.
375 One might ask how, exactly, a kobject is added to a kset, given that no
378 kobject_add(), its kset member should point to the kset to which the
381 If the kobject belonging to a kset has no parent kobject set, it will be
382 added to the kset's directory. Not all members of a kset do necessarily
383 live in the kset directory. If an explicit parent kobject is assigned
384 before the kobject is added, the kobject is registered with the kset, but
414 example programs samples/kobject/{kobject-example.c,kset-example.c},