Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4238947ybf; Tue, 3 Mar 2020 23:39:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vuqYQubxyVeR6oHsudNGIHhBeuonmS+dMRMmdIJ6zft26HgNTly3DrJSoB1GInAx1iMuPC+ X-Received: by 2002:aca:eb17:: with SMTP id j23mr901438oih.80.1583307545202; Tue, 03 Mar 2020 23:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583307545; cv=none; d=google.com; s=arc-20160816; b=JJQASpwbhfK/zTa+TRQoeUUba+U4aTn4rnb6SBbgcFUauQObI9bxOnLyN27WKEVRWg JEesBbp57zozIYvlsIlGEgwQfEORvaaAGwXvEuaNjRf9Oy+rtVmGE/TU8CcD+NhiGzxy 6wFAjE6YULlDmGfAVuQ0qamdKS6dvCMoO+WRM8croOqokc5qHmq3Upz1VH1tix683Wzc 9cWlgAy5q8YECmTk5wig7cQ5jkUMez97tVF4CMtszf051mf1DktmNshG/AsAk5x/vkMJ 1xF+iTHYl3KljLv/4JGoHVHVEPUro3AaX/ZjJMse0VgMUAq4celM6ah+rzs1tRSg1fJB onyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=wXwhzzuh4QbOLfKdmzjG5M7cDlnpibVkGfKEImpdq8A=; b=F+NZQkDnrAhUoHP4rPm3Vc/mrTpFDZKg/iDETAJajycuSOLRumk/mn28Zja3m/SIiX 7gH6ft943TkpJDZZMct6zVJeDqsMLhgWCcHldu4qT7aNlM/OlIaUCs2EhBeJ7VVsVyRQ gBTW98qqrTJSjWea8cguQv1yDBqFsYhATF38QRl/hE3gkPZyHb+8+cPSCb9dQKA0tNNg U8jWiyVJZEsY5N6UcI6UV0YAcq6duO91iNrUKU4mlYUJb7XaRWCvlMci05gnM1cmXBJD VCFb3Uu949QZlvZw9+5Yg4RQ2TNaexxLP+4JLBblaFDAack56nrIIlAfywgDsHXq4e2C tBSw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9si3989otp.323.2020.03.03.23.38.52; Tue, 03 Mar 2020 23:39:05 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728319AbgCDHiQ (ORCPT + 99 others); Wed, 4 Mar 2020 02:38:16 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:50984 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725283AbgCDHiP (ORCPT ); Wed, 4 Mar 2020 02:38:15 -0500 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 0247UHhu022850; Wed, 4 Mar 2020 02:37:56 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ygm52a68a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Mar 2020 02:37:56 -0500 Received: from SCSQMBX10.ad.analog.com (scsqmbx10.ad.analog.com [10.77.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 0247bs2r025995 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Wed, 4 Mar 2020 02:37:55 -0500 Received: from SCSQCASHYB6.ad.analog.com (10.77.17.132) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Tue, 3 Mar 2020 23:37:53 -0800 Received: from SCSQMBX11.ad.analog.com (10.77.17.10) by SCSQCASHYB6.ad.analog.com (10.77.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Tue, 3 Mar 2020 23:37:37 -0800 Received: from zeus.spd.analog.com (10.64.82.11) by SCSQMBX11.ad.analog.com (10.77.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Tue, 3 Mar 2020 23:37:53 -0800 Received: from analog.ad.analog.com ([10.48.65.180]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 0247bnxa014676; Wed, 4 Mar 2020 02:37:49 -0500 From: Sergiu Cuciurean To: , , , , CC: , , , , Sergiu Cuciurean Subject: [PATCH v2] staging: kpc2000: kpc2000_spi: Use new structure for SPI transfer delays Date: Wed, 4 Mar 2020 09:37:46 +0200 Message-ID: <20200304073746.19664-1-sergiu.cuciurean@analog.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227144643.23195-1-sergiu.cuciurean@analog.com> References: <20200227144643.23195-1-sergiu.cuciurean@analog.com> MIME-Version: 1.0 Content-Type: text/plain X-ADIRoutedOnPrem: True X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-04_01:2020-03-03,2020-03-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 impostorscore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003040058 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In a recent change to the SPI subsystem in commit ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()"), a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_usecs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). Signed-off-by: Sergiu Cuciurean --- Changelog v1->v2: *Removed footnote from the commit description *Convert the delay in nano seconds. In this way, the delay is executed no matter what unit it is described by. drivers/staging/kpc2000/kpc2000_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c index 1c360daa703d..44017d523da5 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -386,8 +386,8 @@ kp_spi_transfer_one_message(struct spi_master *master, struct spi_message *m) } } - if (transfer->delay_usecs) - udelay(transfer->delay_usecs); + if (transfer->delay.value) + ndelay(spi_delay_to_ns(&transfer->delay, transfer)); } /* de-assert chip select to end the sequence */ -- 2.17.1