From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7AB7BC432C2 for ; Thu, 26 Sep 2019 10:54:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B59A207E0 for ; Thu, 26 Sep 2019 10:54:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s6RWbZ0E"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=analog.onmicrosoft.com header.i=@analog.onmicrosoft.com header.b="z5t9C7+w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B59A207E0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=analog.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0IZ7HNJsIm/WKeNkaocxlvefRLsKwaU6XNGXCbnsLis=; b=s6RWbZ0ECgn6BD OUiuFV3bg+1s0pjTL0ud0h3+pkhDpQpl9Xmg6dO23RmRCHutNRaVoGQgLPIsNQ9CSIxevHhKunV9O eMtTdivT8U0TCmEC2AeYr0NsjpJBg8bBGvYlcEnCC8ktIur7wICTykzU6gF8NC+cmYU0Al3lfpSUX JZ8K9Sv4kntm6wSF9msgjpe7m8oLTLDPk/1OPK5C5qYdj1FrV01SdIxCAqbR+XCXOQKGQhE35m6b9 UB8cjl8Y83wFFUDt+RYuOlC09TkHSWhDff+rMFke+fV+2Nk0EU7mF2lRXyOCxjRayarcWadgiIYZo 26Bs+ufwltSIqu09dH/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDRQ3-0000ff-O6; Thu, 26 Sep 2019 10:54:43 +0000 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDRO5-0006vP-Ay for linux-arm-kernel@lists.infradead.org; Thu, 26 Sep 2019 10:52:43 +0000 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8QAqaKX006040; Thu, 26 Sep 2019 06:52:38 -0400 Received: from nam01-sn1-obe.outbound.protection.outlook.com (mail-sn1nam01lp2056.outbound.protection.outlook.com [104.47.32.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2v6hj96rc4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 26 Sep 2019 06:52:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jp9mDqsO1ULkQD+isvsrtAzz+YdH6U3AzGC9EXC6RCvxzqMLH+Wyc9AXBYdyeK+lGu97tVrmxhk0hQR/4ejyWdQox4N9dGU+Ry+I4Xw5tUz83ErcaU9Me1GEaedR7teVlNDZTlXk/y14CfBqGZ0y7Gn304aHUWMOQTij+RwOsKqsbx1bGLjCq72T8jipOXyECGHYzd4BIwJVh2VfPJ+rHQGZw9T6DJytaeDcBnJdUlg/bUWYcnqlSF8EHmMmwDPxEZbntKZ54TCGkwpMYbb+lbt6WQWtkItVf3pLZfv6DOb1GF9G6hWmbFeoioJ6BZSADCHNyog6SyGm6oT41gNVjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zQjYpYv97m4TZLPufi3D9ESbTPdJRj3NrXmqIglhcCY=; b=dhtokO2NKe9a5aVEsRNkjScnmdkCGJF/C8GMecegzCLdKXiHPlwLzwlfhxTqWyAcw6Ipu5FFHLZFNYw8PiQe/ZKf5F6B1SGr1XAFBT+OC0KU4qIM23Niv0C8jMVaxpzYfwTvNkluTgEukJPR2j87VcyWYgKngidZA/MdO22hy+G8PonQomeqTKQ1Pb7Xnz9S1FOC7X0PIxqbOH3qGw65E3biCF6sJ8gZPoIvNBETUecAB4paXyUvsEgsRu3JanyeqfjNDV/MQgcNMb8uZdNGQOaF1q62CkUNdoAtdFnjDKXRLk6lZ6CVs3+q1rCuDNUpWMyvs0XlqHFbmK4QW4R79A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 137.71.25.57) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=analog.com; dmarc=bestguesspass action=none header.from=analog.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.onmicrosoft.com; s=selector2-analog-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zQjYpYv97m4TZLPufi3D9ESbTPdJRj3NrXmqIglhcCY=; b=z5t9C7+wBEZsd/KTgyFW5lNEU+uR+bbLhCSmYs3nWxxJFyg/sMINCCMWAT/2H4h8RUKQwscdeVg4LQr342MgzSjQep2ZNrJau016s0gL8eFkVO8iJBJtPdICZuFUfLex8vWZ/TjqnWEs5fYHxbASi/XBya2qjMdmMHe7PjxvMa8= Received: from BN3PR03CA0105.namprd03.prod.outlook.com (2603:10b6:400:4::23) by CO2PR03MB2262.namprd03.prod.outlook.com (2603:10b6:102:e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2284.22; Thu, 26 Sep 2019 10:52:36 +0000 Received: from CY1NAM02FT009.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::201) by BN3PR03CA0105.outlook.office365.com (2603:10b6:400:4::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.17 via Frontend Transport; Thu, 26 Sep 2019 10:52:36 +0000 Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.57 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.57; helo=nwd2mta2.analog.com; Received: from nwd2mta2.analog.com (137.71.25.57) by CY1NAM02FT009.mail.protection.outlook.com (10.152.75.12) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.2284.25 via Frontend Transport; Thu, 26 Sep 2019 10:52:35 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.69.107]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id x8QAqZC6014810 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=OK); Thu, 26 Sep 2019 03:52:35 -0700 Received: from saturn.ad.analog.com (10.48.65.123) by NWD2HUBCAS7.ad.analog.com (10.64.69.107) with Microsoft SMTP Server id 14.3.408.0; Thu, 26 Sep 2019 06:52:35 -0400 From: Alexandru Ardelean To: , , , , , Subject: [PATCH v4 10/19] spi: tegra114: use `spi_transfer_delay_exec` helper Date: Thu, 26 Sep 2019 13:51:38 +0300 Message-ID: <20190926105147.7839-11-alexandru.ardelean@analog.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190926105147.7839-1-alexandru.ardelean@analog.com> References: <20190926105147.7839-1-alexandru.ardelean@analog.com> MIME-Version: 1.0 X-ADIRoutedOnPrem: True X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:137.71.25.57; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(396003)(136003)(39860400002)(376002)(189003)(199004)(5660300002)(11346002)(186003)(426003)(336012)(446003)(47776003)(246002)(86362001)(8676002)(356004)(2201001)(7696005)(51416003)(76176011)(70586007)(26005)(8936002)(1076003)(36756003)(7416002)(50226002)(316002)(2616005)(478600001)(476003)(126002)(305945005)(70206006)(2870700001)(7636002)(2906002)(486006)(48376002)(50466002)(44832011)(107886003)(4326008)(106002)(54906003)(110136005)(81973001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2262; H:nwd2mta2.analog.com; FPR:; SPF:Pass; LANG:en; PTR:nwd2mail11.analog.com; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7adebd68-1379-459c-4a9f-08d7426fa43d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600167)(711020)(4605104)(4709080)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328); SRVR:CO2PR03MB2262; X-MS-TrafficTypeDiagnostic: CO2PR03MB2262: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:751; X-Forefront-PRVS: 0172F0EF77 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: FOnZWXI7wTpVDeZ0tQB/JJaFJT2QCblRFy+VOS87TJQr9kJtSg2gpTnkrwITwIHYPq01Te6Iq3KSwybUTWEPlOG9xyVE1m6r9NEoWB9aUY3lue/9io26QZo1o/82y5fmupke25GHXiG/gEipGB2EsMFUHND3Snz8XKMoSu7fTga+VXnGTP+4e+4/vr3Y5MoQmaFUIa5WEYXZbSRmZDQFT05S4vDwQQB4673NFkWlgAjUWIRnf6T2KTJUW1A+88RhZ4imj+6ZOH/hE6/oG71A2beRZWTlNmK92t+lHE9SKB0eG7d3etuTyI8xEUZk8VyXW//7NktIwyRpnKlB59jOrEubyaGw9J37Mdo4pfEv1WR0GP/s3QmO0N020DjMjEZ9gpGimJv+7Yt8fQ6rWQeOwAMcHfA0GlkIV07eHTt/5EY= X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2019 10:52:35.9186 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7adebd68-1379-459c-4a9f-08d7426fa43d X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a; Ip=[137.71.25.57]; Helo=[nwd2mta2.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2262 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-09-26_05:2019-09-25,2019-09-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 adultscore=0 malwarescore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1909260103 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190926_035241_630585_3B053DC5 X-CRM114-Status: GOOD ( 13.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: f.fainelli@gmail.com, baolin.wang@linaro.org, zhang.lyra@gmail.com, linus.walleij@linaro.org, broonie@kernel.org, orsonzhai@gmail.com, Alexandru Ardelean , jic23@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The tegra114 driver has a weird/separate `tegra_spi_transfer_delay()` function that does 2 delays: one mdelay() and one udelay(). This was introduced via commit f4fade12d506e14867a2b0a5e2f7aaf227297d8b ("spi/tegra114: Correct support for cs_change"). There doesn't seem to be a mention in that commit message to suggest a specific need/use-case for having the 2 delay calls. For the most part, udelay() should be sufficient. This change replaces it with the new `spi_transfer_delay_exec()`, which should do the same thing. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-tegra114.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 39374c2edcf3..8133dc49d34f 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -984,17 +984,6 @@ static int tegra_spi_setup(struct spi_device *spi) return 0; } -static void tegra_spi_transfer_delay(int delay) -{ - if (!delay) - return; - - if (delay >= 1000) - mdelay(delay / 1000); - - udelay(delay % 1000); -} - static void tegra_spi_transfer_end(struct spi_device *spi) { struct tegra_spi_data *tspi = spi_master_get_devdata(spi->master); @@ -1098,7 +1087,7 @@ static int tegra_spi_transfer_one_message(struct spi_master *master, complete_xfer: if (ret < 0 || skip) { tegra_spi_transfer_end(spi); - tegra_spi_transfer_delay(xfer->delay_usecs); + spi_transfer_delay_exec(xfer); goto exit; } else if (list_is_last(&xfer->transfer_list, &msg->transfers)) { @@ -1106,11 +1095,11 @@ static int tegra_spi_transfer_one_message(struct spi_master *master, tspi->cs_control = spi; else { tegra_spi_transfer_end(spi); - tegra_spi_transfer_delay(xfer->delay_usecs); + spi_transfer_delay_exec(xfer); } } else if (xfer->cs_change) { tegra_spi_transfer_end(spi); - tegra_spi_transfer_delay(xfer->delay_usecs); + spi_transfer_delay_exec(xfer); } } -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel