Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2007995ybf; Sun, 1 Mar 2020 23:46:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyCl4VXDdivLS7k3HrDXhZu0d5vYTxcNKR9iCVPPBQ48zbg2x8p6/65NuV+XOeRV4kFOzXa X-Received: by 2002:a9d:6452:: with SMTP id m18mr11901064otl.366.1583135203430; Sun, 01 Mar 2020 23:46:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583135203; cv=none; d=google.com; s=arc-20160816; b=xlkKEBQCfsm8ScyQ8HOIWxEWy1YXEfA4yL2wamztPs/bIid/pK6gaAcq2wZjX9axL9 Fu63GithWgf07Ec93jsGwojRSPIvyf30JfluJjN3GcndaHyTOahh+UhNQcRYY61p6Rxj nDnzNw1RnvscdhEgHcqiSttnygdiE4YQV6hARH8bJ3lAgE8R7vqDiVP688POBV8a2TKi b8pX7/kCv7/z8ZvUh7QsBwvzG7ZuSzEs6mJYAvxpUVUzkH5kzlQedm1Ejx/6cQCFFbu1 SYWVoPKQ4xk/LCiY9ijJT4ksK2oQd/v6nI+GvEsiIO7BbwGsHn4iP/I5JoQoGPnplt0a uEXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2mPZCjCiEQN8LuFrAx6hDaMcPmsg2dvMTzR2q4y1+UU=; b=q+B0G4Wmvd8+jwkHQPUHGVoHN2IS4fWju3pKAdfKA/kH4IRG1iKYl/8yvMYaF8FNLl qvm6F9PzCDD/O3Jsgjgv54EPRKojaRG6PBtS4W5d39St67Xp6MXTw6hT3dyhHbvSRnB3 88b/4WDhRC84+s995rec32+JfhTJ9ALa4tahwGsH4cJHG6pjl5086ctCnCCtg59QzlMM 1K/5rNXdiZSnjBpnRfg3DRFqZPB6/81voSKHfWDiOS/3on0s/iXwqZnl5yGLrlrjvP1X XfNhofiJVFUyqCXMCDw/fNhK+WOdONDoevOeHwUAYs8K+gfwcV2YTLmLD90RSB+irr2T a1kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=AuDffj4x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v92si1780159otb.160.2020.03.01.23.46.31; Sun, 01 Mar 2020 23:46:43 -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; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=AuDffj4x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726918AbgCBHqW (ORCPT + 99 others); Mon, 2 Mar 2020 02:46:22 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:35202 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgCBHqW (ORCPT ); Mon, 2 Mar 2020 02:46:22 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0227hKVq187428; Mon, 2 Mar 2020 07:45:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=2mPZCjCiEQN8LuFrAx6hDaMcPmsg2dvMTzR2q4y1+UU=; b=AuDffj4x3FTTxai7qPvmM030rRwjEIy4kQdU76CHjdbNLFglvw+3GZ9/L34qBWawVUOu c2gxYcEvXORG6OvuMIXEPF2xg9qdlMPRMdaEb3iRkYfRVV6cmfsGC83zCHzDiy7o82PI 5CBFu84rWALNAV2XAsuZ7FrCOhL5IC2QMveQ+aYwd0JWipIOhe0zUsp9e6gYCa5P6G6f PxLpDMuuOIVTaRDaAUoiLROfadK/oYmc+FFbSR+xCh90kwxqYmIR8rfcLLnP1b/zi2EO IrjAopXqvos01L4H4H6b3cInc0HrmQCMyJwHLkpZWE3RKeuBpos5a/yySS156aVDlqXK wQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 2yghn2sv5h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Mar 2020 07:45:59 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0227iTPd086420; Mon, 2 Mar 2020 07:45:58 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2yg1p12v6j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Mar 2020 07:45:58 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0227jsep001123; Mon, 2 Mar 2020 07:45:54 GMT Received: from kadam (/129.205.23.165) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 01 Mar 2020 23:45:52 -0800 Date: Mon, 2 Mar 2020 10:45:42 +0300 From: Dan Carpenter To: Sergiu Cuciurean Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, simon@nikanor.nu, chandra627@gmail.com, fabian.krueger@fau.de, gneukum1@gmail.com, michael.scheiderer@fau.de Subject: Re: [PATCH] staging: kpc2000: kpc2000_spi: Use new structure for SPI transfer delays Message-ID: <20200302074542.GB4140@kadam> References: <20200227144643.23195-1-sergiu.cuciurean@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200227144643.23195-1-sergiu.cuciurean@analog.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9547 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003020059 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9547 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 phishscore=0 spamscore=0 impostorscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 priorityscore=1501 bulkscore=0 clxscore=1011 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003020059 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 04:46:43PM +0200, Sergiu Cuciurean wrote: > In a recent change to the SPI subsystem [1], a new `delay` struct was added Don't do [1] footnote, just say "SPI subsystem in commit bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") You can use footnotes for URLs if you want (not required). > 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). > > [1] commit bebcfd272df6 ("spi: introduce `delay` field for > `spi_transfer` + spi_transfer_delay_exec()") > > Signed-off-by: Sergiu Cuciurean > --- > drivers/staging/kpc2000/kpc2000_spi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c > index 1c360daa703d..cc9b147fd437 100644 > --- a/drivers/staging/kpc2000/kpc2000_spi.c > +++ b/drivers/staging/kpc2000/kpc2000_spi.c > @@ -386,8 +386,9 @@ 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 && > + (transfer->delay.unit == SPI_DELAY_UNIT_USECS)) > + udelay(transfer->delay.value); What if the units are in USEC now? We should probably not just ignore it right? regards, dan carpenter