From patchwork Mon Jan 15 17:33:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 10165077 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 223FE60245 for ; Mon, 15 Jan 2018 17:34:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BA13201BD for ; Mon, 15 Jan 2018 17:34:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0021D205AF; Mon, 15 Jan 2018 17:34:11 +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 9C78B201BD for ; Mon, 15 Jan 2018 17:34:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbeAOReL (ORCPT ); Mon, 15 Jan 2018 12:34:11 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:60366 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752419AbeAOReK (ORCPT ); Mon, 15 Jan 2018 12:34:10 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180115173408euoutp022e98824f0117e29e01796f6dac518606~KDDWKib1q0542005420euoutp02K; Mon, 15 Jan 2018 17:34:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180115173408euoutp022e98824f0117e29e01796f6dac518606~KDDWKib1q0542005420euoutp02K DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1516037648; bh=9Yp6gUENp6IUpsYZ0Ijcr6Fd5k2op2iCkscvHfysCjs=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=DlP7wE7CfT+YFmkO3mp4ZyTo/hJSKLuwYJhWVgHMvfaSqSWgEEDqGdwbr2LafEUND kl039YSOKfNPALaS4c4JCU6rJySOVaxGSX163NklEHsfKZFSnAUtwhajLK0F+E5vmo LbTumz284uDO/wkiT0zTcKgpr40vFMgQ4GYYyZGA= Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180115173407eucas1p1c8e89431c58056f01f82006514c4e1af~KDDVY1rJO3071330713eucas1p1D; Mon, 15 Jan 2018 17:34:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id BA.5D.12907.F06EC5A5; Mon, 15 Jan 2018 17:34:07 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180115173407eucas1p1584fb8b431e549cdd0ebdf057c1a512a~KDDU0EG8g1627616276eucas1p1R; Mon, 15 Jan 2018 17:34:07 +0000 (GMT) X-AuditID: cbfec7f1-f793a6d00000326b-a4-5a5ce60fdd8a Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FE.E6.20118.F06EC5A5; Mon, 15 Jan 2018 17:34:07 +0000 (GMT) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P2L00H20Y4QIA10@eusync4.samsung.com>; Mon, 15 Jan 2018 17:34:07 +0000 (GMT) From: Andrzej Hajda To: Archit Taneja , Laurent Pinchart Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/3] drm/bridge/sii8620: simplify hardware reset procedure Date: Mon, 15 Jan 2018 18:33:56 +0100 Message-id: <20180115173357.31067-3-a.hajda@samsung.com> X-Mailer: git-send-email 2.15.1 In-reply-to: <20180115173357.31067-1-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRmVeSWpSXmKPExsWy7djP87r8z2KiDK4sVra4te4cq0VTx1tW i40z1rNaXPn6ns2ic+ISdosZ5/cxWaw9cpfdgd3jcl8vk8fsjpmsHve7jzN59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8brtX3MBR/YK6Y/3MXawHidrYuRk0NCwESia85/RghbTOLCvfVA cS4OIYGljBI7D5+Hcj4DOf8nMcN0nL54C6xDSGAZo8SML+YQRf8ZJc72/gUbyyagKfF3800w W0QgSeL0uQ9gk5gFLjFKvD7ZDdYtLOAlceBbA9hUFgFViZ3TfjCB2LwCFhI37z9ggtgmLzFh SxMLiM0pYCnRcOAnC8ggCYEJbBJLpj+DesJF4mbbc6jzhCVeHd/CDmHLSFye3A3V0M0o8an/ BDuEM4VR4t+HGVAd1hKHj19kBbGZBfgkJm2bDhTnAIrzSnS0CUGUeEgsPHOKBcJ2lHi75R4T xM89jBLzJnUxTWCUXsDIsIpRJLW0ODc9tdhIrzgxt7g0L10vOT93EyMwXk//O/5xB+P7E1aH GAU4GJV4eC22xUQJsSaWFVfmHmKU4GBWEuFtDAYK8aYkVlalFuXHF5XmpBYfYpTmYFES57WN aosUEkhPLEnNTk0tSC2CyTJxcEo1MFr0fFB4sGXVtcyKZymrP/hmn2Fck8Oz9m1h779frRF1 K2NyFs17sH9VONsT1zM9Wy1Tqz8kdURvXi117/JZh5rSr4lqzLvsdzTb3Wxo2PBo/lUz3hUV 160eO3qzab2eYXnpm37V3/ibEmKs75Uam+Ob1DfFCXmpTEhvX2xrZeBdZBEgOaFCWomlOCPR UIu5qDgRAKf/PlLTAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCLMWRmVeSWpSXmKPExsVy+t/xa7r8z2KiDHZs5bS4te4cq0VTx1tW i40z1rNaXPn6ns2ic+ISdosZ5/cxWaw9cpfdgd3jcl8vk8fsjpmsHve7jzN59G1ZxejxeZNc AGsUl01Kak5mWWqRvl0CV8brtX3MBR/YK6Y/3MXawHidrYuRk0NCwETi9MVbjBC2mMSFe+uB 4lwcQgJLGCXa7i+DchqZJCY/PcEOUsUmoCnxd/NNsG4RgSSJjQ8PsYAUMQtcYZRo/9YFViQs 4CVx4FsDM4jNIqAqsXPaDyYQm1fAQuLm/QdMEOvkJSZsaWIBsTkFLCUaDvwEs4WAahZumMA2 gZF3ASPDKkaR1NLi3PTcYiO94sTc4tK8dL3k/NxNjMCw2nbs55YdjF3vgg8xCnAwKvHwWmyL iRJiTSwrrsw9xCjBwawkwtsYDBTiTUmsrEotyo8vKs1JLT7EKM3BoiTO27tndaSQQHpiSWp2 ampBahFMlomDU6qBUe5a5pF1x185Zj2as/Jc2Jz/+xjnCrk/Od7l2fLxjXo+16VooWvLL8iJ rpxxyiuz5NuXvQ/PrSmz/XlfqesuG8P/0BtqBnd3xs18pVeeujt2zfz4bUqliybf1csL2DbJ 8LT3C6aPu6aXhJUuj2hZNO/RvsC1LGyyUp+Obz5xyCxbXpaf596zvM9KLMUZiYZazEXFiQCs Hr/GJwIAAA== X-CMS-MailID: 20180115173407eucas1p1584fb8b431e549cdd0ebdf057c1a512a X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180115173407eucas1p1584fb8b431e549cdd0ebdf057c1a512a X-RootMTR: 20180115173407eucas1p1584fb8b431e549cdd0ebdf057c1a512a References: <20180115173357.31067-1-a.hajda@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need to flip reset pin twice. Also delays can be changed to values present in vendor's code. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/bridge/sil-sii8620.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/sil-sii8620.c b/drivers/gpu/drm/bridge/sil-sii8620.c index db93e5e0497c..7c46847fef18 100644 --- a/drivers/gpu/drm/bridge/sil-sii8620.c +++ b/drivers/gpu/drm/bridge/sil-sii8620.c @@ -980,13 +980,9 @@ static void sii8620_hw_reset(struct sii8620 *ctx) { struct i2c_client *i2c = to_i2c_client(ctx->dev); - usleep_range(10000, 20000); - gpiod_set_value(ctx->gpio_reset, 0); - usleep_range(5000, 20000); - gpiod_set_value(ctx->gpio_reset, 1); - usleep_range(10000, 20000); + msleep(100); gpiod_set_value(ctx->gpio_reset, 0); - msleep(300); + msleep(100); /* I2C bus recovery prevents I2C errors due to known bug in the chip */ i2c_recover_bus(i2c->adapter);