From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751710Ab2IYXxf (ORCPT ); Tue, 25 Sep 2012 19:53:35 -0400 Received: from us-mx3.synaptics.com ([12.239.217.85]:50458 "EHLO us-mx3.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898Ab2IYXxe (ORCPT ); Tue, 25 Sep 2012 19:53:34 -0400 X-PGP-Universal: processed; by securemail.synaptics.com on Tue, 25 Sep 2012 16:22:32 -0700 Message-ID: <506243FB.8010408@synaptics.com> Date: Tue, 25 Sep 2012 16:53:31 -0700 From: Christopher Heiny Organization: Synaptics, Inc User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Linus Walleij CC: Dmitry Torokhov , Jean Delvare , Linux Kernel , Linux Input , Allie Xiong , William Manson , Peichen Chang , Joerie de Gram , Wolfram Sang , Mathieu Poirier , Linus Walleij , Naveen Kumar Gaddipati , Greg KH , "Rafael J. Wysocki" , Magnus Damm Subject: Re: [RFC PATCH 2/17] input: RMI4 core bus and sensor drivers. References: <1345241877-16200-1-git-send-email-cheiny@synaptics.com> <1345241877-16200-3-git-send-email-cheiny@synaptics.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry about the delay in following up on this one - we're going over the feedback, and realized we'd missed this comment. On 08/23/2012 01:55 AM, Linus Walleij wrote: >> +/* Create templates for given types */ >> >+#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*/ > This looks like trying to reimplement ioctl() in sysfs. > > 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. I'm a little confused. There's repeated emphasis in the kernel doc that you shouldn't use ioctl() anymore - use sysfs instead. So we've been using sysfs, though it seems somewhat klutzy. If it's actually OK to use ioctl(), that could simplify things. On the other hand, using configfs might be more appropriate.