From patchwork Mon Mar 8 14:54:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 395793 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 85CBFC433DB for ; Mon, 8 Mar 2021 14:56:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3624F650F7 for ; Mon, 8 Mar 2021 14:56:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231300AbhCHOzh (ORCPT ); Mon, 8 Mar 2021 09:55:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbhCHOzb (ORCPT ); Mon, 8 Mar 2021 09:55:31 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC01FC061763 for ; Mon, 8 Mar 2021 06:55:28 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id h10so15164889edl.6 for ; Mon, 08 Mar 2021 06:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WJxdRpdzofsaI6pJC87KN8qfD7oiIuHmhf+Ws3rK5bo=; b=MTQFoIjgyIhVpuBWjNoJU3fO+5NyJAQOscZ0AdWbRLqL1HdjvnrdB3/XxCfdMJJn56 bDPG9W0kPMVeyC58dnlnVBca784ue4kWFPXvaXSEfFdn9Tj3qTtg4RotQD5idpaVH7SL URqCkfltpUY/xyaBJlhc8SRDGn02/O7WZJvHB/VXkbTHqtEV8vEwxZIxINl3ftaK207d LSHGATqqKJlme/7/BqKSKs8KGoyGOGtbkCXXwN+E/OPGxumgQNBVj1H4TPnKMLvtg6fD 9FYM+6AKbruxKNEfadoYb/EudkSTyPH1m/pS5dxVx+CpKfXemde9q2WnUZZItwajJHhZ Gr1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WJxdRpdzofsaI6pJC87KN8qfD7oiIuHmhf+Ws3rK5bo=; b=iknTKdC4nfonF5o+BsHmUBcV/DsRexyO18srD7TlO/RRSEF203n6vCHnxezdDGpalx iDTECIbcNdnf4MrDmC9AOS751i+cGxFJTrOu3/HiOI9Oc8KsS7CjhsMa0d6vfTD6AgGn Tt9LDBcqRlpV39kGD4w3vRm8xUN5J1KX/o9jk800SpuFNjLvWtybbffataB7Qx++6OHq aI2irUKBvuNUvtPDOZEgDOtPhJTSur+dyRu6f/jI39/dDCUJu2kpW7RfmTzYJPuYd4ed NrT01Bw53zvvmN7F/VU+KPVxmLfFrJAtZo5jRmY3Ek0DCCLWKk4B2j3/0/ZykJsG3x8x kClg== X-Gm-Message-State: AOAM5309+deuuUcBIX5ee/CcODdBCOLQy0tgRQBBTgv+0Uy89F9XX5B/ eq875KjSseySVwXQLKVrJqofxziFMtf7ARohQGo= X-Google-Smtp-Source: ABdhPJwlgot4NbjzzuYuRheze893HpYfgoXITowLPS3t6zG7Qok0RqmnNpkbz3PPbWWOQb7cwfKxaw== X-Received: by 2002:a05:6402:10c6:: with SMTP id p6mr15045774edu.241.1615215327135; Mon, 08 Mar 2021 06:55:27 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:26 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 01/10] spi: spi-axi-spi-engine: remove usage of delay_usecs Date: Mon, 8 Mar 2021 16:54:53 +0200 Message-Id: <20210308145502.1075689-2-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-axi-spi-engine.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/spi/spi-axi-spi-engine.c b/drivers/spi/spi-axi-spi-engine.c index af86e6d6e16b..80c3e38f5c1b 100644 --- a/drivers/spi/spi-axi-spi-engine.c +++ b/drivers/spi/spi-axi-spi-engine.c @@ -170,14 +170,10 @@ static void spi_engine_gen_sleep(struct spi_engine_program *p, bool dry, unsigned int t; int delay; - if (xfer->delay_usecs) { - delay = xfer->delay_usecs; - } else { - delay = spi_delay_to_ns(&xfer->delay, xfer); - if (delay < 0) - return; - delay /= 1000; - } + delay = spi_delay_to_ns(&xfer->delay, xfer); + if (delay < 0) + return; + delay /= 1000; if (delay == 0) return; From patchwork Mon Mar 8 14:54:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 396465 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 8F19CC433E6 for ; Mon, 8 Mar 2021 14:56:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62C4964E7A for ; Mon, 8 Mar 2021 14:56:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231312AbhCHOzi (ORCPT ); Mon, 8 Mar 2021 09:55:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbhCHOzb (ORCPT ); Mon, 8 Mar 2021 09:55:31 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC077C0613D7 for ; Mon, 8 Mar 2021 06:55:29 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id t1so15166472eds.7 for ; Mon, 08 Mar 2021 06:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=K1kerxlBQXsnkBW66DYRSLvt3f+bVaEYRPTXorPAb2o=; b=rFtmC2lX9bx1OJQsukKFxbVFYmys8q4JZilYPWNowCRpc+e/TA9cZqZuTTmo16QaR3 Zts0P3qeGkvIV/+kY5d/R0/Gw7urqV7JEVAcqMz4uNzUhyurQ0hxY1RtoW1q0pXyENR2 w2LLt4h6lI238BNd0PG6+9Q0us3AzZyEyTMu6vptP6nzK+wfcPqaXSegsOW7yGGHWTs4 vqBks9FDZgZ3wwSatAgxdylkY+t4TBwvAV4tOIZ6nmLIL5Gc8pNQrKR+rl0KStooCfyt 28nw+vmJGXOmQBlF/aBAwnrusLCaNg8aOw8HMdOocFZq4TxTqx7MmHm2sHqz19j4+89R kvbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K1kerxlBQXsnkBW66DYRSLvt3f+bVaEYRPTXorPAb2o=; b=az19EKkhJOsJN6tpTC2iML6r6/xSQOVJnsyfcAC87HdQRH78pHCpwI2bwxbAgEZgPA 9/bOEAZ8h1lxD0VUJkkt/bh1ZqrOS8mOLCbCUOixUn0FyN9rMM1igP+GXGggAugJSc90 4ONa6S4rnZlE4Jyh0z8SSs6KnI9oyNle3NazXV1s+FihLAkUuNg2pZUhDpIWCG17THmY h+r4QNENZyZtNxM5y49/njdTKpKuoSJwLOtuC18oFaZnCo3NxTM5qGOgkNw5G+q0uqlO ggEzMTQjfehbK41kAe01i/fbI/0eb2ZySdQ8sLrsNSgbPFiFHwyoJlcnNiGBUYKrwneW citA== X-Gm-Message-State: AOAM531GXsbueZ1fLpeAOl6lEu0/bQ26HW0jkv9rtNNjNtlZOQLFJxt2 iFSyIJTsZAOnNAxiMG6tToU9MyI+YoPxaR9wpcY= X-Google-Smtp-Source: ABdhPJxEzekHbaS2S5/KEJAyRUXUwCnOcpb8YwShTRdZxuCkPKC3qM7GvCvE1zMb6YSlbV7UXjYPrg== X-Received: by 2002:a50:e0c3:: with SMTP id j3mr23091988edl.32.1615215328449; Mon, 08 Mar 2021 06:55:28 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:28 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 02/10] spi: bcm63xx-spi: don't check 'delay_usecs' field Date: Mon, 8 Mar 2021 16:54:54 +0200 Message-Id: <20210308145502.1075689-3-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-bcm63xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index d08bb7600150..80fa0ef8909c 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c @@ -369,7 +369,7 @@ static int bcm63xx_spi_transfer_one(struct spi_master *master, } /* CS will be deasserted directly after transfer */ - if (t->delay_usecs || t->delay.value) { + if (t->delay.value) { dev_err(&spi->dev, "unable to keep CS asserted after transfer\n"); status = -EINVAL; goto exit; From patchwork Mon Mar 8 14:54:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 396463 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 590D0C43333 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2227D65211 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbhCHOzj (ORCPT ); Mon, 8 Mar 2021 09:55:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbhCHOzb (ORCPT ); Mon, 8 Mar 2021 09:55:31 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44F4DC0613DA for ; Mon, 8 Mar 2021 06:55:31 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id p7so9518575eju.6 for ; Mon, 08 Mar 2021 06:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mBNx3+l+qHDe6EkshwxnUvUhVuyIuR48vB6z54Joki8=; b=nTF2zXvbxcoUnMTJKJRh5lxphx5JfP3FHvUk0L/VCv3nENNwU6DC1sJEgloDXOxZzR z9IijKI0al0C46RH4OsSkFLgSvK/ye8p2SA9rzL5ixNbTTIAkFEFxEZV5WZxPiI5TIZx mSDXSPQMKsd4wJ5h2YlaSivmWjWh9u0lFAx0yRoY69NTm4XZ2RysV2VyecXjRkYn0jIL 3MbtP2sywizYzOWLDex0+U0aOiwaz2xMwM6F1fhyTfi12JIGuYGCYWm/1pvckKJAKi9z EzUqPXhpOXaaa1jIaWXzRXaNYIzDrUWq7U9bgEHLBG8PZUdB2dkKaUPX17QBHHlVR4Be u+SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mBNx3+l+qHDe6EkshwxnUvUhVuyIuR48vB6z54Joki8=; b=WKgJv4pyfbBj53R4sQa40lIzzUloF/0ZtH9mjDBHnUXSfMfcR1AU2dITk9Yw6jCEqx /+LLNq/ISp+33mqAuyy8ZHUUCjbgZhz8e3HmsDg2FNX1sHfYCAaAmx1f3/eMpXZDdAe4 5Hl0UhKj+5Su9ihJdVNZpHVWek6qmjwvTgFPprfnx8FVbLO2fF+58hjCpc5odQVDuZ9U A8atktmFl8RXbRH1JpYluA+trOq7miVZniXd2g6J6wkQ3gdlRxvNu21DjFt1GiKzWXji SaKDVsZN76pfQ2crs1FiMtCnNbt8tr1LhafLnjU7H0q/YaCkjoxpk27wPR+kwTPvmrQ8 DqcQ== X-Gm-Message-State: AOAM532TgnQl2TK4OWgcpzB9SVVygVNnbU62V0EqSHCuK3w8neCbyAHv yMy2Cr9iOUGXA61tbcwUdzPQPFnA1mu3aOCgEYY= X-Google-Smtp-Source: ABdhPJy3dzNItArKPc94hDqlK8aS8fNX1eICojTsHibEp0xBvophfesscwVwUCVlgWvMxvrYa/+PPw== X-Received: by 2002:a17:906:7102:: with SMTP id x2mr15619326ejj.355.1615215329786; Mon, 08 Mar 2021 06:55:29 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:29 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 03/10] spi: spi-bcm-qspi: replace 'delay_usecs' with 'delay.value' check Date: Mon, 8 Mar 2021 16:54:55 +0200 Message-Id: <20210308145502.1075689-4-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field is going away. The replacement for it is the 'delay' field. So, we should check for 'delay.value' being non-zero. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-bcm-qspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-bcm-qspi.c b/drivers/spi/spi-bcm-qspi.c index 707fe3a5d8ef..a78e56f566dd 100644 --- a/drivers/spi/spi-bcm-qspi.c +++ b/drivers/spi/spi-bcm-qspi.c @@ -671,7 +671,7 @@ static int update_qspi_trans_byte_count(struct bcm_qspi *qspi, if (qt->byte >= qt->trans->len) { /* we're at the end of the spi_transfer */ /* in TX mode, need to pause for a delay or CS change */ - if (qt->trans->delay_usecs && + if (qt->trans->delay.value && (flags & TRANS_STATUS_BREAK_DELAY)) ret |= TRANS_STATUS_BREAK_DELAY; if (qt->trans->cs_change && From patchwork Mon Mar 8 14:54:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 395791 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 23ED2C43331 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A14C651C5 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231362AbhCHOzk (ORCPT ); Mon, 8 Mar 2021 09:55:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbhCHOzc (ORCPT ); Mon, 8 Mar 2021 09:55:32 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E79CC061760 for ; Mon, 8 Mar 2021 06:55:32 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id l12so15179427edt.3 for ; Mon, 08 Mar 2021 06:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uperHqgKyTc1tpYFKXo+RhHx7BCtYMzrCs+Kkh1SsV0=; b=T9sWtAkX09RPxJYmWpMCkyvO0N9nQhxGEbDn+KEDTS5nEV/YHef85lYvq0w1BvgYOj 7Z9g4YSYGA3M5uD4ee8zRrJS9MdhHO/Z+2WhBhgLgrEB8obKsVzl9NGILu5WmrvKd7YF 5giXgpANgiUclo4RXurDAkMT7Fz4xAx1ZZWgsF8d5DG2D/1wZ3rSCQSWbyu7My+Hp4K7 F/UZE5Ji01pJtmWBi2V8h4TeIGOGPA4FE81paGKhmeDUA+tHnl7EF1EL6OXMP+JG6LF3 ukjBnNMeFDtaPoQL/UESzW4N40gp1/fGdaFLccqiWHnh3VYxy2qwlW7UPxcQ8Otvhx0G fL4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uperHqgKyTc1tpYFKXo+RhHx7BCtYMzrCs+Kkh1SsV0=; b=GL8O6Wq9eo+wSO/XIZKt1PwtbbuuuBjpLJGqbJd18d0BtPIiUUQwV2hhio+UW/aSCS 0CpsNYxCsfCXtcmuzgmpRiLOXnOw0hSe14SbFCFMV1QhqZw2QAzifpr+H3kTfSqugNDq Gws5PpHtAvR+WpxWJxXQGvfp57YWJD4t38T3PFKrAUhO3MJOAQ5zk85L66bNwjVsrRYh Xlcd4R3q0cUPZhNdHBQdFLAr7a0RMpsb7MMWzXh7cpbVJTRE6JhKkIOAzcuqz+dNM2hD /b1FhvN07Kdh11FxMy7/gkTPAeyO7WpJXQMPNEKdRDDZMYmh67RWuiFaJj3PNdrcLcUM j0Uw== X-Gm-Message-State: AOAM531UNbOikq3wb4n9p4RigsIMJzXQmzgf5fY3sevPpsvZcoty7zGq NYl0xnyAq9QT9wj/yjEBe7S9y83mhFZWbo/G X-Google-Smtp-Source: ABdhPJwPaZ3uD6Lhos/UbjXVxJWzoRqv4+WWiUx4IoveJlUHtsMTopNWyUeqtN/pd3JKBlgRsTvxgg== X-Received: by 2002:aa7:d54a:: with SMTP id u10mr22811140edr.316.1615215331116; Mon, 08 Mar 2021 06:55:31 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:30 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 04/10] spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug Date: Mon, 8 Mar 2021 16:54:56 +0200 Message-Id: <20210308145502.1075689-5-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field is going away. The replacement for it is the 'delay' field. So, we should print the 'delay.value' value instead. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-sh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-sh.c b/drivers/spi/spi-sh.c index 15123a8f41e1..45f304935332 100644 --- a/drivers/spi/spi-sh.c +++ b/drivers/spi/spi-sh.c @@ -290,8 +290,8 @@ static void spi_sh_work(struct work_struct *work) list_for_each_entry(t, &mesg->transfers, transfer_list) { pr_debug("tx_buf = %p, rx_buf = %p\n", t->tx_buf, t->rx_buf); - pr_debug("len = %d, delay_usecs = %d\n", - t->len, t->delay_usecs); + pr_debug("len = %d, delay.value = %d\n", + t->len, t->delay.value); if (t->tx_buf) { ret = spi_sh_send(ss, mesg, t); From patchwork Mon Mar 8 14:54:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 396464 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 E72D6C4332D for ; Mon, 8 Mar 2021 14:56:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6A75650E6 for ; Mon, 8 Mar 2021 14:56:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231376AbhCHOzl (ORCPT ); Mon, 8 Mar 2021 09:55:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231270AbhCHOze (ORCPT ); Mon, 8 Mar 2021 09:55:34 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9715C061760 for ; Mon, 8 Mar 2021 06:55:33 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id bd6so15098139edb.10 for ; Mon, 08 Mar 2021 06:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XWoEzbGml88OxuqmQAcHOjUJ4xDFJxJMYhsbSvaYG8g=; b=CoZuzgDrGpFtj904f5wOt4pdQ3n8fg5dy/GPRYq1rjTInXfpz2xhI8+8Vv5wPkV1Wo wFX3oGQAjFIvlBNmhZJ6fvY9t8B76uKfz9sUj97rgWhDoIbGS6iSPrjfUOlCwHUfbIq2 K2xcYmyB0aJUZyDJKKQ7UH544n9eeotYnTRliWp+P5UoX8W6F0lJnEflhgMhQNkWhd/s jHmpOQSIJXngWEOS0/6cemKhknyqXFEoxIrmGi11LpEyqZFY4UFQrV6uMwKSNbTfyNYK y71Ayez3+y21aI3oCrN+NZrk0zuVw2hZTTO0N+2evfe6jGpnUg8nBLo9mqvI+E7W5rOb npUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XWoEzbGml88OxuqmQAcHOjUJ4xDFJxJMYhsbSvaYG8g=; b=IFAGuUDobidSigq1nTMo/+TId79flxO7naecK7esamngIvxnlOSBrLvPk+ovmAAOzL PwVl6JeJy18BmGtTJ43KOrf2x1YZIVs1X8L01B9BF/Nc20fDrZaxsjwse6geVA92QUY7 6ClQJa/Pdw+4MwVmHwZSAu+JZ930hrH4CJUoSOcUCQPA5fwibLNtlkmLxdQOPu5jhBEt H8H8dCMv/eJV2RgyrhOLrgnQZlHW14DTXZqMqGy/aAltgX1lYunDgQQ/QQQgGFueu6IF lpFXPLvsc2d4iab0257OAcQ0HazN8sIZMu6zEKsj0MDTx/WhOmk0UYWgOxVrHT0ibmgu lTjQ== X-Gm-Message-State: AOAM533qj+8w/G02ttT0bldh2fvA9OmpZPYg4xf8EcYoGsQlW/+ddaIZ Q8mxOvsuqKlelIBrzFXUHYKz0NeInv5Rbgmd X-Google-Smtp-Source: ABdhPJwUcJ3SUmtLrEEaeqoD1Jfg434VvxyQqtPpgiiJeOCIL6JkqcZQQAQ8evRVIMOkpgIhXEKA1w== X-Received: by 2002:aa7:c1d5:: with SMTP id d21mr21943395edp.167.1615215332510; Mon, 08 Mar 2021 06:55:32 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:32 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 05/10] spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi transfer Date: Mon, 8 Mar 2021 16:54:57 +0200 Message-Id: <20210308145502.1075689-6-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. So we can remove the 'delay_usecs' handling in this driver. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-tegra20-sflash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index cfb7de737937..2888d8a8dc6d 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -341,8 +341,7 @@ static int tegra_sflash_transfer_one_message(struct spi_master *master, goto exit; } msg->actual_length += xfer->len; - if (xfer->cs_change && - (xfer->delay_usecs || xfer->delay.value)) { + if (xfer->cs_change && xfer->delay.value) { tegra_sflash_writel(tsd, tsd->def_command_reg, SPI_COMMAND); spi_transfer_delay_exec(xfer); From patchwork Mon Mar 8 14:54:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 396462 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 D6891C4360C for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BED5F650E6 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231250AbhCHOzl (ORCPT ); Mon, 8 Mar 2021 09:55:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231283AbhCHOzf (ORCPT ); Mon, 8 Mar 2021 09:55:35 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49500C061760 for ; Mon, 8 Mar 2021 06:55:35 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id m9so15136276edd.5 for ; Mon, 08 Mar 2021 06:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Io9v2GBIlHI+Tmp+Muo2ozOuxnB5JlN/m/peVkSOoQk=; b=KN8oqTz03n4iXKtuJ5qi9J7eiFCSjzNROABDY6Gb/MplICzu3i5V03YptgmpTTumx9 qzHGrgq8fs8JGet9Odv3isiqA2BAEwaSruGVQmS9a+mZpNXFpeE4VcGYKpq2SjITIXEr iZu8cMKqFXc0GNaf9S/tP3IfDJqMyEWVlwbxUYbisZoe8tFawpRpLzcdVzwhbtNF+qfh oh5qVIsYJBFymQreVC72K8pfrXlBDUp9vpAjjD5DhQNe9vKsYc0LarvZp9YPPAvTNQ6k bUkDxp4231M2aHh4lz1mTKmik9470JWb/d4AGTx8NT+lMZyzE4h4Q/QHCx3Q8heZ+6Wu Pn4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Io9v2GBIlHI+Tmp+Muo2ozOuxnB5JlN/m/peVkSOoQk=; b=l5FwoVg0j6v3/HnTGLA4FUw5p7PXWmyhJntISb7kOfEhDWvEeyA1quiIdmFEWOT5rf c0RJrTaxENua6X+3RxChoqvy3hUy99ova+AzIkYSo35VT/bEeY2eMrHNZ5EGoDnGQWqa kM5KAHYUbPe+7PFvKOsYSKWNucvH21E1mzcOtLGHpqOcfgueXYdBTVgH+JxU5TzUVUNo w0c87gFr9jetD7HCD1K8UR3E6sfJ4uy1xZsmto6br99GoxRijN1IkGAXohu5/1MuevcA ekg42uP8yFcM2lmcOnUlvUsfRGWCMTIxcczMQZbNSh0BQ68uh8wY3QD2Zj3PcDZzJkH8 hCig== X-Gm-Message-State: AOAM5309YEKev0nPKOc/lmrWizgw6gdo4xik2C5Rl2zb5eakQE8zP9zA BdairIELvYIuyBeXoRJM0I44Las1sE7G8lxD X-Google-Smtp-Source: ABdhPJzOxDsiKTJZFzssNH71mhV3dmH3qpwIBVJVNeEVFcuravA0h+m9Fy72NPjkwyy5NAtefvkZcw== X-Received: by 2002:a05:6402:2076:: with SMTP id bd22mr22161922edb.378.1615215333831; Mon, 08 Mar 2021 06:55:33 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:33 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 06/10] staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay Date: Mon, 8 Mar 2021 16:54:58 +0200 Message-Id: <20210308145502.1075689-7-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The intent is the removal of the 'delay_usecs' field from the spi_transfer struct, as there is a 'delay' field that does the same thing. The spi_delay_to_ns() can be used to get the transfer delay. It works by using the 'delay_usecs' field first (if it is non-zero), and finally uses the 'delay' field. Since the 'delay_usecs' field is going away, this change makes use of the spi_delay_to_ns() function. This also means dividing the return value of the function by 1000, to convert it to microseconds. To prevent any potential faults when converting to microseconds and since the result of spi_delay_to_ns() is int, the delay is being computed in 32 bits and then clamped between 0 & U16_MAX. Signed-off-by: Alexandru Ardelean --- drivers/staging/greybus/spilib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/spilib.c b/drivers/staging/greybus/spilib.c index 672d540d3365..30655153df6a 100644 --- a/drivers/staging/greybus/spilib.c +++ b/drivers/staging/greybus/spilib.c @@ -245,6 +245,7 @@ static struct gb_operation *gb_spi_operation_create(struct gb_spilib *spi, /* Fill in the transfers array */ xfer = spi->first_xfer; while (msg->state != GB_SPI_STATE_OP_DONE) { + int xfer_delay; if (xfer == spi->last_xfer) xfer_len = spi->last_xfer_size; else @@ -259,7 +260,9 @@ static struct gb_operation *gb_spi_operation_create(struct gb_spilib *spi, gb_xfer->speed_hz = cpu_to_le32(xfer->speed_hz); gb_xfer->len = cpu_to_le32(xfer_len); - gb_xfer->delay_usecs = cpu_to_le16(xfer->delay_usecs); + xfer_delay = spi_delay_to_ns(&xfer->delay, xfer) / 1000; + xfer_delay = clamp_t(u16, xfer_delay, 0, U16_MAX); + gb_xfer->delay_usecs = cpu_to_le16(xfer_delay); gb_xfer->cs_change = xfer->cs_change; gb_xfer->bits_per_word = xfer->bits_per_word; From patchwork Mon Mar 8 14:54:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 395790 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 BADFDC43603 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 773EE651D3 for ; Mon, 8 Mar 2021 14:56:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231393AbhCHOzm (ORCPT ); Mon, 8 Mar 2021 09:55:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231294AbhCHOzh (ORCPT ); Mon, 8 Mar 2021 09:55:37 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B467AC061760 for ; Mon, 8 Mar 2021 06:55:36 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id bm21so20929688ejb.4 for ; Mon, 08 Mar 2021 06:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dk38R2BEd68k0sRStLee7izJxfsp+PQHJm3HaMXnM6A=; b=ahfVV+tRIbM8ON7yRS/IM1epTuYYGywi+Koj8gByhh6/R1lwaQ5Pw36i8kwDwuLGiH Zhe3ULECmQI4x2Sv26GgkMNikMu0NKpw9wH/+bEzk9cOyPTDEJKDaQl48hmfleXFxiY/ HqKi1fbZREQRxRXLrf4wLVdw9j2H0zT4YyInNGcWX1HheMd0lgaCLgW2a2l5Drgv8cGg DwQ+8QSmU8dYKHDNmufkE+jrJQhYzVnFrjZ3CjYxEDkivdQcf1O2c0NidPpdwQ+5kded 1c8KcAXjYGVsyacm6BcVE9r1A0mYP6ZegtHntXkWZgsJCilpA7j0s0D/ER+03VaYFGxt aIow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dk38R2BEd68k0sRStLee7izJxfsp+PQHJm3HaMXnM6A=; b=WqT6+0PjhGrI5qonrz5Z7ahOfupHjo2ZaimvXc6NczLHiMgGLwocUaMLOe8ua6M1r5 OIvR10CBQZv3SA8yotwYcSRP505X84XlR9NrxNb/7Rw3V7ZB3wH1htlWCLH085Jy8ROM 4jsb28g/vCuuSzN5RJ6r3nkJmX6BhyHdlNVu8NsPPLqC4EZO88cJd6Cv1PgbLbH+NMhQ x8/dVYBho2TvFdnr0rrjygJS/9v+4OwqlGxEWjUYBG6PyF65JKexlYRXSDzwdbjtxAh/ UgRWZoKC112rXoLSDJPphcz2wO7YWxxviSgLKvrNRQcjrPdSptEK9kSlcfiRB+jMDuKp /wYg== X-Gm-Message-State: AOAM533mYEnCx/a689ANIT1x2HaRtsF0mR6VMWBQNf9gV69CyIjp959A iM8FT49t4Ok1bhM25RNP381Pu2j462vUSPx+ X-Google-Smtp-Source: ABdhPJz1X+Yvv3Gf60Ux6dslZLHmcGo2s75ffNy+pTDMIK2LHvMuhKrswzHu65RuNVsJWclcjcnmIQ== X-Received: by 2002:a17:906:7150:: with SMTP id z16mr15048608ejj.103.1615215335290; Mon, 08 Mar 2021 06:55:35 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:34 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 07/10] spi: spi-falcon: remove check for 'delay_usecs' Date: Mon, 8 Mar 2021 16:54:59 +0200 Message-Id: <20210308145502.1075689-8-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field is being removed from the spi_transfer struct. This change removes it from the SPI Falcon driver. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-falcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-falcon.c b/drivers/spi/spi-falcon.c index d3336a63f462..a7d4dffac66b 100644 --- a/drivers/spi/spi-falcon.c +++ b/drivers/spi/spi-falcon.c @@ -377,7 +377,7 @@ static int falcon_sflash_xfer_one(struct spi_master *master, m->actual_length += t->len; - WARN_ON(t->delay_usecs || t->delay.value || t->cs_change); + WARN_ON(t->delay.value || t->cs_change); spi_flags = 0; } From patchwork Mon Mar 8 14:55:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 396461 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 4CD14C433E9 for ; Mon, 8 Mar 2021 14:56:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F87D6519D for ; Mon, 8 Mar 2021 14:56:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230522AbhCHO4N (ORCPT ); Mon, 8 Mar 2021 09:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231329AbhCHOzi (ORCPT ); Mon, 8 Mar 2021 09:55:38 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09B1EC061760 for ; Mon, 8 Mar 2021 06:55:38 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id m9so15136478edd.5 for ; Mon, 08 Mar 2021 06:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=urYLQtVdnzA+q/DonKHBr+50GGSu7EQTj+TBy7g6Q9o=; b=DI2451HfgotQz9pB6iDClae765YmLRgpDL2tCkDipGN54R+t87igdJbgK+kmmreaeA 8KPw7u3xoIz9kOCfIv08lBVwmzr0JSwKZUBDRyUNWmSK5ATIQfmWqO5Q6xx8uIJLikA5 X+4sOWpuDw30weSJk+atq9Ow39Uv0ffPDH/Jbwcu8Jdi+JnQaHboHU8msYT9CKq6m4UT DBTRx+IZAUsflr0foefztI0cy35cwviB5fimBRCYTDiCtV1JgeVmbCDL+fLj6coXxdhK akBiWjsSx/bzPQDIxfRyuf5JLv7mwrqLzRThKIwHEz2B43K7HqN1vXA5pvmO8yhk9Dfy 8jPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=urYLQtVdnzA+q/DonKHBr+50GGSu7EQTj+TBy7g6Q9o=; b=mcrQvHG2aJhV/yzAUBV2zVRE/PhqT90EwZpvHtB0NXOAsP3PHoKtt6Ip2mfsC88H2E 63QCUBHqmmsdl8xUosrDGl+Gs37oNE+n7Ydm8w0sPwmYBeE8iReivJnokK39re9niMTc c/+BA9q18oT1oqBuq9B6ujbyf6mMOnbrvDTZcOGegJta635zwwmHPH+DlRnHQYut+jHR L1nuKdcCZffhn13sEmEQA47aSFC0zc9o2fudQv915Ht2XN4mXv1UUsFqj1WmDvnXFzUr zoWX7VAZmZa2VqMs1uZkPmNSbTvT558O/D55e6j5MEYKFntonkzW7Vz4qA2f64L+V2ns Ja4A== X-Gm-Message-State: AOAM533ZUSRSiBjLIzq9HcP6F5Jq14NYXJfLRJWH73Fg5JCB65D+xxCp 0WogGBnpIWqgKlFOyrYxP0llriLIbPEkkxbW X-Google-Smtp-Source: ABdhPJxe0zyWH76y8kItEqXgvETT7TZ6JKNT1e22wQhgFUZx5RbGpKr9TzsZbEKqFDYgqLwPaYGILg== X-Received: by 2002:aa7:c94c:: with SMTP id h12mr22840108edt.40.1615215336605; Mon, 08 Mar 2021 06:55:36 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:36 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 08/10] spi: fsl-espi: remove usage of 'delay_usecs' field Date: Mon, 8 Mar 2021 16:55:00 +0200 Message-Id: <20210308145502.1075689-9-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field is being removed from the spi_transfer struct. This change removes it from the SPI FSL ESPI driver. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi-fsl-espi.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index cf2b947c600e..f7066bef7b06 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -435,8 +435,7 @@ static int fsl_espi_trans(struct spi_message *m, struct spi_transfer *trans) static int fsl_espi_do_one_msg(struct spi_master *master, struct spi_message *m) { - unsigned int delay_usecs = 0, rx_nbits = 0; - unsigned int delay_nsecs = 0, delay_nsecs1 = 0; + unsigned int rx_nbits = 0, delay_nsecs = 0; struct spi_transfer *t, trans = {}; int ret; @@ -445,16 +444,10 @@ static int fsl_espi_do_one_msg(struct spi_master *master, goto out; list_for_each_entry(t, &m->transfers, transfer_list) { - if (t->delay_usecs) { - if (t->delay_usecs > delay_usecs) { - delay_usecs = t->delay_usecs; - delay_nsecs = delay_usecs * 1000; - } - } else { - delay_nsecs1 = spi_delay_to_ns(&t->delay, t); - if (delay_nsecs1 > delay_nsecs) - delay_nsecs = delay_nsecs1; - } + unsigned int delay = spi_delay_to_ns(&t->delay, t); + + if (delay > delay_nsecs) + delay_nsecs = delay; if (t->rx_nbits > rx_nbits) rx_nbits = t->rx_nbits; } From patchwork Mon Mar 8 14:55:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 395789 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 E5379C433E0 for ; Mon, 8 Mar 2021 14:56:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A519B6519D for ; Mon, 8 Mar 2021 14:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229737AbhCHO4M (ORCPT ); Mon, 8 Mar 2021 09:56:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231289AbhCHOzk (ORCPT ); Mon, 8 Mar 2021 09:55:40 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D07E8C06175F for ; Mon, 8 Mar 2021 06:55:39 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id lr13so20975766ejb.8 for ; Mon, 08 Mar 2021 06:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eGIsP86uecOdbNP3RzEXdRJwjYXQN4lavob9ylpQnlo=; b=ioTX0u8DVjv5rQ6PRejkBUyjoya3UCwI32URVKD5M10y+hrFGA8Q5r0DXSuHIEEDmo oPPBRTnH9wDsEupl3mGZoRJ2vh718Y1GnDNeZfqyAZjEo8kIjGm2UzE1wcRvcbJyEbGy 7O3sc0gtRdzgOq7T8KV4H0JX8OfC3obDIE0OppS9Sl62QfCirdgYHiBLAMyX5jOeEtYW Gmq3N54+nU/K5a4nMbWOxxP2e2ZVLsVOpz5qjJ4feOM/L7AOFg1WOQ9qH3rsKdyXkBEz BXtkaWNtaGd0j4FAEpjUqe/rkHZpU3GheAopKvl1/Wk2au60O+NFUxs2j2gqjTQc8LH6 bXfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eGIsP86uecOdbNP3RzEXdRJwjYXQN4lavob9ylpQnlo=; b=KcIco1hiPszHT8K6/V1mBOKUx5nHOv39+arw95ipDlX/pkzIPi/J5ujOGxCHS9w/xy v/sVqiKVzd/GkmlWlKVChrfUBM5PQUjE53abmlqNBxZh24zjnfqLRAxrXA1hQS0V97Zy oYKg7/CYApYMGFF+HML5zXABIKPw+4eNU1VkXEZeGpS5BRAv8Sd/H57T77NCN8N7bTSi NfXp6KBzSaE0XD6j2QA9VBdb9dbLq2N3X54cq6if/LdxNW5IRxX8WfVTb/2wyRU3Nxyw e9jeAbwjKA3c4RcJuDkj4WU44/5Bc6oRwS5mg3lK9DkXEVY/y/9qsF+1g48oPmKemHNs TuVQ== X-Gm-Message-State: AOAM533aVhE1834otH9kH+TRJnejzD+tLoG+Od7F7f/LmUMAF46Wb2ME YLq1EJOV5HfXgaypvpvuNE9WlHAacvHUAi4W X-Google-Smtp-Source: ABdhPJztNbtWidlTaFpyoGea7LJcNkwK+Ksb+1J38vdVQrHaHxFzKw412LMQTMbUTaZZaFEz5HcZtA== X-Received: by 2002:a17:906:6558:: with SMTP id u24mr15604493ejn.185.1615215337950; Mon, 08 Mar 2021 06:55:37 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:37 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 09/10] spi: core: remove 'delay_usecs' field from spi_transfer Date: Mon, 8 Mar 2021 16:55:01 +0200 Message-Id: <20210308145502.1075689-10-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay' field in the spi_transfer struct is meant to replace the 'delay_usecs' field. However some cleanup was required to remove the uses of 'delay_usecs'. Now that it's been cleaned up, we can remove it from the kernel tree. Signed-off-by: Alexandru Ardelean --- drivers/spi/spi.c | 1 - include/linux/spi/spi.h | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index b08efe88ccd6..481427780162 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3178,7 +3178,6 @@ struct spi_replaced_transfers *spi_replace_transfers( /* clear cs_change and delay for all but the last */ if (i) { xfer->cs_change = false; - xfer->delay_usecs = 0; xfer->delay.value = 0; } } diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 592897fa4f03..ea1784a43267 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -832,9 +832,6 @@ extern void spi_res_release(struct spi_controller *ctlr, * @delay: delay to be introduced after this transfer before * (optionally) changing the chipselect status, then starting * the next transfer or completing this @spi_message. - * @delay_usecs: microseconds to delay after this transfer before - * (optionally) changing the chipselect status, then starting - * the next transfer or completing this @spi_message. * @word_delay: inter word delay to be introduced after each word size * (set by bits_per_word) transmission. * @effective_speed_hz: the effective SCK-speed that was used to @@ -946,7 +943,6 @@ struct spi_transfer { #define SPI_NBITS_DUAL 0x02 /* 2bits transfer */ #define SPI_NBITS_QUAD 0x04 /* 4bits transfer */ u8 bits_per_word; - u16 delay_usecs; struct spi_delay delay; struct spi_delay cs_change_delay; struct spi_delay word_delay; @@ -1060,14 +1056,6 @@ spi_transfer_del(struct spi_transfer *t) static inline int spi_transfer_delay_exec(struct spi_transfer *t) { - struct spi_delay d; - - if (t->delay_usecs) { - d.value = t->delay_usecs; - d.unit = SPI_DELAY_UNIT_USECS; - return spi_delay_exec(&d, NULL); - } - return spi_delay_exec(&t->delay, t); } From patchwork Mon Mar 8 14:55:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 395788 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 0EE46C433E6 for ; Mon, 8 Mar 2021 14:56:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C53A0650E6 for ; Mon, 8 Mar 2021 14:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231171AbhCHO4O (ORCPT ); Mon, 8 Mar 2021 09:56:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbhCHOzl (ORCPT ); Mon, 8 Mar 2021 09:55:41 -0500 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD073C06174A for ; Mon, 8 Mar 2021 06:55:40 -0800 (PST) Received: by mail-ej1-x633.google.com with SMTP id e19so20972199ejt.3 for ; Mon, 08 Mar 2021 06:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lLj7Gp4AXNBIRfM05Fb/npNKmdzGnIj+j8T+QIUmIp0=; b=GYwAt5N11Htctvk5vaStUU1oMV8AcHJat8k+JeWcUlAP6NIzKfpP2octcY7sipgk3Q q2JbUqobc5/wdXMc3ss58YGJM1/dfaYyxxVtxbzbXRmGPABKNLCY4f8p9dE17XRZWR4P G4eWbUvaydrHkOhcAKITzQ4XatIdcCRogDyorfkg9j9xZPTLwSBwVpPrx36/8lCWs64y AmnbbHYZYZRjlVXrAFO8UFbyNEm3nAGU280MlSxCdKPqrVn6TGqZM6/tk9WeB3xyULdp duSPWwZG4Bs2YEcTeTv9hOjWQC+g8vtDuFJLHkEArTfM+f7c3u1IiTVgSOgSM1mvqH1E MAUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lLj7Gp4AXNBIRfM05Fb/npNKmdzGnIj+j8T+QIUmIp0=; b=Kl9gJN9FC+ibK/h9fhblFtY+C6Cj4HVKvhuX6WHkcvE0O2dPf16RPL1iK8gx8/ooFi AJLdrIplv2YchdOzVMEARx9KfgW+LulPR1zjvNDxJp+/r9nO6tW0Nn4EEVqtXl6V0mxn CkZyNlezw5pxxroqtcCLyKrQM0pVJ95nd/XRctPLgMggu7JN9u7R5nzVwbZ7HRuKD4xV PxrprtB1g4xJGSnjjbKuhynSUCtByibgflbP6zBj43Ts4GHBn1RkAr/c1XFLAyEnclD6 vso4FJDyq8HoeOvUOBL25sGbFlzRJnR1TnfwZMwUjDrC/1O5RPvQwcO1L5jnkdSbDSwj L/hg== X-Gm-Message-State: AOAM530zPKAssjuh0ZprRFJl4HY7CwHT0e0haTMMfeuDobejtRV6RyeM 42hRj9sOwSFCW64RU5AMIIXAnjbduZ1oIysn X-Google-Smtp-Source: ABdhPJwujoxKBULC2TiDF0uTmZ725nCMJDdNLnOASHbIowxRxu7/T7o0BEees1GbdUH3W536CdvnxQ== X-Received: by 2002:a17:906:2804:: with SMTP id r4mr15241523ejc.521.1615215339299; Mon, 08 Mar 2021 06:55:39 -0800 (PST) Received: from localhost.localdomain ([5.2.193.191]) by smtp.gmail.com with ESMTPSA id bt14sm7411234edb.92.2021.03.08.06.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 06:55:38 -0800 (PST) From: Alexandru Ardelean To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-tegra@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Cc: broonie@kernel.org, gregkh@linuxfoundation.org, elder@kernel.org, johan@kernel.org, vireshk@kernel.org, rmfrfs@gmail.com, f.fainelli@gmail.com, ldewangan@nvidia.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux@deviqon.com, Alexandru Ardelean Subject: [PATCH 10/10] spi: docs: update info about 'delay_usecs' Date: Mon, 8 Mar 2021 16:55:02 +0200 Message-Id: <20210308145502.1075689-11-aardelean@deviqon.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210308145502.1075689-1-aardelean@deviqon.com> References: <20210308145502.1075689-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The 'delay_usecs' field is no longer present on the spi_transfer struct. This change updates the doc to mention the usage of the (relatively) new 'delay' field. Signed-off-by: Alexandru Ardelean --- Documentation/spi/spi-summary.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation/spi/spi-summary.rst b/Documentation/spi/spi-summary.rst index f1daffe10d78..d4239025461d 100644 --- a/Documentation/spi/spi-summary.rst +++ b/Documentation/spi/spi-summary.rst @@ -411,8 +411,11 @@ any more such messages. duplex (one pointer is NULL) transfers; + optionally defining short delays after transfers ... using - the spi_transfer.delay_usecs setting (this delay can be the - only protocol effect, if the buffer length is zero); + the spi_transfer.delay.value setting (this delay can be the + only protocol effect, if the buffer length is zero) ... + when specifying this delay the default spi_transfer.delay.unit + is microseconds, however this can be adjusted to clock cycles + or nanoseconds if needed; + whether the chipselect becomes inactive after a transfer and any delay ... by using the spi_transfer.cs_change flag;