Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1077716ybf; Thu, 27 Feb 2020 04:40:53 -0800 (PST) X-Google-Smtp-Source: APXvYqydlTUpJOTvdYhjNjz/7DgZBro2vjLSMcEHdpStpyjz998Lh7l+BK4SNh3vkHNRu/0f88N8 X-Received: by 2002:a9d:6c01:: with SMTP id f1mr3031396otq.133.1582807253639; Thu, 27 Feb 2020 04:40:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582807253; cv=none; d=google.com; s=arc-20160816; b=E5Ye2GpPHNCal3IQOIBghR6wyBqfOmgVlVhtl3orvJpKfcAFC7IpIgOkYllVrnWfaE QGtaaYrdfDbNqGeS4G0NKw2HEATFRn2FAVAzrleTCKz++9OWdmMojtQGQFDXMKwGGrYT Ew3UnPyCUdcQHVUZPGEW+MJRVuzW9MMWb++lHNx1/O4eJViugrpHtmqWoS7fTlrTAc9q K0Rf2EG4+IvZaqKtMKyVJMiRmgHinhDAhF6LJlO1XnBfIT70wAVpccoLtdeNJRX+vFdQ dR1rEU3/b27WDpQD1A2qj5SPnfqV5hqi2gWKkLXeXQLHQo0ZssduA9rNJUgNVpd8Kpas ak0Q== 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=1tDX1tNt9QtjdSoYjbVPO58wwQvxV7wXhbxPDMBmTCM=; b=nv+ypcZsFRmn+7Z4Temg5AaeUodsT7h45PS9iTKpKgHenpe6+l52llNT3CyieBrqOt FPraygKQGSPGodk5lsgdt8A5ff01LZA4sdWRqBb3mlep9JnLoruRIZTMtYm+AJfp3MRX tiOPaqAPTn2hgR5i88jVUsUkHYlPu8Xi3DY9ooJv4kGlfcdWWpQaSwVw99cx/fDkdF2X PQHcW+DLX1SLUV4Oxf0tP6W4eSC3otZHv5uFB8CaLn7NRCj8XpeBi88WjAGkiCQPdTbk +VZp10QMOl1YPFN4lHqK8xPMNFXXND9wnJBroK7TdXl6JP+ZyykQ5FjwgKzMh9AQeF2L QuWw== 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 u21si1135460oiv.267.2020.02.27.04.40.41; Thu, 27 Feb 2020 04:40:53 -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 S1729075AbgB0Mj3 (ORCPT + 99 others); Thu, 27 Feb 2020 07:39:29 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:42076 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728977AbgB0Mj2 (ORCPT ); Thu, 27 Feb 2020 07:39:28 -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 01RCZGTm013788; Thu, 27 Feb 2020 07:39:13 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrx33s9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 07:39:13 -0500 Received: from ASHBMBX8.ad.analog.com (ashbmbx8.ad.analog.com [10.64.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 01RCdCD0005968 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 07:39:12 -0500 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX8.ad.analog.com (10.64.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 07:39:11 -0500 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB4.ad.analog.com (10.64.17.132) 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 07:39:10 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 27 Feb 2020 07:39:10 -0500 Received: from analog.ad.analog.com ([10.48.65.180]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 01RCd54W031703; Thu, 27 Feb 2020 07:39:07 -0500 From: Sergiu Cuciurean To: , , CC: , , , , Sergiu Cuciurean Subject: [PATCH] iio: imu: adis_buffer: Use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 14:38:59 +0200 Message-ID: <20200227123859.21757-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 mlxscore=0 bulkscore=0 malwarescore=0 impostorscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 phishscore=0 spamscore=0 adultscore=0 mlxlogscore=843 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002270101 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/imu/adis_buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/imu/adis_buffer.c b/drivers/iio/imu/adis_buffer.c index 3f4dd5c00b03..04e5e2a0fd6b 100644 --- a/drivers/iio/imu/adis_buffer.c +++ b/drivers/iio/imu/adis_buffer.c @@ -97,7 +97,8 @@ int adis_update_scan_mode(struct iio_dev *indio_dev, if (j != scan_count) adis->xfer[j].cs_change = 1; adis->xfer[j].len = 2; - adis->xfer[j].delay_usecs = adis->data->read_delay; + adis->xfer[j].delay.value = adis->data->read_delay; + adis->xfer[j].delay.unit = SPI_DELAY_UNIT_USECS; if (j < scan_count) adis->xfer[j].tx_buf = &tx[j]; if (j >= 1) -- 2.17.1