Received: by 10.223.185.116 with SMTP id b49csp1078447wrg; Sat, 3 Mar 2018 14:58:22 -0800 (PST) X-Google-Smtp-Source: AG47ELtw7uuaUt4sbY5UaVQ69O15LRBBNmIEqWVIcjM14CQ1y1ECwbKoj+GzxhXxalEgiaHNuwa+ X-Received: by 10.99.96.18 with SMTP id u18mr8544805pgb.124.1520117902767; Sat, 03 Mar 2018 14:58:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520117902; cv=none; d=google.com; s=arc-20160816; b=YpNwxqBqCP2Lm+zrvj13WJ05WcyB5qLNhZ1ixxmbY6ER9xCGhZAJ+CJrhGStR4ZThM qAHSSRqwgvbWzgGuGeWo/cpwH2yf8fwXCSCuw0QX8x7t5XZ6M5cGFYnqAtxRh6B0EgQK FkeKhS6520RPHNaQMmCcsLxVX4rjzq5mMCIIzWC/0uvrMrYsHx0zkU4I1239he9Fd4vn oVmUmjuutID6H9TtuLKcflOY21qeY0OqgENc5DnfDNA0XWxfL0pB2UvPfgCBUt0XhMYe d+pMqOBaJU0iOyzcETwrIEfaH0UEfs5m0C8zWbVxL6RGT8lSZNCrkAJmkgmQOJfrvoS3 BiOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature:arc-authentication-results; bh=4yf+C5QHI3Pt8f1Hqc1kWX2mt6yoREK3wcK9m2IbeIE=; b=1HXqLyi2t4EwMTxluDyHXzlPCbGcVTc8Hy74myaQAtcrIFPlIggpjSoeDtMgMqBJoe 0VFIrpnhzGekQyUeOMkeIwWk0rYZmY5Nk/IAQB/V6fBaGQYtjSC3frrJM3EJodyB5GcN pis72fXHX3rVWwX/2YnLfxhY89jjpSNIygInHB+DKQQ40+bDMBmd+Nr14MCz7aG5ESQg oMKDQ19+nLzFZiOB1IV4bCdpLXNtoQ2F9xdbPcnBVWfV3kXtyZRwPfcK35IgUHxQ8/iR y0Vk62pUWbYpTkCmtswJf6a+EHNMlw/6+LQ7At2wepQMLt08uRG067naK0xnk3sXSOY9 e/+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=CiSGHQ5z; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63si7414154pfj.95.2018.03.03.14.58.08; Sat, 03 Mar 2018 14:58:22 -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=@microsoft.com header.s=selector1 header.b=CiSGHQ5z; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935381AbeCCW5d (ORCPT + 99 others); Sat, 3 Mar 2018 17:57:33 -0500 Received: from mail-cys01nam02on0110.outbound.protection.outlook.com ([104.47.37.110]:31968 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935119AbeCCWk5 (ORCPT ); Sat, 3 Mar 2018 17:40:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4yf+C5QHI3Pt8f1Hqc1kWX2mt6yoREK3wcK9m2IbeIE=; b=CiSGHQ5zTbI4FcLWe6PyEEfFFo2DkRE7UZOTmTQj0P9ziD9TyoVve8Q+/92BTLJqTm2m4f6jlV/N2FgMjnWb5COfyO5n6lInQFZ9NDzsFF0ZaaJZd7IG1phbf8lG0XuDLzA9FHXOMtmgmHgeqQUyueQWHjvPpBwLsXUaBjzQFQM= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MWHSPR01MB344.namprd21.prod.outlook.com (10.174.251.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.3; Sat, 3 Mar 2018 22:40:54 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:40:54 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: "H. Nikolaus Schaller" , Dmitry Torokhov , Sasha Levin Subject: [PATCH AUTOSEL for 3.18 01/63] Input: tsc2007 - check for presence and power down tsc2007 during probe Thread-Topic: [PATCH AUTOSEL for 3.18 01/63] Input: tsc2007 - check for presence and power down tsc2007 during probe Thread-Index: AQHTsz+ahCaeH5StO0C+6pVsw8ivwg== Date: Sat, 3 Mar 2018 22:33:07 +0000 Message-ID: <20180303223228.27323-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHSPR01MB344;6:Sdud9zM/aHDd/KBA/NyLA9I/KvH+KrEZu/h64AQS/2rd7ycds0W+dBqwMZb1Q5O4dYsAqknuRLFnZhkCPOF+E2eLldLkB/oPMxmo49WHP6EubfWmc6i3vnvNGXby+OvTM/0A1XoH3uBYENZRQuSRk+g5fMQ/ckP6odrZ8ssdssJQv/IvhZdnARU2Eu41knfSvsSJu3eGBO7JL355/qJMlRexwxFXJa3CvIudYuJm6+RPcagkGhOHJF1fugumKD7Mu9++iL2P/oTN+AT5ks8rBdGao3GheSbV08lD7qKy2sWgnplAE+XbPbFxrLdqAsZicsSktDbDAM1tLgSEIID9oJVDKjegc0zBEHO8A1qre+AqD0FdzUi5AILgfB3hhRtr;5:By8+42C3cspW5nRCOVsqpMrq/vtulXhRAeZqdq+zWfRvmGyWOX/gSNoU1IMelwvD52V9ZaX6lMnrTdjwU/ExfFtYprz9ne6lr3uyBze+lxtvoC/RdE3sN47jyoMNj5oeUI9U8Fj45IIkhLpyLV6YVg3X8SPJ96IgqG4KcN4aHfM=;24:mm7M8UIBhD7Xyu3NJWEFmUkz9CerrPGMM4Wz+kCCADvI+Q2kYS+7el91qqniWiFBE1YhFOaX5VM0p6UnmCGWLFyMgcRLBmJYWI1KUMxWgrM=;7:al0lUOUoWy1zB2AdTB8pKYKzwe5CYcckQ6/Fme1DNDSNSvY8OiAcFRTO4PXMT6fAvyx3+FQqRrG2xdbGwfFiTFgQCMSP27VdbrPYnHQ2amADkMTtJoEFkoukS0o92QUYfxfILoMwO6mU5uMjTcT0qxNDphTTlXWELPdkCavxLNws8YVy82Y339cC/vDgYN5mjU9cUP4OYHBxet1Hnrvls1AsElgGC5bd211dfpUOP2jZU2pXrQiWzrRfeB7KPSK+ x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 63595ee5-b4d0-45bc-9326-08d58157d2ec x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MWHSPR01MB344; x-ms-traffictypediagnostic: MWHSPR01MB344: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3231220)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011);SRVR:MWHSPR01MB344;BCL:0;PCL:0;RULEID:;SRVR:MWHSPR01MB344; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(376002)(346002)(39860400002)(366004)(39380400002)(189003)(199004)(8676002)(5660300001)(5250100002)(2501003)(6506007)(7736002)(36756003)(25786009)(3846002)(6116002)(97736004)(305945005)(2900100001)(6436002)(10090500001)(26005)(8936002)(186003)(81166006)(102836004)(81156014)(106356001)(86362001)(10290500003)(3660700001)(2906002)(99286004)(14454004)(86612001)(105586002)(478600001)(4326008)(39060400002)(6486002)(53936002)(107886003)(68736007)(316002)(54906003)(110136005)(6512007)(72206003)(3280700002)(22452003)(1076002)(6666003)(66066001)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHSPR01MB344;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Q7Vc0blr/aL9v7Mh86F72ZM86nV8fYeImCtUbq8NAf1jDHElzAckvhAy7s9zLaREtOfhrFLtXERu/HktUx3/fkR3LxCs2V9PsQMWGyCuH08Q1Z0W4/DW5BoZRYwJgCvpoBEj2KhnvX/wSHEVZuJ33HlJznHuZU1X2QNFKhtTRns= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 63595ee5-b4d0-45bc-9326-08d58157d2ec X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:33:07.8879 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR01MB344 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/input/touchscreen/tsc2007.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/touchscreen/tsc2007.c b/drivers/input/touchscree= n/tsc2007.c index 1bf9906b5a3f..75810fa97db5 100644 --- a/drivers/input/touchscreen/tsc2007.c +++ b/drivers/input/touchscreen/tsc2007.c @@ -456,6 +456,14 @@ static int tsc2007_probe(struct i2c_client *client, =20 tsc2007_stop(ts); =20 + /* power down the chip (TSC2007_SETUP does not ACK on I2C) */ + err =3D 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 =3D input_register_device(input_dev); if (err) { dev_err(&client->dev, --=20 2.14.1