From patchwork Wed Mar 28 14:39:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 10313447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2768060353 for ; Wed, 28 Mar 2018 14:39:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E942E28CFD for ; Wed, 28 Mar 2018 14:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DABE8294EE; Wed, 28 Mar 2018 14:39:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E9BE28CFD for ; Wed, 28 Mar 2018 14:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbeC1Ojp (ORCPT ); Wed, 28 Mar 2018 10:39:45 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:38074 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbeC1Ojo (ORCPT ); Wed, 28 Mar 2018 10:39:44 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180328143942euoutp028a14277d6f8975130e6ec2787dc1cfee~gHHmDATEd1694216942euoutp02_; Wed, 28 Mar 2018 14:39:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180328143942euoutp028a14277d6f8975130e6ec2787dc1cfee~gHHmDATEd1694216942euoutp02_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1522247982; bh=KvhWmB3IRqdhuvaZzzR21fHVbB4RSK1LCZ3lNIu5Kd4=; h=From:To:Cc:Subject:Date:References:From; b=iqOBoMjaPdknEjCraBd1PWROk8RI2X0GAIceBI/N8hCcMjQka0XnQH1giIdSoAqic m4SYBYAC7ziSZaPlZbzD+y6JMSMxhfdn7o/uSQg4qD22CmWcZKotPEuaVRMYtgBkbt fFC9sXEPRhhRRRjoA+vG7uo9Vsc248jh5FSvYE7E= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180328143941eucas1p198381cc0aa5ca463abe8753c63960d5c~gHHlVWLji0408804088eucas1p1a; Wed, 28 Mar 2018 14:39:41 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id ED.22.10409.C29ABBA5; Wed, 28 Mar 2018 15:39:41 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180328143940eucas1p16cbfab79a8ac143fe1c43243fd2b3ec1~gHHkIcXCj0407404074eucas1p1s; Wed, 28 Mar 2018 14:39:40 +0000 (GMT) X-AuditID: cbfec7f5-f95739c0000028a9-00-5abba92cdf9d Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 42.AF.04178.C29ABBA5; Wed, 28 Mar 2018 15:39:40 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P6B00LAO21ZY9A0@eusync4.samsung.com>; Wed, 28 Mar 2018 15:39:40 +0100 (BST) From: Marek Szyprowski To: linux-input@vger.kernel.org Cc: Marek Szyprowski , Dmitry Torokhov , Andi Shyti , Chanwoo Choi , Bartlomiej Zolnierkiewicz Subject: [PATCH v2] Input: stmfts - use async probe & suspend/resume to avoid 2s delay Date: Wed, 28 Mar 2018 16:39:29 +0200 Message-id: <20180328143929.2937-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.15.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprHIsWRmVeSWpSXmKPExsWy7djP87q6K3dHGSzYymSx+MdzJouNM9az Wlz/8pzV4vCiF4wWNz99Y7VYe+QuuwObx/Uln5g9ds66y+7Rt2UVo8fnTXIBLFFcNimpOZll qUX6dglcGcsn/mAq2M1R8WL3X9YGxh72LkZODgkBE4lzl1ezdjFycQgJrGCU2H77LDuE85lR ou/7AiaYqltz70MlljFK/O2GcRqYJN78XgpWxSZgKNH1touti5GDQ0RAXuLWEVOQMLPAXUaJ fY1KILawQITE74crWEFsFgFViZOdl1hAbF4BG4mp7T+YIZbJSyz+vpMNZL6EwFVWiVOvQByQ hIvE2y+trBC2sMSr41ugfpCR6Ow4CHVpPdDVR5ggmnsYJfa2TIVKWEscPn6RFeIiPolJ26Yz gxwqIcAr0dEmBFHiIbH25F+o+Y4S/ZsXgrUKCcRK/Djzn3ECo+QCRoZVjOKppcW56anFxnmp 5XrFibnFpXnpesn5uZsYgbF2+t/xrzsY9/1JOsQowMGoxMNrsWh3lBBrYllxZe4hRgkOZiUR 3vcaQCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8cRp1UUIC6YklqdmpqQWpRTBZJg5OqQbG661r p+7gSFqaHSL6fe9yCdbTKhpHujYUv+udz/707sHJPD6T1sn+P/3Z+UJXuRmzq8RfzVuf2Hf8 Pn6diZdddZXFYj/xZYKtxp88L1qe1L1+Pz3ISff9esllfy94/6y4wTYxZ8bEzG16c8SYxUvY /4s4e1bxrp0e7Dgrol5Fp279vz++RrbrlViKMxINtZiLihMBqTp+8rECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t/xa7o6K3dHGbzbym2x+MdzJouNM9az Wlz/8pzV4vCiF4wWNz99Y7VYe+QuuwObx/Uln5g9ds66y+7Rt2UVo8fnTXIBLFFcNimpOZll qUX6dglcGcsn/mAq2M1R8WL3X9YGxh72LkZODgkBE4lbc++D2UICSxglztwogrCbmCS2H+QC sdkEDCW63naxdTFycIgIyEvcOmIKEmYWuMso8fG+CogtLBAhceFtNwuIzSKgKnGy8xKYzStg IzG1/QczxCp5icXfd7JNYORawMiwilEktbQ4Nz232FCvODG3uDQvXS85P3cTI9Dn24793LyD 8dLG4EOMAhyMSjy8Fot2RwmxJpYVV+YeYpTgYFYS4X2vARTiTUmsrEotyo8vKs1JLT7EKM3B oiTOe96gMkpIID2xJDU7NbUgtQgmy8TBKdXAKFQrVjxrxrOe6aH+c+98PiL2svDdn4ouv8mn 7Q1m+0R57894dpB1cXPGJZMa+Q9T/p2b01XP/9R135l0UR2Zl+v93kVxXDQ7+lH+7lufuA/9 j444cJ5oPTjTxLc4pd5fK1RVJf3UdZPF+azGezdNkGHMcz+s6vjg0D/rAxcnSHWeZf6wZWHE SiWW4oxEQy3mouJEADZKIwH1AQAA X-CMS-MailID: 20180328143940eucas1p16cbfab79a8ac143fe1c43243fd2b3ec1 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180328143940eucas1p16cbfab79a8ac143fe1c43243fd2b3ec1 X-RootMTR: 20180328143940eucas1p16cbfab79a8ac143fe1c43243fd2b3ec1 References: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Executing stmfts_power_on() function lasts over 2 seconds, what significantly slows down the boot and resume processes if driver is compiled in. Avoid this delay by forcing this driver to be probed and suspended/resumed asynchronously. Signed-off-by: Marek Szyprowski --- drivers/input/touchscreen/stmfts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen/stmfts.c index efdb1a75a163..40c833db150a 100644 --- a/drivers/input/touchscreen/stmfts.c +++ b/drivers/input/touchscreen/stmfts.c @@ -730,6 +730,7 @@ static int stmfts_probe(struct i2c_client *client, return err; pm_runtime_enable(&client->dev); + device_enable_async_suspend(&client->dev); return 0; } @@ -805,6 +806,7 @@ static struct i2c_driver stmfts_driver = { .name = STMFTS_DEV_NAME, .of_match_table = of_match_ptr(stmfts_of_match), .pm = &stmfts_pm_ops, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = stmfts_probe, .remove = stmfts_remove,