lkml.org 
[lkml]   [2014]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectCreating sysfs class for all my misc devices
I'm running into a road block trying to create a sysfs class for all my
misc devices I've created. I currently have a few (3-5) misc devices
that I want to group together in a class.


I've registered my misc devices, but I'm unsure how to associate them
with my new class I created. I want all my misc devices to be
associated with /sys/class/logger class.


I've created the class via:

logger_class = class_create(THIS_MODULE, "logger");
ret = PTR_ERR(logger_class);
if (IS_ERR(logger_class))
goto out;

But after the call to misc_register i'm not sure how to proceed. Is
this even possible or I'm I totally off on this. Or can a device only
be registered to at most one class and since its a misc device its
already associated with the misc class?

I've searched the linux source tree and haven't found anything.

Any help or pointers on this would be greatly appreciated.

Thanks,









\
 
 \ /
  Last update: 2014-06-22 20:21    [W:0.140 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site