+/* Create templates for given types */This looks like trying to reimplement ioctl() in sysfs.
>+#define simple_show_union_struct_unsigned(regtype, propname)\
>+simple_show_union_struct(regtype, propname, "%u\n")
>+
>+#define simple_show_union_struct_unsigned2(regtype, reg_group, propname)\
>+simple_show_union_struct2(regtype, reg_group, propname, "%u\n")
>+
>+#define show_union_struct_unsigned(regtype, reg_group, propname)\
>+show_union_struct(regtype, reg_group, propname, "%u\n")
>+
>+#define show_store_union_struct_unsigned(regtype, reg_group, propname)\
>+show_store_union_struct(regtype, reg_group, propname, "%u\n")
>+
>+#define show_repeated_union_struct_unsigned(regtype, reg_group, propname)\
>+show_repeated_union_struct(regtype, reg_group, propname, "%u")
>+
>+#define show_store_repeated_union_struct_unsigned(regtype, reg_group, propname)\
>+show_store_repeated_union_struct(regtype, reg_group, propname, "%u")
>+
>+/* Remove access to raw format string versions */
>+/*#undef simple_show_union_struct
>+#undef show_union_struct_unsigned
>+#undef show_store_union_struct
>+#undef show_repeated_union_struct
>+#undef show_store_repeated_union_struct*/
If what you want is to send big structs in/out of the kernel,
use either ioctl() on device nodes (should be trivial since input
is using real device nodes) or use configfs.