Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp759441ybc; Tue, 12 Nov 2019 08:46:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwLFOzq74ErpN1g7IySUAUvlafH/VlK+/7bBGeVLbtgybaLfwQdqlPlKBgybAsscb/LAz5E X-Received: by 2002:a17:906:25cb:: with SMTP id n11mr27406485ejb.239.1573577204369; Tue, 12 Nov 2019 08:46:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573577204; cv=none; d=google.com; s=arc-20160816; b=EhaTpRVky7OIHEG/UGQ5X9sr0sCn1Fno5rpwyrxZJcgtt8H5ZprGb+4/4JslSBdwNH QZ79c2g/CYIgO2hQQS2tDV2wT5G9Z42sajdLASOaAWbBOhzFbn4vVsL5gDmEb1RmEfkA KNwUYqOTSQk34MMi8NuxgXpQVw8bC37/Z72x81he9bkUbWatP4AamhLF3eu8C0jOrrJu Vlh7uflgG5OmiMwBR4DeWf6VQwCmNm9iK+YHD9dKvNduDRTqKsuCMVf1zJ33CUNY/PCK lmaLzL6E6Z/Ij8Ly3al2KFYQH0PQa6Ko02aDqARAgpNaa+mO/mhD7h1Ib/9mSbpekHNm UN8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=9PK6Iii1ai1LkK82Hw9G+h5BnDsZJNDqHEqNoavTYJE=; b=j5OksrMkj3AfDyOv7K6VyTq4ekQoXhSV2mDldkqUkrG7AOrqfAOmvhvy5YgTyFKXfm c0VQgJFM/u42MAbK6g09MzEX7n7HCR1M6AkmFT5I3dqGzujT5Obtc/9BznN+MkYv4mU5 WzHv6Yv/LWZgFFrKyMwWdm5JK5Iy6zftBMFK2fvUC0K2Xvm4vowXt+G0EpYGwxb1To+9 ZtMN+f2K3F////72pgAs/26EfSGy6RdO9ymLjELfppagZAEpdV5n7EqLbDKEf20j8JSN MNbPNda0mA+BiNyiig/F9A2SGvpweX/f75bppBmbNGe71LwbsAkDI95Vrl0dzADgatAF HxzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YOQJdU9i; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si317366eja.96.2019.11.12.08.46.19; Tue, 12 Nov 2019 08:46:44 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=YOQJdU9i; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbfKLQo4 (ORCPT + 99 others); Tue, 12 Nov 2019 11:44:56 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:37393 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbfKLQoz (ORCPT ); Tue, 12 Nov 2019 11:44:55 -0500 Received: by mail-qt1-f196.google.com with SMTP id g50so20433284qtb.4; Tue, 12 Nov 2019 08:44:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9PK6Iii1ai1LkK82Hw9G+h5BnDsZJNDqHEqNoavTYJE=; b=YOQJdU9iXybjiq3jIolIh7vTdXvXe/anYmAa+/ybVJZSjPkE82QsdSi4kQVW3B2Vhg iaZ1/NvJ0Df/ahFgkWFzkCakOCwn1IQdqa7Q88Dq/csFy98fKNFaWz4VFayUWk+H735O HqiJ8mYX6WrL4wWhvqB+IaxyX3iW7p/ZSlMEWGr8DJz1ccswWTtskP1FQWCyOsaRrmun gnPcY7UABfS1BWL3sT2Tn5X/ATGJ2/ZqExRQ0bbxR+Tvwq/zDo99r2GmDYY7sRk+1gGR BGCnhFFNQt0WdjljqXiEZJ8o/CLeSJEK0Qq/Y2XU5xg96xGnLtWzvy/kyHg4dd/SBpDH r3Og== 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=9PK6Iii1ai1LkK82Hw9G+h5BnDsZJNDqHEqNoavTYJE=; b=Sf+0wEZsIJZQ6u673Tze4tTdW/fMmvJiuEN6ffRILO+081bunYqMaAe+L9jnJYJ+5S 1md+YiH7sUJrKDKwt+QDU7OQ3bNhDJgqSThGA2W0/k2CsEtHltzHSTuDP+3eBfmkjFnD EtGiBKEdxjxKqx59YCbu7WDkM0839WGbe8tWfbJutfcia1qK6X/zS5va6j9jtF/LN27D 9RZ1gTcoOkOXloZvOhxlpGwde7VMFjAHpVu5T2/haJoRcA8hC2YuaTieuQ1LvhJWza8g TSeelkZ4nTJC/kUIN/PZ6L0sWE2qFetaxAlM7m/KNvoR8qKbsTd2XrLoRwCemq18UpuI M7QA== X-Gm-Message-State: APjAAAVK5/CwGDID5XgkgnNo74q2XY3e2pdyZDON6cAhbMSKCqXcT08K lO1O8Ek37n0C16p42rphvTC9EBel X-Received: by 2002:ac8:3168:: with SMTP id h37mr31958767qtb.311.1573577094635; Tue, 12 Nov 2019 08:44:54 -0800 (PST) Received: from localhost.localdomain ([72.53.229.209]) by smtp.gmail.com with ESMTPSA id z5sm10543552qtm.9.2019.11.12.08.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 08:44:54 -0800 (PST) From: Sven Van Asbroeck X-Google-Original-From: Sven Van Asbroeck To: Dmitry Torokhov Cc: Marek Vasut , Adam Ford , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH v1 1/3] Input: ili210x - do not retrieve/print chip firmware version Date: Tue, 12 Nov 2019 11:44:27 -0500 Message-Id: <20191112164429.11225-1-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver's method to retrieve the firmware version on ili2117/ ili2118 chip flavours is incorrect. The firmware version register address and layout are wrong. The firmware version is not actually used anywhere inside or outside this driver. There is a dev_dbg() print, but that is only visible when the developer explicitly compiles in debug support. Don't make the code more complicated to preserve a feature that no-one is using. Remove all code associated with chip firmware version. Link: https://lore.kernel.org/lkml/20191111181657.GA57214@dtor-ws/ Cc: Marek Vasut Cc: Adam Ford Cc: Cc: linux-input@vger.kernel.org Tree: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/log/?h=next Signed-off-by: Sven Van Asbroeck --- drivers/input/touchscreen/ili210x.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c index 0ed6014af6d7..a6feae5ce887 100644 --- a/drivers/input/touchscreen/ili210x.c +++ b/drivers/input/touchscreen/ili210x.c @@ -21,15 +21,8 @@ /* Touchscreen commands */ #define REG_TOUCHDATA 0x10 #define REG_PANEL_INFO 0x20 -#define REG_FIRMWARE_VERSION 0x40 #define REG_CALIBRATE 0xcc -struct firmware_version { - u8 id; - u8 major; - u8 minor; -} __packed; - struct ili2xxx_chip { int (*read_reg)(struct i2c_client *client, u8 reg, void *buf, size_t len); @@ -342,7 +335,6 @@ static int ili210x_i2c_probe(struct i2c_client *client, struct ili210x *priv; struct gpio_desc *reset_gpio; struct input_dev *input; - struct firmware_version firmware; int error; dev_dbg(dev, "Probing for ILI210X I2C Touschreen driver"); @@ -389,15 +381,6 @@ static int ili210x_i2c_probe(struct i2c_client *client, priv->chip = chip; i2c_set_clientdata(client, priv); - /* Get firmware version */ - error = chip->read_reg(client, REG_FIRMWARE_VERSION, - &firmware, sizeof(firmware)); - if (error) { - dev_err(dev, "Failed to get firmware version, err: %d\n", - error); - return error; - } - /* Setup input device */ input->name = "ILI210x Touchscreen"; input->id.bustype = BUS_I2C; @@ -439,10 +422,6 @@ static int ili210x_i2c_probe(struct i2c_client *client, return error; } - dev_dbg(dev, - "ILI210x initialized (IRQ: %d), firmware version %d.%d.%d", - client->irq, firmware.id, firmware.major, firmware.minor); - return 0; } -- 2.17.1