HID: roccat: Achieve userspace notification on sysfs attribute creation
Subsystems (3)
cover HID: roccat: Achieve userspace notification on sysfs attribute creation
Adding sysfs attributes to an already created device raises no userland notification.
Instead of fiddling around in the depths of busses and devices I reuse the event char device (module hid-roccat). This device gets now created with a hardware specific class that contains the device attributes.
For this I had to introduce support for binary attributes into struct class.
This is afaik the easiest way to achieve said goal. If these patches get applied I can upload a new version of my userland tools that is compatible with old and new drivers in an instant.
As there are quite a couple of unapplied patches flying around, I decided to base these patches on 2.6.37-rc2 and designed them to contain everything pending and so make all unapplied patches obsolete.
Jiri Kosina
AppliedQuoted 6 lines · Stefan Achatz
Adding sysfs attributes to an already created device raises no userland notification.
Instead of fiddling around in the depths of busses and devices I reuse the event char device (module hid-roccat). This device gets now created with a hardware specific class that contains the device attributes.
Hi Stefan,
I have applied the series, and removed the #pragma pack ugliness. Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
----- Original Nachricht ----
Von: Jiri Kosina <[email protected]> An: Stefan Achatz <[email protected]> Datum: 09.12.2010 14:30 Betreff: Re: [PATCH 0/5] HID: roccat: Achieve userspace notification on sysfs
attribute creation
Quoted 5 lines · Stefan Achatz
Quoted 4 lines
Adding sysfs attributes to an already created device raises no userland notification.
Quoted 8 lines
Quoted 1 line
Instead of fiddling around in the depths of busses and devices I reuse
the
Quoted 2 lines
event char device (module hid-roccat). This device gets now created with a hardware specific class that contains the device attributes.
Hi Stefan,
I have applied the series, and removed the #pragma pack ugliness. Thanks,
Hello Jiri,
Using my patch replacing the #pragma pack with the __packed macro would have saved you some time:
https://lkml.org/lkml/2010/11/27/14
Just for the future: Whats better using the verbose version __attribute__ ((__packed__)) or the macro __packed as I did?
Thanks, Stefan
Quoted 6 lines · Stefan Achatz
Quoted 1 line
I have applied the series, and removed the #pragma pack ugliness. Thanks,
Hello Jiri,
Using my patch replacing the #pragma pack with the__packedmacro would have saved you some time: https://lkml.org/lkml/2010/11/27/14
Ah, missed that. Never mind.
Quoted 2 lines
Just for the future: Whats better using the verbose version
__attribute__((__packed__)) or the macro__packedas I did?
I don't think I really care deeply here.
For some rationale why these shortcuts exist, please see commit 82ddcb0405704.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.