From patchwork Mon Oct 7 12:16:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11177311 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 82F39139A for ; Mon, 7 Oct 2019 12:15:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 555BC21655 for ; Mon, 7 Oct 2019 12:15:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jVfcgQjm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727511AbfJGMPr (ORCPT ); Mon, 7 Oct 2019 08:15:47 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:41215 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfJGMPr (ORCPT ); Mon, 7 Oct 2019 08:15:47 -0400 Received: by mail-qt1-f196.google.com with SMTP id i26so1765663qtm.8 for ; Mon, 07 Oct 2019 05:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Zb2XL7Vyg4IB6+EsLyBQSY5RUnZ7G3E/z3E+QL6u9ug=; b=jVfcgQjmMtiXfRkrWXdhND+e9KTWWP4vpp20Ew6dTJDU2zr7xpkj0TIhpkwmc0NorE HR4j4RBUYP+L3PCi1lgE01Yvo8YtuGL7AO6GLBwJOSRQKH1dg+kmvd3YNZ8JSz+YHda8 aXXX+RN7yaS9lazxUmsE0rMpCmRKfsyvEDY4XUn9gnCnwvQi6YmWy/BVVwrOdk6pwN1c 4P4zdpR2CZFTRttelyV3YOxg3brLCRpfbYKcH7nHLbkTOKYq5AygpgSB0ORRJhsb7jIy TbCQc5uVyXgqiF8YlMWtl6v9ct7lqi/2ZlSqGDoiHmxfyuEknksHksNkfWfXQgwzgctq AEjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Zb2XL7Vyg4IB6+EsLyBQSY5RUnZ7G3E/z3E+QL6u9ug=; b=lXApoRD1ERFER8j49wGXTT+9u4rnQKSjdhPoXJWwIZjM2JtHsZSE+9pPIGkt6qpRVK ADRznSamJ3sCoypJU8ZRhp4pp2PLs4jHQYtrWA84UwmNdQrA0CNrh/H5xyf1bYXfLrfH 7Bo7ag7NN3QL58bWsjYkQ0rMe1KU4VdUEj+3zQATeEyOCFh68GGiyQjnqWupKlxVDyHe nKRkFOnM/6gLyVev5DtndPPIU5gkZoAersG0WK9iqmWu4/46SZiOVtwckSU32QhS3hCo XWQ5UuHnJcygEMNgSximT0GSxnV4fmRr8E33n2RVD+m70Pgrs97/ZqpDLneDwKNtyiVu xikQ== X-Gm-Message-State: APjAAAWW9x1XbrgA1l+SPp6qeTw+Ur06zrut89a/LgtjqNFtwn9xBREb ElWPadSDfr/JTk6u2R/J2R6QRRXd X-Google-Smtp-Source: APXvYqzS7QqD+cS47Pq173ZvHx+KGjzTO1Bhif6WSBkTjC3GL338H7lIwnsi8UebxlDPrtBQ4/sQgQ== X-Received: by 2002:a0c:e481:: with SMTP id n1mr27162374qvl.83.1570450546473; Mon, 07 Oct 2019 05:15:46 -0700 (PDT) Received: from fabio-Latitude-E5450.am.freescale.net ([177.221.114.206]) by smtp.gmail.com with ESMTPSA id g194sm8221678qke.46.2019.10.07.05.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 05:15:45 -0700 (PDT) From: Fabio Estevam To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, jcbian@pixcir.com.cn, rogerq@ti.com, Fabio Estevam Subject: [PATCH 1/5] Input: pixcir_i2c_ts - Remove unneeded gpio.h header file Date: Mon, 7 Oct 2019 09:16:03 -0300 Message-Id: <20191007121607.12545-1-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The touchscreen device is a GPIO consumer, not a GPIO controller, so there is no need to include . Remove the unneeded header file. Signed-off-by: Fabio Estevam Reviewed-by: Roger Quadros Signed-off-by: Dmitry Torokhov Tested-by: Fabio Estevam Tested-by: michal.vokac@ysoft.com Reviewed-by: Roger Quadros --- drivers/input/touchscreen/pixcir_i2c_ts.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index e146dfa257b1..4561d65e7a1e 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include From patchwork Mon Oct 7 12:16:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11177313 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8DDBD139A for ; Mon, 7 Oct 2019 12:15:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6C89421655 for ; Mon, 7 Oct 2019 12:15:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AzycBlRo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbfJGMPv (ORCPT ); Mon, 7 Oct 2019 08:15:51 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:45763 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfJGMPu (ORCPT ); Mon, 7 Oct 2019 08:15:50 -0400 Received: by mail-qk1-f195.google.com with SMTP id z67so12260662qkb.12 for ; Mon, 07 Oct 2019 05:15:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+SIlC361um6jarKwr9f+FViDvls3ViyvVkzc9SDn7XM=; b=AzycBlRoHCHJV2voO09T+ApzmS8c0wni75+zt9icAfOQZ9Oa+/8kFGcfuIYY8frVzu 1+iic38R0qm7501jyXzWhQIzsNI0xf7T0aA1G1UVSHFpjepSb1mVOCKkHBa84sbsvS3Q DRNT6UDvZlfOMQ1tXewASJTP9hzqubuOwdwJVWAOaPOqGJZO0navMdPB/6mBq5DiC7LL 6DnCmbs80HfT30lGW+Z7KLnMy3lX8D8BTxhyLrok8juCwLe3/4flhYqOZKdVaE2bCq1V kHnvD2wr9VShItCx1nzHh0KkCQTq8Pz1FdYcvV7YJTgcWGZAX6MPsI4yC3vAYNTSeuS2 UrDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+SIlC361um6jarKwr9f+FViDvls3ViyvVkzc9SDn7XM=; b=nALN4oCsjaM3IkQ18BfWqbHLm6sg1rMpRmMoOpbJj1xOam18Pp7NV5kl8mp8LvYZVP d5Qb7c+78d2Hvn628blpY7u39lRx+ATfQm9kR1UDXMiCrbOpNc9yjXhNg5jRc3DKI2gy 0K+f5rGKrMBiIzwc7U7QcXemGtQBMSoOwBTv+dBeXqIsgfHDpgdyIqiZo/ffN+CqXq1O 9peeD142IBHfGP3eCutvfVUSnjU/yyYaAYmgEGdqxjYCzmq9WrsXBhIAw1v1KcbF6D8s 18ZzzbrjKONf8sxFu+NZRwahcgU7r8ndeOLLoqbV+uUfR+1L4INPvjBhOkwITpkM+HxZ deAA== X-Gm-Message-State: APjAAAV2x4qRGNVD7VbabhXGFd/DXDI26zhQplhNr+ZFWxwlozAZZIBZ pPpTvqPdGX74gkNQ317qnK/nbNH2 X-Google-Smtp-Source: APXvYqzBvwgJ6mf3VZgSqSbxDriKqF2RWeJjuukPuoi3ELOHPgiS6RxeyYxJXATs4oFTwPr0auWVHw== X-Received: by 2002:ae9:e609:: with SMTP id z9mr23004721qkf.50.1570450549326; Mon, 07 Oct 2019 05:15:49 -0700 (PDT) Received: from fabio-Latitude-E5450.am.freescale.net ([177.221.114.206]) by smtp.gmail.com with ESMTPSA id g194sm8221678qke.46.2019.10.07.05.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 05:15:48 -0700 (PDT) From: Fabio Estevam To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, jcbian@pixcir.com.cn, rogerq@ti.com, Fabio Estevam Subject: [PATCH 2/5] Input: pixcir_i2c_ts - Move definitions into a single file Date: Mon, 7 Oct 2019 09:16:04 -0300 Message-Id: <20191007121607.12545-2-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007121607.12545-1-festevam@gmail.com> References: <20191007121607.12545-1-festevam@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org All the defined symbols from linux/platform_data/pixcir_i2c_ts.h are only used by the pixcir_i2c_ts driver, so move all the definitions locally and get rid of the pixcir_i2c_ts.h file. Signed-off-by: Fabio Estevam --- drivers/input/touchscreen/pixcir_i2c_ts.c | 60 ++++++++++++++++++- include/linux/platform_data/pixcir_i2c_ts.h | 64 --------------------- 2 files changed, 59 insertions(+), 65 deletions(-) delete mode 100644 include/linux/platform_data/pixcir_i2c_ts.h diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index 4561d65e7a1e..efe5f1e86ef1 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c @@ -15,11 +15,69 @@ #include #include #include -#include #include #define PIXCIR_MAX_SLOTS 5 /* Max fingers supported by driver */ +/* + * Register map + */ +#define PIXCIR_REG_POWER_MODE 51 +#define PIXCIR_REG_INT_MODE 52 + +/* + * Power modes: + * active: max scan speed + * idle: lower scan speed with automatic transition to active on touch + * halt: datasheet says sleep but this is more like halt as the chip + * clocks are cut and it can only be brought out of this mode + * using the RESET pin. + */ +enum pixcir_power_mode { + PIXCIR_POWER_ACTIVE, + PIXCIR_POWER_IDLE, + PIXCIR_POWER_HALT, +}; + +#define PIXCIR_POWER_MODE_MASK 0x03 +#define PIXCIR_POWER_ALLOW_IDLE (1UL << 2) + +/* + * Interrupt modes: + * periodical: interrupt is asserted periodicaly + * diff coordinates: interrupt is asserted when coordinates change + * level on touch: interrupt level asserted during touch + * pulse on touch: interrupt pulse asserted during touch + * + */ +enum pixcir_int_mode { + PIXCIR_INT_PERIODICAL, + PIXCIR_INT_DIFF_COORD, + PIXCIR_INT_LEVEL_TOUCH, + PIXCIR_INT_PULSE_TOUCH, +}; + +#define PIXCIR_INT_MODE_MASK 0x03 +#define PIXCIR_INT_ENABLE (1UL << 3) +#define PIXCIR_INT_POL_HIGH (1UL << 2) + +/** + * struct pixcir_irc_chip_data - chip related data + * @max_fingers: Max number of fingers reported simultaneously by h/w + * @has_hw_ids: Hardware supports finger tracking IDs + * + */ +struct pixcir_i2c_chip_data { + u8 max_fingers; + bool has_hw_ids; +}; + +struct pixcir_ts_platform_data { + int x_max; + int y_max; + struct pixcir_i2c_chip_data chip; +}; + struct pixcir_i2c_ts_data { struct i2c_client *client; struct input_dev *input; diff --git a/include/linux/platform_data/pixcir_i2c_ts.h b/include/linux/platform_data/pixcir_i2c_ts.h deleted file mode 100644 index 4ab3cd6f1cc2..000000000000 --- a/include/linux/platform_data/pixcir_i2c_ts.h +++ /dev/null @@ -1,64 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#ifndef _PIXCIR_I2C_TS_H -#define _PIXCIR_I2C_TS_H - -/* - * Register map - */ -#define PIXCIR_REG_POWER_MODE 51 -#define PIXCIR_REG_INT_MODE 52 - -/* - * Power modes: - * active: max scan speed - * idle: lower scan speed with automatic transition to active on touch - * halt: datasheet says sleep but this is more like halt as the chip - * clocks are cut and it can only be brought out of this mode - * using the RESET pin. - */ -enum pixcir_power_mode { - PIXCIR_POWER_ACTIVE, - PIXCIR_POWER_IDLE, - PIXCIR_POWER_HALT, -}; - -#define PIXCIR_POWER_MODE_MASK 0x03 -#define PIXCIR_POWER_ALLOW_IDLE (1UL << 2) - -/* - * Interrupt modes: - * periodical: interrupt is asserted periodicaly - * diff coordinates: interrupt is asserted when coordinates change - * level on touch: interrupt level asserted during touch - * pulse on touch: interrupt pulse asserted druing touch - * - */ -enum pixcir_int_mode { - PIXCIR_INT_PERIODICAL, - PIXCIR_INT_DIFF_COORD, - PIXCIR_INT_LEVEL_TOUCH, - PIXCIR_INT_PULSE_TOUCH, -}; - -#define PIXCIR_INT_MODE_MASK 0x03 -#define PIXCIR_INT_ENABLE (1UL << 3) -#define PIXCIR_INT_POL_HIGH (1UL << 2) - -/** - * struct pixcir_irc_chip_data - chip related data - * @max_fingers: Max number of fingers reported simultaneously by h/w - * @has_hw_ids: Hardware supports finger tracking IDs - * - */ -struct pixcir_i2c_chip_data { - u8 max_fingers; - bool has_hw_ids; -}; - -struct pixcir_ts_platform_data { - int x_max; - int y_max; - struct pixcir_i2c_chip_data chip; -}; - -#endif From patchwork Mon Oct 7 12:16:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11177315 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6C931747 for ; Mon, 7 Oct 2019 12:15:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B58A2206C2 for ; Mon, 7 Oct 2019 12:15:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T82xhtxy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727533AbfJGMPx (ORCPT ); Mon, 7 Oct 2019 08:15:53 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:36777 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfJGMPx (ORCPT ); Mon, 7 Oct 2019 08:15:53 -0400 Received: by mail-qk1-f195.google.com with SMTP id y189so12317574qkc.3 for ; Mon, 07 Oct 2019 05:15:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=emvcjo6PHktSR/F/QBOVnbRk0xibN3cUFxOu/jIV7wk=; b=T82xhtxyY1SQBIj/0bzolQMjMPAvX4LvckysglPtiLcYzgmpFY3ano4WZmhWuFghb9 Kl8yHoqWkQqCgqAQunTAmf/zoeKCALkxCBERp8cps+FrQddDZGhgJtbJSk52vQ2SyeG7 oKFFZIt2UA+ULw9HokdsPobrcK8ZsxacQEryCAkAiLhm6bcaAdpDtuLPqWFThbbEgEIH gF6Rz/hbfn0SdaxGnJkvYNV9PiZ2OIGBQDPbKfVIi1FB88igOw5fvsxI3pqhduAEDhmJ vB1Io5gEbVXt71ZR8KeZ4JLNOz229f0g6GgzPtBYEdQez4c7cBd1Upe8BYTkKh+0iEa7 bVgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=emvcjo6PHktSR/F/QBOVnbRk0xibN3cUFxOu/jIV7wk=; b=FkrZcCRuO04+t4+9zsCLYP/uTtnl0pLRsF40WajShalOGw3A+neTIdp8DUbKkzbiDA E0nzXm/o8FXQA0nEmCRJek9SIQ9vLvpNol/hGpfs7vMAbyDItgvjJAu2qN4Em2xbueVU v69CaXWrmOxPYbsweGx70QxSVhLIBeeh3i1X25573PL1Wf62sZW85psptTi5/YoKiIB/ CyajzLDA4/mvPKbX7wCDf+U4F9cU8t1QmsRnIQevJztc+RcNgPND8h8c/E270nJ9Tppt m0myEHtW+Nor64u/sPq1UQRnB2v3VDln5VJzyEmXPYsSxk3LqOYN1LG1IWK6Bps15OAf HjdQ== X-Gm-Message-State: APjAAAVshgdZCosOZK29IL6bPCWtp1XtB7tzcf2oHeYy3oy6qgDyppMP pArggfdvmqogmfVUp4qyqh4= X-Google-Smtp-Source: APXvYqwDAeBhrf4qhYKUjc+NRrkO1wf+2ERaTPxK/7EIhTrV8f3caIOCd8xOPG4gsT7Zr8ff0/Yadg== X-Received: by 2002:a05:620a:798:: with SMTP id 24mr22592334qka.238.1570450552290; Mon, 07 Oct 2019 05:15:52 -0700 (PDT) Received: from fabio-Latitude-E5450.am.freescale.net ([177.221.114.206]) by smtp.gmail.com with ESMTPSA id g194sm8221678qke.46.2019.10.07.05.15.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 05:15:51 -0700 (PDT) From: Fabio Estevam To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, jcbian@pixcir.com.cn, rogerq@ti.com, Fabio Estevam Subject: [PATCH 3/5] Input: pixcir_i2c_ts - Keep header files sorted Date: Mon, 7 Oct 2019 09:16:05 -0300 Message-Id: <20191007121607.12545-3-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007121607.12545-1-festevam@gmail.com> References: <20191007121607.12545-1-festevam@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Keep the header files in alphabetical order to keep it more organized. Signed-off-by: Fabio Estevam --- drivers/input/touchscreen/pixcir_i2c_ts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index efe5f1e86ef1..af2336da6954 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c @@ -5,17 +5,17 @@ * Copyright (C) 2010-2011 Pixcir, Inc. */ +#include #include -#include -#include -#include +#include #include #include #include #include -#include +#include #include -#include +#include +#include #define PIXCIR_MAX_SLOTS 5 /* Max fingers supported by driver */ From patchwork Mon Oct 7 12:16:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11177319 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB484139A for ; Mon, 7 Oct 2019 12:15:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8593820679 for ; Mon, 7 Oct 2019 12:15:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p0WEmNNc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727536AbfJGMP4 (ORCPT ); Mon, 7 Oct 2019 08:15:56 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:43023 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfJGMP4 (ORCPT ); Mon, 7 Oct 2019 08:15:56 -0400 Received: by mail-qt1-f193.google.com with SMTP id c4so6060784qtn.10 for ; Mon, 07 Oct 2019 05:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=asfBcHJibpsJFbJQecNPvn4OdThp7y8UZFFMErCqUDQ=; b=p0WEmNNcAvnzZsXOA+/X2D6H2tYxDUcKc7t2MfeFdL4YIUEDuirXCrzFmCFY7GEO7g nmril3D+FARKGnAlMbY0eKQATnjGmw1I5EcwNBP4eVKfe5m3rDRKGvu8JSatlmZIcp0Q wENX+W0D+CpWs6B1TA6iF+UKSCUtadmDhJqXFL/9zV1+hsmA6DLJaVJHwyGCzCxJhclY uNpmJsqLnWj2wnOKMcbsZfY20xQkqnwlXWUJchTFPSj+uqSHTNtvW7t8x93OXLNpQjGn MWkK7uWo8slk1FPAxas0Vyr6TqOc88eJc7wm9mSdS2OGDd886K0gCKs4XJ3qkSI+BALP T2yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=asfBcHJibpsJFbJQecNPvn4OdThp7y8UZFFMErCqUDQ=; b=bVXFIf6NaPdH1YOKB8JlhU4gvkED221ExdPARlKQyGRmqsdUA88K7HblpJawitzUlt LTs4M9vZnNzySzYEZyL40pUpQ7CsArpWQCLu9n2kYwtDnhvQgA67Hc8RWr+0z5gTFAdS kl1W4SARtAaJ86wIq9/qthZFPEIY9swIxAiphIhYUebwhpTSWWTCp23eFm80zOvdXqFz zB4c+jS3ju590aR4bfGUT9tkYoPyu7+pZMXamWP77THDRdFgiY+JQ9YZIE41YXWg0Oqc JwjmsO4ZxSEr9e2/KXH46GoEVPzUNXFE+BCY+YDK8ThPrK6taYwg4UzrZv7w5aRjS/Gb hvug== X-Gm-Message-State: APjAAAW5x+NwfnVYilPgbrZtZe934JZg4lzCre9ljdmAqPA/x/E4MY9T xnC3hEw23W9Heif89beCiss= X-Google-Smtp-Source: APXvYqzyk8aGZmeJrMNDRldnZYKByNv/dj70FJCnlQE8W2ZZgLj+foNl3m25UC9VZ3alXQeDhdrdtw== X-Received: by 2002:a0c:88f0:: with SMTP id 45mr26452041qvo.78.1570450555082; Mon, 07 Oct 2019 05:15:55 -0700 (PDT) Received: from fabio-Latitude-E5450.am.freescale.net ([177.221.114.206]) by smtp.gmail.com with ESMTPSA id g194sm8221678qke.46.2019.10.07.05.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 05:15:54 -0700 (PDT) From: Fabio Estevam To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, jcbian@pixcir.com.cn, rogerq@ti.com, Fabio Estevam Subject: [PATCH 4/5] Input: pixcir_i2c_ts: Print register address in decimal Date: Mon, 7 Oct 2019 09:16:06 -0300 Message-Id: <20191007121607.12545-4-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007121607.12545-1-festevam@gmail.com> References: <20191007121607.12545-1-festevam@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The pixcir datasheet lists the registers addresses in decimal and so are PIXCIR_REG_POWER_MODE and PIXCIR_REG_INT_MODE defined in decimal. Change the error messages to print the register addresses in decimal instead of hexadecimal for better readability. Signed-off-by: Fabio Estevam --- drivers/input/touchscreen/pixcir_i2c_ts.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index af2336da6954..c8a35e97b595 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c @@ -249,7 +249,7 @@ static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts, ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_POWER_MODE); if (ret < 0) { - dev_err(dev, "%s: can't read reg 0x%x : %d\n", + dev_err(dev, "%s: can't read reg %d : %d\n", __func__, PIXCIR_REG_POWER_MODE, ret); return ret; } @@ -262,7 +262,7 @@ static int pixcir_set_power_mode(struct pixcir_i2c_ts_data *ts, ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_POWER_MODE, ret); if (ret < 0) { - dev_err(dev, "%s: can't write reg 0x%x : %d\n", + dev_err(dev, "%s: can't write reg %d : %d\n", __func__, PIXCIR_REG_POWER_MODE, ret); return ret; } @@ -288,7 +288,7 @@ static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts, ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE); if (ret < 0) { - dev_err(dev, "%s: can't read reg 0x%x : %d\n", + dev_err(dev, "%s: can't read reg %d : %d\n", __func__, PIXCIR_REG_INT_MODE, ret); return ret; } @@ -303,7 +303,7 @@ static int pixcir_set_int_mode(struct pixcir_i2c_ts_data *ts, ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret); if (ret < 0) { - dev_err(dev, "%s: can't write reg 0x%x : %d\n", + dev_err(dev, "%s: can't write reg %d : %d\n", __func__, PIXCIR_REG_INT_MODE, ret); return ret; } @@ -321,7 +321,7 @@ static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable) ret = i2c_smbus_read_byte_data(ts->client, PIXCIR_REG_INT_MODE); if (ret < 0) { - dev_err(dev, "%s: can't read reg 0x%x : %d\n", + dev_err(dev, "%s: can't read reg %d : %d\n", __func__, PIXCIR_REG_INT_MODE, ret); return ret; } @@ -333,7 +333,7 @@ static int pixcir_int_enable(struct pixcir_i2c_ts_data *ts, bool enable) ret = i2c_smbus_write_byte_data(ts->client, PIXCIR_REG_INT_MODE, ret); if (ret < 0) { - dev_err(dev, "%s: can't write reg 0x%x : %d\n", + dev_err(dev, "%s: can't write reg %d : %d\n", __func__, PIXCIR_REG_INT_MODE, ret); return ret; } From patchwork Mon Oct 7 12:16:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 11177321 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C47061747 for ; Mon, 7 Oct 2019 12:15:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A19D920679 for ; Mon, 7 Oct 2019 12:15:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="u/WiZvF7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727554AbfJGMP7 (ORCPT ); Mon, 7 Oct 2019 08:15:59 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:34919 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfJGMP7 (ORCPT ); Mon, 7 Oct 2019 08:15:59 -0400 Received: by mail-qt1-f194.google.com with SMTP id m15so18801053qtq.2 for ; Mon, 07 Oct 2019 05:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s3He+r/lFUigg0LHAxifBEbSv17+mUg2fQFUyzzUORo=; b=u/WiZvF7a8GKjQtTB4WHUGhW+rUlR+1Dt9XAcap1qEc7Dhuiw321jUrcy9CUIL/2j1 IH0YkprjYQCN0wN9e5BeylAOyNeFSbFJH5PxUZZqTmNoS7OkmqjCWJfY5giFxSbBoYiq ki66PCq0JnChEmhUxcFQNKp0AyGqFoTgxUYuirnYrYSzsZG4yin3LuJYl/8R21tX6dIM /GC6K39NPcX3q4oYBSDtFgRPAgDeDa+0AKQ6M5d4B2wG9fZeDk89/cTjy8ECrFMA77Kr I+Dhr7tsElA0obEb0k1O6BIJYeSOwkLtsLPyW913dMRU+yyAROocsAc5mFWZGaZ/87U8 aDcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s3He+r/lFUigg0LHAxifBEbSv17+mUg2fQFUyzzUORo=; b=Fd8zPbEqOylmMoJv1ovEzr+KzQgLMRn7Q8J//GUJdEItpNA4LjymswKH9iRVpUkLfH 7mrrrMSOkpQ5xBkqHLBqLhj+Crm03jBUfKXEilv0hoh6EAJPRzIJs/T0IUAYBnsdK1Pb HbNDknIPkNkqOQooAF13j26nRVwuZEqbKDIebVfMmMmxOWJYTMS0mYDxuWUw2bKxxxbk eP6WYvU/XN9lNbrz4Klr+mL+2gxJ6KtNnQTYs+dsr1dpPVgxQLKn8Ey+HO55Z6yE2eiz f2QjyvaXLtlYBuF8RinJdXaZMx03m0OWYI0BYiV8DALn2oAod2DhRd8wqk9exaI6EpLi UPgQ== X-Gm-Message-State: APjAAAViWxm6Vf+mV3Oj8N+LzIJxpyyDnlk0AzXC0oSWrzFFztxd5jOb UoVOgEoQ/PxCJcmeV4KdBWs7kWDa X-Google-Smtp-Source: APXvYqwGbF873l4rPyjdSUN8l1UiQv1QsHzVmH9QiO51UZe13DtxGERiY2j11+S7Lcaoj3KFz5WKKw== X-Received: by 2002:a05:6214:1401:: with SMTP id n1mr27054402qvx.196.1570450558113; Mon, 07 Oct 2019 05:15:58 -0700 (PDT) Received: from fabio-Latitude-E5450.am.freescale.net ([177.221.114.206]) by smtp.gmail.com with ESMTPSA id g194sm8221678qke.46.2019.10.07.05.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 05:15:57 -0700 (PDT) From: Fabio Estevam To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, jcbian@pixcir.com.cn, rogerq@ti.com, Fabio Estevam Subject: [PATCH 5/5] Input: pixcir_i2c_ts: Do not print error on defer probe Date: Mon, 7 Oct 2019 09:16:07 -0300 Message-Id: <20191007121607.12545-5-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007121607.12545-1-festevam@gmail.com> References: <20191007121607.12545-1-festevam@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org In the case of defer probe we should not print an error message. This also aligns with how defer probe is handled in the other GPIOs used by this driver. Signed-off-by: Fabio Estevam --- drivers/input/touchscreen/pixcir_i2c_ts.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index c8a35e97b595..b5d53aaef718 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c @@ -567,7 +567,9 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client, tsdata->gpio_attb = devm_gpiod_get(dev, "attb", GPIOD_IN); if (IS_ERR(tsdata->gpio_attb)) { error = PTR_ERR(tsdata->gpio_attb); - dev_err(dev, "Failed to request ATTB gpio: %d\n", error); + if (error != -EPROBE_DEFER) + dev_err(dev, "Failed to request ATTB gpio: %d\n", + error); return error; } @@ -575,7 +577,9 @@ static int pixcir_i2c_ts_probe(struct i2c_client *client, GPIOD_OUT_LOW); if (IS_ERR(tsdata->gpio_reset)) { error = PTR_ERR(tsdata->gpio_reset); - dev_err(dev, "Failed to request RESET gpio: %d\n", error); + if (error != -EPROBE_DEFER) + dev_err(dev, "Failed to request RESET gpio: %d\n", + error); return error; }