Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1374518ybf; Sun, 1 Mar 2020 07:51:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyIDRyKh1MZFUe181/W8j75NDnMTG1OETdEgIR+UKNJdXeQQHvEgqmFqIVU5bTnksrlDhr0 X-Received: by 2002:a05:6830:1317:: with SMTP id p23mr10195792otq.3.1583077887255; Sun, 01 Mar 2020 07:51:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583077887; cv=none; d=google.com; s=arc-20160816; b=e5xgIj2wNd5hWyY0mLJZStZSMPULizQ8T+OSxJQkJ53tIyj02DeUTQ3KScGcMeEsnI 2iUz2pVpNq3m76LlT3aV64/YKloN9o2UFcmdggGuNd0RqYhdI29XYDT+uk+wL1pLURem f6FLR6YgE06L+lLbf47ONaEfnQ58BLK7VUVjTU+AF5GhiE5u1kBtttrHpqzi372k8aTs R1oGblXm7MuNt0sn5g7lsGEqyfKAYGEbCjcf3Ojn1vyf4tQT+Gas6nLABz8ByUXxYBPe geZYRuQl/s3A0hUH8bMq1Wc6T0tXYFFMLOLf4QeLlND60c9Bmi2yL44Ngv1geDfVX/wP Cz1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=4gqXCaYoMvZsk9n0G/VzNqN2JNgWukZA1zw+qpbYU+c=; b=NvYKb9OXEUtQtDywaqOoLSgg0Nf4FQX6R30LGUEY6HCcCKoOuNzCLXH4oQk8kTb5hi rYfmUx0xPwG10lDzOTozCnpjb6+IPQj1DDKRQ24PC7JfgPyi5a18Vuicd5tDdFhPHC90 7TaWD0b9Iky4YgHdHYki5+8NdZqslTKNscvVfZdVIpywR0o7PfCQMfD5L8tHz/0fgpk3 D9Ebqk+3hL6LWG/Yc6xfor7/uJOJ3/jtVAxAdD+Be7nTtP5iSU7ECeO+mhpvBeHXojpk H1n41GmbuBa0srT+VBhqCKCoymkcXdKUTPH0wQKPgtfs/jCbNnid7JDUtEfRA7RfzbpH Y7Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zH8J0WHL; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si4665524otp.61.2020.03.01.07.51.15; Sun, 01 Mar 2020 07:51:27 -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=@kernel.org header.s=default header.b=zH8J0WHL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbgCAPu5 (ORCPT + 99 others); Sun, 1 Mar 2020 10:50:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:35524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgCAPu4 (ORCPT ); Sun, 1 Mar 2020 10:50:56 -0500 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3619A20658; Sun, 1 Mar 2020 15:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583077856; bh=uOj+fapkd+GLFBLFWS2JlD5R+ivG/dADjtKhRNHcazM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zH8J0WHLWIG0gPyCpElZZ35ZbQFmC/868sNZJ1uRrkTOyDW/V18ImzDaQRtLXO3jM R7vTAjBcZo8sz78pUYrHU6/Ck3O8T7KQmcwFqJyyYRz/xrA+WozObuT2k2HtOjWhrX 9fvLZCYIIpiHqGupFmovZadZCP2V6+HovKHYCdIA= Date: Sun, 1 Mar 2020 15:50:48 +0000 From: Jonathan Cameron To: Sergiu Cuciurean Cc: , , , , , , , , Subject: Re: [PATCH] iio: adc: mcp320x: Use new structure for SPI transfer delays Message-ID: <20200301155048.76223dfc@archlinux> In-Reply-To: <20200227122940.18243-1-sergiu.cuciurean@analog.com> References: <20200227122940.18243-1-sergiu.cuciurean@analog.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Feb 2020 14:29:40 +0200 Sergiu Cuciurean wrote: > In a recent change to the SPI subsystem [1], 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). > > [1] commit bebcfd272df6 ("spi: introduce `delay` field for > `spi_transfer` + spi_transfer_delay_exec()") > > Signed-off-by: Sergiu Cuciurean Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at it. Thanks, Jonathan > --- > drivers/iio/adc/mcp320x.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c > index 465c7625a55a..2c0eb5de110c 100644 > --- a/drivers/iio/adc/mcp320x.c > +++ b/drivers/iio/adc/mcp320x.c > @@ -421,7 +421,8 @@ static int mcp320x_probe(struct spi_device *spi) > adc->transfer[1].len++; > > /* conversions are started by asserting CS pin for 8 usec */ > - adc->start_conv_transfer.delay_usecs = 8; > + adc->start_conv_transfer.delay.value = 8; > + adc->start_conv_transfer.delay.unit = SPI_DELAY_UNIT_USECS; > spi_message_init_with_transfers(&adc->start_conv_msg, > &adc->start_conv_transfer, 1); >