Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1063895ybf; Thu, 27 Feb 2020 04:26:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzSHBL+txJlgRHUzP/F8EiC1/qCgZBJ5/ksXgPwl3ZH9layw9V4fgAZ6Cwe9XfI5d0H/Wv0 X-Received: by 2002:aca:c6ca:: with SMTP id w193mr2523543oif.165.1582806377957; Thu, 27 Feb 2020 04:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582806377; cv=none; d=google.com; s=arc-20160816; b=G/6YM79I6xcw4HQhBOdGXLzFcILfmEpMuuq1Ef0FTHfATaQkPqDOTxla9STSOikhCt bI/avIz/ZWCZ8hqcSeKv60my6Fs/r7UCeGt3k9MNs8Vs6b3YiREZyssTBOxAB4/yB1xW 6d9+3g83vwBExe32ML8m+y1JQ/BNe362Tvsa/i9EZmbw2SQWAn8B7P26xSPEjrgYN2AM Vj+mAQaJBXi8wdDzr/UV0wf44Oi5x1NkS2kdbQL9eDUVingEh+CWb6TmX8A+bFQmBNRx 2GnnlmZpnBWL4OlEhaFfM0uiv7Lt0d8av4IbP8+8VXV4PLeku9AoNT1hVhnzUlcguDRg Btdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=WsI22f2hs6Wj+3oQIsIfmPRS88CFLIU08GwcI8TkTws=; b=Nc1lNBbG6S5F5c7sEjdJ2fvMqlPQgaSTIAP3yQbT1jpmOI+M7YYHYUvKHtS5cxJSSp UNzWJInK+wByOdvhqhzZu4YTVhGsLEkKMEop7CJ9MhBmz43UxxhMmxnoHht0UEsg9MTC KeLN2BMLcL9Dru3xagZX1xKpP9VL3Y+RrqkgDWxZxow/K45co++lAhq5gi7jqVqdvigM 9lbQ8p7/yiwIMUm/VfVhPbFV4ItD+ura0Mqq+YGRuydF1o49K4T6hcIU+ToQvOQXDekW iFg1RdMBouwaHavlV6aTBpEaa68AEmOLWbmp3qi+fFMxKKHuAOxamC7A5g6zYhDvq6ex 12PQ== 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 w4si1430253otl.214.2020.02.27.04.26.05; Thu, 27 Feb 2020 04:26:17 -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 S1729127AbgB0MZ5 (ORCPT + 99 others); Thu, 27 Feb 2020 07:25:57 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:40074 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729010AbgB0MZ5 (ORCPT ); Thu, 27 Feb 2020 07:25:57 -0500 Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01RCHE6H017057; Thu, 27 Feb 2020 07:25:30 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrwk2pv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 07:25:30 -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 01RCPSl5004006 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 07:25:28 -0500 Received: from SCSQCASHYB7.ad.analog.com (10.77.17.133) 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; Thu, 27 Feb 2020 04:25:27 -0800 Received: from SCSQMBX11.ad.analog.com (10.77.17.10) by SCSQCASHYB7.ad.analog.com (10.77.17.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 27 Feb 2020 04:25:27 -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; Thu, 27 Feb 2020 04:25:26 -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 01RCPMxp030792; Thu, 27 Feb 2020 07:25:22 -0500 From: Sergiu Cuciurean To: , , CC: , , , , , , , Sergiu Cuciurean Subject: [PATCH] iio: adc: max1118: Use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 14:25:15 +0200 Message-ID: <20200227122515.16628-1-sergiu.cuciurean@analog.com> X-Mailer: git-send-email 2.17.1 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-02-27_03:2020-02-26,2020-02-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 clxscore=1011 lowpriorityscore=0 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002270100 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 [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 --- 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, -- 2.17.1