 show ()    .    -
  ,      attr,  , 
   buffer.    PAGE_SIZE .  -
   PAGE_SIZE  4096 .   -
   ,       
,    ,    .

 store ()   .    size  -
   buffer   attr.     PAGE_SIZE 
.      ,  -
     ,       -
 .

        -  
,      , 
 ,    .

  

 ,       -
 ktype,    kobject,  . ,
  kobject     -     
     . ,    
            kobject.
    ,        -
        sysfs,   -
 .

    ,     kobject
   .      -
 ( )  ,      
.       sysfs_create_file () 
    .

int sysfs create file(struct kobject *kobj, const struct attribute *attr) ;

     attribute,   
 attr,   kobject,     kobj. 
    ,     (
 ).          -
    .

 ,       -
 sysfs_ops,   ktype .  , -
  show ()  store (),      ,
      .

 ,     .  -
     sysfs     
.

int sysfs create link(struct kobject *kobj,

struct kobject *target, char *name) ;

 kobject    sysfs 367