Received: by 10.213.65.68 with SMTP id h4csp11974imn; Mon, 19 Mar 2018 17:50:56 -0700 (PDT) X-Google-Smtp-Source: AG47ELvDArhJrn/IgHpB5k/d9UbTCwfxsavlIrzNhZByBeBM3aCF4TKiUYjT39sS/3cklHZ9oNrq X-Received: by 2002:a17:902:b185:: with SMTP id s5-v6mr14242279plr.109.1521507056246; Mon, 19 Mar 2018 17:50:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507056; cv=none; d=google.com; s=arc-20160816; b=X0/pIF+YSIOd7iyMylYl1qKNG+mB5KfBBxzbDXAjsZtXX0tbyscB9b60VewXJDBDWv oWJULhvd0n9Sqhd3h7kN6TP+OAsqSSw6jb96uF1Vhl7gzLl04dF3XZ7eVaKFEu+Qv8Dm OT11F7wCSwImH2pxIW7T71bvqIDi+UY0NhHWlHhM+zwfZOr75QRn9TQ2l7PXzuDBD0Kd E7XFciL+3fMlaVkxl0krRLbmTvBb5TMvqNaUOxLQhucNp2h28CR9I+w8qyJ1sn1LyFHV sur1ZGtkl4BFN4dLoE2UYfG1w+VrFHOHbkrO6e0ML8uje2dMBjkQ0q8PBjXxG6WvLXfe fNwA== 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=+Ou8XalbW6PGSIyp3gOVOR/K97mYW84w/L1VqvyzV+U=; b=fegkphRaZZQdfCkDD44sabhMyXqrSSdPYn29T5N+E51MAwpd/RM+7HD8RyKmQY5Q/6 azCQtQkcKJ6jVH5jYyJhaNfXIUNgKC8Ow2YpFhkCcy81lwIIA07V5/LwAYawGVlyO06U emEeVqz7HFXYlFB9lqcyn9lhFprym7DlSImpj3ADJvNZ5GjlZAoPfmZ5VfZmudCRMFKJ YTVdgU6BBQSjsm320/H8DQwm2irewnjE2gnIwxkN7+u9//fAc//5+chpoxfbMtMHkpfs zr74CN2osrYS2Ddgug14FRtkCHoDnLmUbbu5T5baXuFgC4gHFfLyPlqOrHUwmlZP8syb B6wA== 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 15-v6si424528pla.342.2018.03.19.17.50.41; Mon, 19 Mar 2018 17:50:56 -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 S1030879AbeCSSSq (ORCPT + 99 others); Mon, 19 Mar 2018 14:18:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46624 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030852AbeCSSSl (ORCPT ); Mon, 19 Mar 2018 14:18:41 -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 04BA3E02; Mon, 19 Mar 2018 18:18:40 +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.9 002/241] Input: tsc2007 - check for presence and power down tsc2007 during probe Date: Mon, 19 Mar 2018 19:04:27 +0100 Message-Id: <20180319180751.272167310@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@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.9-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,