Using binary attributes for configuration sysfs entries

Jay Aurabind jay.aurabind at gmail.com
Wed Mar 13 02:32:02 EDT 2019


Hi,

Before I send this patch to actual mailing list, I'd appreciate if
someone could tell me if this is a bad idea!

The driver in staging for pi433 (a wireless transceiver) uses IOCTLs
at the moment. I wish to add a sysfs interface to it that control the
various transmission and reception parameters. In the ioctl interface,
it uses two structs that have about 40 parameters in total.

For the corresponding sysfs interface, since there are a lot of
parameters, would it be justified to use the same binary format though
sysfs_create_binary_file() ? The rationale is that it would be easier
to simply pack all the config options in the struct and send it in
once rather than individually write 40 files. This is what the
attached patch follows. Interface is added only for reception
parameters as of now.

Any others suggestions welcome!


-- 

Thanks and Regards,
Jay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-staging-pi433-register-sysfs-i-f-for-rx-config.patch
Type: text/x-patch
Size: 3340 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20190313/6ace414b/attachment-0001.bin>


More information about the Kernelnewbies mailing list