Received: by 10.213.65.68 with SMTP id h4csp1798135imn; Mon, 19 Mar 2018 13:33:34 -0700 (PDT) X-Google-Smtp-Source: AG47ELu87sJeKzb3KCWxmpj1TI9a+frvf0YFS9CT9Kum1tSMnxAerIKMSjp1fUacpHJGTt0cFVY0 X-Received: by 2002:a17:902:6184:: with SMTP id u4-v6mr14095698plj.390.1521491614137; Mon, 19 Mar 2018 13:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521491614; cv=none; d=google.com; s=arc-20160816; b=S2o2ABwixsTNVfwSUcVq/jaahT2jvURaCe6tRMgTnUh9ApdPEivvInWTkRO2grAHsq d3vMFQylOpWu/y/dW7cd8ijaKMcKQacNsLKIkXkTSDW0/oP/uuqXlFJ2vyGjfSfsNWy1 5AoAt3/7jFUneNXHMFrdlTGZw8XIat3Tt0o1w0vKVBz1Hp8f/mIsGFkqQppstvu3tkO0 mwF1cDVDyo8eIj3bFk7MdMV/6gz+a8+fdex0ZGl6emQmkNMkhuXBgmfLglsLRt41Ir00 j5tVhChLVYlKx1KkwwRNAY6Cmy8WgysCRa23WAwS+4yZac5L+d4tqwl1h08S9/j1O8W5 q+qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=g/f3E8n1ybmp9GSrQ+CZE7jvuWHQa2UKOVe8LTSff8M=; b=UgxoIxgNkQanqYORU4VV3HTScUy8AfucesNsV+dgvwP+fDtUs7KtU92zGMnDRumG47 XAGICLNz90c7vfkQcP7G1eYBoqv9F4JU+2k864zheccgN0c2jXYo+kdJqjrKhAY2LN8E CCtctQGzcrch+VqRV7ZcFjd2aLK1zxa7wJGn96l7t22dVfX/4Bgp51KPXDfKcZdJxsLW gMRqa5Cwv5P8TqOed11uAhC3pjkt+vRTyWFJGIXjdipMtQHSR19fT52gIqXDCwUhPRFe cauF4r0vpsOOIcdh1R+Wfu7CTHFFYtQfNxPys5JInAhM4rYABMz4uWAXAbmil4AASE1q Pxzw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b17si32433pfd.155.2018.03.19.13.33.19; Mon, 19 Mar 2018 13:33:34 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030404AbeCSSMl (ORCPT + 99 others); Mon, 19 Mar 2018 14:12:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42828 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935560AbeCSSMg (ORCPT ); Mon, 19 Mar 2018 14:12:36 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4C6F311B7; Mon, 19 Mar 2018 18:12:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "H. Nikolaus Schaller" , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.4 002/134] Input: tsc2007 - check for presence and power down tsc2007 during probe Date: Mon, 19 Mar 2018 19:04:45 +0100 Message-Id: <20180319171849.375263695@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: "H. Nikolaus Schaller" [ Upstream commit 934df23171e7c5b71d937104d4957891c39748ff ] 1. check if chip is really present and don't succeed if it isn't. 2. if it succeeds, power down the chip until accessed Signed-off-by: H. Nikolaus Schaller Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/tsc2007.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -455,6 +455,14 @@ static int tsc2007_probe(struct i2c_clie tsc2007_stop(ts); + /* power down the chip (TSC2007_SETUP does not ACK on I2C) */ + err = tsc2007_xfer(ts, PWRDOWN); + if (err < 0) { + dev_err(&client->dev, + "Failed to setup chip: %d\n", err); + return err; /* usually, chip does not respond */ + } + err = input_register_device(input_dev); if (err) { dev_err(&client->dev,