lkml.org 
[lkml]   [2008]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: hid class and sysfs/hwmon
Adam Nielsen napsal(a):
>>> If anyone can see why this might result in no sysfs files, please let me
>>> know! I previously had most of this code working with a platform_device
>>> instead of the hid_device, which is what makes me wonder about
>>> hdev->dev.kobj. (Not sure how to test if that variable is accurate,
>>> either.) Or perhaps it has already been used elsewhere and it can only
>>> be used once?
>>
>> I suppose it's under /sys/bus/hid/devices/.../, isn't it?
>
> Aha, yes! I didn't even think of checking there. I suppose this means
> I have to create another device (like a platform_device) in order to
> have the sysfs files appear in the correct place?
>
> Is a platform_device the correct type to create, or is there another way?

I don't know much about hwmon, but I would guess you should use hwmon_dev
for registering the attributes if you want it under /sys/class/hwmon/...

Such as:
sysfs_create_group(&odin_psu->hwmon_dev->kobj, &odin_attr_group);

No?


\
 
 \ /
  Last update: 2008-11-08 22:53    [from the cache]
©2003-2011 Jasper Spaans