Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1374215ybf; Sun, 1 Mar 2020 07:50:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwEVrgVh0DDTjPraDy77WYVxUasuSCn0LYNHd/JxZD153aKvKkao/QUOIvH+1vUL+KFAWYy X-Received: by 2002:a05:6830:1555:: with SMTP id l21mr9700652otp.41.1583077856453; Sun, 01 Mar 2020 07:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583077856; cv=none; d=google.com; s=arc-20160816; b=ylKiOGIx+VhWlhSme45vZDc2a+HH6sH8VTUq5TSNE+3zyvOqXZZd/LrsnVSBcnSRlK CHcMGoT3HdsnKQBGTsGzyYiZsn70rVAB2bYkUMjMH0kXaydKhMn2gmZ6hQctu1Lq0meo YkiVi7qrMhcimuAHtgB6fDs6t8ZY7zUGYoIJHN8Ejc1n9jrmUU+Uw3jLkN4r4TYyNuys M11py632UE6fp0HSAbOr31xdxLTVMS5lr8KA94MRaXJw6IeWhzTu9H9PyAAqyUauJMVd NNtJAkqAAn55RjhEh93DhHIDH2Q48oM/q6rou+TXWIFe4KoNg6qodt2F8qn4KF3GAwXk em4A== 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=qLXPIqwG1dvfTkr6w3jDkrnFuo686Wqn0PXU1sibBfI=; b=VBdKgBnB2m2L9tOCmuTa/06+ClGgzjA6iQDzNJ0zJBOMdTiOZW1d9nT42qBl8rUpxv Du0Gti2d47n3FpXEv4iZnPWNdY5saLmnbOEPwpdfh9xukBre7zW6REyFUCWSJJR9KRt+ Lg1E45VgtR2C+gg23SWuiMQt/uJzWc4vDhMx1TOj5BhiZybPwHSJAf9sUl8mykAPsF2s MDZBsAD+2eUYz6vUNiAjRVBhaYUaOc8SH6oQFTb578gmeAWCDaxkpw/h8blUX5F/6Lbd xL4StEqv+Z17wPlxzXrkBN8rLqXOMm44k+yTSib5HxrQdyadhqQ0h49P++YmKF/hitRz PSAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cbSWpQDB; 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 w142si4883735oia.132.2020.03.01.07.50.44; Sun, 01 Mar 2020 07:50:56 -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=cbSWpQDB; 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 S1726465AbgCAPt2 (ORCPT + 99 others); Sun, 1 Mar 2020 10:49:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:35300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgCAPt2 (ORCPT ); Sun, 1 Mar 2020 10:49:28 -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 3B07321D56; Sun, 1 Mar 2020 15:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583077767; bh=QXNouIfww46q+/aWNgIawm03vLObhK2nDx+I8UvrfbQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cbSWpQDBj49teDJX1aBL8EMtwMeMMVD0+Q4B1b0uF8x/8badhDR9qiWCmfi5cNy4B bLUWMFAGD2D9C6HcLAKTonBlT4lhHksM1vPJm7vl8fi8lImxElCRe18aGsozOG4EiI 1EdHlRX3ErfpMst9LAAbhWsWP04nWhHcUF8yCS9c= Date: Sun, 1 Mar 2020 15:49:20 +0000 From: Jonathan Cameron To: Sergiu Cuciurean Cc: , , , , , , , , Subject: Re: [PATCH] iio: adc: max1118: Use new structure for SPI transfer delays Message-ID: <20200301154920.208b7b38@archlinux> In-Reply-To: <20200227122515.16628-1-sergiu.cuciurean@analog.com> References: <20200227122515.16628-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:25:15 +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 play with it. Thanks, Jonathan > --- > drivers/iio/adc/max1118.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/max1118.c b/drivers/iio/adc/max1118.c > index 3b6f3b9a6c5b..0c5d7aaf6826 100644 > --- a/drivers/iio/adc/max1118.c > +++ b/drivers/iio/adc/max1118.c > @@ -71,7 +71,10 @@ static int max1118_read(struct spi_device *spi, int channel) > */ > { > .len = 0, > - .delay_usecs = 1, /* > CNVST Low Time 100 ns */ > + .delay = { /* > CNVST Low Time 100 ns */ > + .value = 1, > + .unit = SPI_DELAY_UNIT_USECS > + }, > .cs_change = 1, > }, > /* > @@ -81,7 +84,10 @@ static int max1118_read(struct spi_device *spi, int channel) > */ > { > .len = 0, > - .delay_usecs = 8, > + .delay = { > + .value = 8, > + .unit = SPI_DELAY_UNIT_USECS > + }, > }, > { > .rx_buf = &adc->data,