From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758028Ab2IEAi4 (ORCPT ); Tue, 4 Sep 2012 20:38:56 -0400 Received: from us-mx3.synaptics.com ([12.239.217.85]:26918 "EHLO us-mx3.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980Ab2IEAiy (ORCPT ); Tue, 4 Sep 2012 20:38:54 -0400 X-PGP-Universal: processed; by securemail.synaptics.com on Tue, 04 Sep 2012 17:10:33 -0700 Message-ID: <50469F1D.5000508@synaptics.com> Date: Tue, 4 Sep 2012 17:38:53 -0700 From: Christopher Heiny Organization: Synaptics, Inc User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.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 , Jonathan Cameron Subject: Re: [RFC PATCH 17/17] input: RMI4 F54 analog data reporting References: <1345241877-16200-1-git-send-email-cheiny@synaptics.com> <1345241877-16200-18-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 On 08/27/2012 04:01 PM, Linus Walleij wrote: > >> >Signed-off-by: Christopher Heiny >> >+#include >> >+#include >> >+#include >> >+#include >> >+#include >> >+#include > This is not using the existing in-kernel framework for ADC (which I think is > what you're doing), in this case use the IIO subsystem so consult > drivers/iio/adc and be inspired. > > Just exposing a set of weird sysfs files to userspace is not proper. I don't think the Industrial I/O ADC framework is appropriate for this. F54 isn't intended to provide access to a general purpose ADC feature, but rather for diagnostic access to the touchscreen's capacitive sense features, which results in a fairly weird (as you noticed) interface. Trying to hammer on it to fit into iio/adc would require a lot of effort, and wind up making it look like something it really isn't. However, it makes sense to move this whole interface to debugfs, given its intended model of use.