Received: by 10.192.165.148 with SMTP id m20csp2326680imm; Sun, 6 May 2018 12:05:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZor8+Waj9+7LYK0vyf/WaXyI4x+Zic2SN1P/RDihD2JFptLb6OKSADQRzCLclKQpoLle/Hq X-Received: by 10.98.131.69 with SMTP id h66mr34618062pfe.0.1525633547622; Sun, 06 May 2018 12:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525633547; cv=none; d=google.com; s=arc-20160816; b=TVIbAEIu46azzn1GjLPD23UTFWtCXV5jHKhKAIFhreParRk9Qd5HIsjhinqjJLBkwX HUaDfJocIL6FDGCp5Dk7/Txa3lzX/z6XHfAXWUBCr8E/xjjhgRfRRc3tuuuJfqWJz3ym L0dKo4h2LjnG8ciK5CBapgPShBhlYF1k4jC1CM1VL4lmZjazmfLGiD2wPZtdox/cF1v+ 6ViX2VprlqpDFbG3q+en/f3yuojHQLxve9LBXKfTZ/jLTP6SAlSZjbjdKD3FkB95yT9S OL1zMhjMEfL4AzEF2iNuMsTwWMvfVzywWDyRvXakuo20Rjd3IfDmKIvHix2h3gH+nD75 5pQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=dg3LqYO7SbwO6A+pGVK0iOtI4akH2ZwAc82pAB8s9nA=; b=wXiDPuilj3MKaYQ+jCCGmbqrXrsfptxjkOaMvyimv0cHq4xfSAmCm15Pe0LxZrflNZ i0GQaiVkifuQ6LGnIODl7Ie9DsvyMKPbAYVzJbvnDsM1yN9Vz32mlqmBVfZvBLs3eUex F7M+pNiTilx7oMTJRajPd0UTqP9tidhKLJAi7DwP09jN/u1L9pH/ORvUMzP9HFh00yig nuSmn5Hp0Erweku7xb5tcAQv/TXNBjHws3Z1JE7x3OYVMXOG/lthlxV6N1EaQUXKxCi/ HbvIQmLVUIR+DNUuO6+cXZGjscxCGXrD1iEJgzk4u2d8ILqOwya8egFd9yh79AMeIJDg WpZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l9AZgU4v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12-v6si18290821plk.327.2018.05.06.12.05.32; Sun, 06 May 2018 12:05:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l9AZgU4v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878AbeEFTEL (ORCPT + 99 others); Sun, 6 May 2018 15:04:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:36006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbeEFTEI (ORCPT ); Sun, 6 May 2018 15:04:08 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E7D5121721; Sun, 6 May 2018 19:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1525633448; bh=vz0wtsn3N16P91kqRUnT3flP5tZqwnhzlujb+HdhgY4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=l9AZgU4v7crM+6p0APs3zI7LSsOoyy99QJiT7R0XTJIxkbK4xDGHCkL2TpsZC4LuF LyuTX+Wgox91+KtBW0dB96WKngpZmgzB7L1pKf43xqpLDlszbVx74LNxHStblsNjLz g3m/kFbGF/qKQznJPqb1rTapv2veW/DP36gJob9E= Date: Sun, 6 May 2018 20:04:02 +0100 From: Jonathan Cameron To: Eugen Hristev Cc: , , , , , , , , , Subject: Re: [PATCH v4 0/9] Add support for SAMA5D2 touchscreen Message-ID: <20180506200402.4068c967@archlinux> In-Reply-To: <1525084335-11276-1-git-send-email-eugen.hristev@microchip.com> References: <1525084335-11276-1-git-send-email-eugen.hristev@microchip.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 30 Apr 2018 13:32:06 +0300 Eugen Hristev wrote: > Hello, > > This patch series is a rework of my previous series named: > [PATCH 00/14] iio: triggers: add consumer support > > This is the version 4 of the series, and addresses the received feedback > on the v2 series named: > [PATCH v2 00/10] Add support for SAMA5D2 touchscreen > and the v3 series named > [PATCH v3 00/11] Add support for SAMA5D2 touchscreen > > This series applies on top of fixes-togreg branch of iio.git, > specifically on top of commit: > "f0c8d1f" : iio: adc: at91-sama5d2_adc: > fix channel configuration for differential channels > > Changes in v3 and v4 are presented at the end of the cover letter below. > Thanks everyone for the feedback. Below is the original v2 cover letter: > > In few words, this is the implementation of splitting the functionality > of the IP block ADC device in SAMA5D2 SoC from ADC with touchscreen > support. In order to avoid having a MFD device, two separate > drivers that would work on same register base and split the IRQ,etc, > as advised on the mailing list, I created a consumer driver for the > channels, that will connect to the ADC as described in the device tree. > > I have collected feedback from everyone and here is the result: > I have added a new generic resistive touchscreen driver, which acts > as a iio consumer for the given channels and will create an input > device and report the events. It uses a callback buffer to register > to the IIO device and waits for data to be pushed. > Inside the IIO device, I have kept a similar approach with the first version > of the series, except that now the driver can take multiple buffers, and > will configure the touchscreen part of the hardware device if the specific > channels are requested. > > The SAMA5D2 ADC driver registers three new channels: two for the > position on the X and Y axis, and one for the touch pressure. > When channels are requested, it will check if the touchscreen channel mask > includes the requested channels (it is possible that the consumer driver > will not request pressure for example). If it's the case, it will work > in touchscreen mode, and will refuse to do usual analog-digital conversion, > because we have a single trigger and the touchscreen needs it. > When the scan mask will include only old channels, the driver will function > in the same way as before. If the scan mask somehow is a mix of the two (the > masks intersect), the driver will refuse to work whatsoever (cannot have both > in the same time). > The driver allows reading raw data for the new channels, if claim direct > mode works: no touchscreen driver requested anything. The new channels can > act like the old ones. However, when requesting these channels, the usual > trigger will not work and will not be enabled. The touchscreen channels > require special trigger and irq configuration: pen detect, no pen detect > and a periodic trigger to sample the touchscreen position and pressure. > If the user attempts to use another trigger while there is a buffer > that already requested the touchscreen channels (thus the trigger), the > driver will refuse to comply. > > In order to have defines for the channel numbers, I added a bindings include > file that goes on a separate commit : > dt-bindings: iio: adc: at91-sama5d2_adc: add channel specific consumer info > This should go in the same tree with the following commits : > ARM: dts: at91: sama5d2: add channel cells for ADC device > ARM: dts: at91: sama5d2: Add resistive touch device > > as build will break because these commits depend on the binding one > which creates the included header file. > > Changes in v4: > - removed patch for inkern module get/set kref > - addressed feedback on both the ADC and the touchscreen driver. each > patch has a history inside the patch file for the specific changes. > - patch that fixes the channel fix > [PATCH v3 01/11] iio: adc: at91-sama5d2_adc: > fix channel configuration for differential channels > was accepted in fixes-togreg branch thus removed from this series. > - added Reviewed-by for the bindings by Rob Herring > > Changes in v3: > - changed input driver name according to feedback and reworked in commits > to adapt to binding changes and new name. > - moved channel index fix in at91-sama5d2_adc at the beginning of the series > (PATCH 01/11) > - created a new optional binding for the touchscreen as a separate commit > and added it to the series : > [PATCH v3 04/11] dt-bindings: input: touchscreen: add pressure > threshold touchscreen property > - changed at91-sama5d2_adc driver patch to address the comments. Exact changes > are in the patch file for the driver source file. > > > Eugen Hristev (9): > MAINTAINERS: add generic resistive touchscreen adc > iio: Add channel for Position Relative > dt-bindings: input: touchscreen: add pressure threshold touchscreen > property > dt-bindings: input: touchscreen: resistive-adc-touch: create bindings > iio: adc: at91-sama5d2_adc: add support for position and pressure > channels > input: touchscreen: resistive-adc-touch: add generic resistive ADC > touchscreen > dt-bindings: iio: adc: at91-sama5d2_adc: add channel specific consumer > info > ARM: dts: at91: sama5d2: add channel cells for ADC device > ARM: dts: at91: sama5d2: Add resistive touch device > > Documentation/ABI/testing/sysfs-bus-iio | 12 + > .../bindings/iio/adc/at91-sama5d2_adc.txt | 9 + > .../input/touchscreen/resistive-adc-touch.txt | 30 + > .../bindings/input/touchscreen/touchscreen.txt | 3 + > MAINTAINERS | 6 + > arch/arm/boot/dts/sama5d2.dtsi | 12 + > drivers/iio/adc/at91-sama5d2_adc.c | 609 +++++++++++++++++++-- > drivers/iio/industrialio-core.c | 1 + > drivers/input/touchscreen/Kconfig | 13 + > drivers/input/touchscreen/Makefile | 1 + > drivers/input/touchscreen/resistive-adc-touch.c | 199 +++++++ > include/dt-bindings/iio/adc/at91-sama5d2_adc.h | 16 + > include/uapi/linux/iio/types.h | 1 + > tools/iio/iio_event_monitor.c | 2 + > 14 files changed, 856 insertions(+), 58 deletions(-) > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/resistive-adc-touch.txt > create mode 100644 drivers/input/touchscreen/resistive-adc-touch.c > create mode 100644 include/dt-bindings/iio/adc/at91-sama5d2_adc.h > Hi All, This looks to be pretty close to needing a path upstream. I propose that I take the driver parts (not dts changes obviously) through iio. I can do an immutable branch if anyone wants one (just let me know). Thanks, Jonathan