From patchwork Fri Oct 16 14:14:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Franklin Cooper X-Patchwork-Id: 7415751 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EB1469F443 for ; Fri, 16 Oct 2015 14:15:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1224120453 for ; Fri, 16 Oct 2015 14:15:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14384200DC for ; Fri, 16 Oct 2015 14:15:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754301AbbJPOOt (ORCPT ); Fri, 16 Oct 2015 10:14:49 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:36325 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932477AbbJPOOe (ORCPT ); Fri, 16 Oct 2015 10:14:34 -0400 Received: by oiao187 with SMTP id o187so7644857oia.3; Fri, 16 Oct 2015 07:14:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZRzdGdghJpja1J/LAdMPq/NXxq6fFmNY1k7Ns4N1/5c=; b=NneQhQHhfBK4eQVHr81Qg5XLCfOrsQoreUCoB/A3kflMq4ar9hFiQZ5eAFtozesDAe sw3RvJTO+6FqlehpPiNXQPzaNXe9GFg/6gKO/VXOxx778Jp+bp8fHVEP6vFrt2xkrNAG 6A4Qx96cOSxMKib0KBK8Z9CXe2NB7CRhRwaZYAKZKkNNkIb5/o0HL3UKTfjEBc5bN6il u0Nc2fJ5dvjquykO2EAoRJ0tdwrH9+ZCZdAkCLFaJG2ZoZlhSJubG95/WRdnxhprmkZ3 VWoUwv2eABexGNhkDUVq/CQ6qLhM6ZZIniW6Slhyl9zAl7MYDTK85WC2v/z3GPlg2P6q NImw== X-Received: by 10.202.85.18 with SMTP id j18mr8578142oib.114.1445004873467; Fri, 16 Oct 2015 07:14:33 -0700 (PDT) Received: from localhost.localdomain (pool-71-97-41-79.dllstx.fios.verizon.net. [71.97.41.79]) by smtp.gmail.com with ESMTPSA id p3sm8457074oei.9.2015.10.16.07.14.32 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Oct 2015 07:14:33 -0700 (PDT) From: Franklin S Cooper Jr To: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, maxime.ripard@free-electrons.com, LW@KARO-electronics.de, jg1.han@samsung.com, asaf.vertz@tandemg.com Cc: Franklin S Cooper Jr Subject: [PATCH 3/4] Input: edt-ft5x06 - Add support for FT5506 Date: Fri, 16 Oct 2015 09:14:28 -0500 Message-Id: <1445004869-31986-4-git-send-email-fcooper@ti.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1445004869-31986-1-git-send-email-fcooper@ti.com> References: <1445004869-31986-1-git-send-email-fcooper@ti.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP FT5506 is essentially the same as other FT5x06 devices other than supporting 10 support points. Signed-off-by: Franklin S Cooper Jr --- Changes since RFC: Increase rdbuf to accomodate extra 2 bytes being read. Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 2 ++ drivers/input/touchscreen/edt-ft5x06.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index bedd7dd..f99528d 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt @@ -5,6 +5,7 @@ There are 3 variants of the chip for various touch panel sizes FT5206GE1 2.8" .. 3.8" FT5306DE4 4.3" .. 7" FT5406EE8 7" .. 8.9" +FT5506EEG 7" .. 8.9" The software interface is identical for all those chips, so that currently there is no need for the driver to distinguish between the @@ -17,6 +18,7 @@ Required properties: - compatible: "edt,edt-ft5206" or: "edt,edt-ft5306" or: "edt,edt-ft5406" + or: "edt,edt-ft5506" - reg: I2C slave address of the chip (0x38) - interrupt-parent: a phandle pointing to the interrupt controller diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 34a353b..e095838 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -172,7 +172,7 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id) struct edt_ft5x06_ts_data *tsdata = dev_id; struct device *dev = &tsdata->client->dev; u8 cmd; - u8 rdbuf[31]; + u8 rdbuf[61]; int i, type, x, y, id; int offset, tplen, datalen, crclen; int error; @@ -1076,6 +1076,10 @@ MODULE_DEVICE_TABLE(i2c, edt_ft5x06_ts_id); #ifdef CONFIG_OF +static const struct edt_i2c_chip_data edt_ft5506_data = { + .max_support_points = 10, +}; + static const struct edt_i2c_chip_data edt_ft5x06_data = { .max_support_points = 5, }; @@ -1084,6 +1088,7 @@ static const struct of_device_id edt_ft5x06_of_match[] = { { .compatible = "edt,edt-ft5206", .data = &edt_ft5x06_data}, { .compatible = "edt,edt-ft5306", .data = &edt_ft5x06_data}, { .compatible = "edt,edt-ft5406", .data = &edt_ft5x06_data}, + { .compatible = "edt,edt-ft5506", .data = &edt_ft5506_data}, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, edt_ft5x06_of_match);