Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1068025ybf; Thu, 27 Feb 2020 04:30:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxaV50vPD9WMIeGnM9CKpF2UwteUnr2uHQ+Ka5rNcCcPTpjolrMh5RBb8oEgKH0R9zc2Mxf X-Received: by 2002:aca:ec02:: with SMTP id k2mr912464oih.105.1582806652585; Thu, 27 Feb 2020 04:30:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582806652; cv=none; d=google.com; s=arc-20160816; b=oqg2lIdQamyGBycMIwRRDlCbxgAuJvBQFh8uQGzhNV33CN67t6NQqoLB2TAIVIQ40a RDmmcMalOQi/GQcIWlnSpEZD4KdmFO43CjTF8HUDA0129Ze4etcHV1pW+n9awQSF7b26 41lgiAyenJl9x7vg4G1l9WIPeyw/YklJtpkCP0nH81Ur1aksFKu4Da40709siXA/y/Lz sRtB3eFknlbpgL58lUfgu2uxoBZcbxfhaSaMtNyfNzvk8Owi8Yt6Eyhisk1AmJp9y+BV w1J59trXzxEz3zhuXtSkbegBfpOEI+oJLJfTCzJeNYHa+nZJmLbrBwxaF20RJ+5lNbEO hA+w== 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=mX/W+J7scysoV6s/yz3EvZWOPDxeIZEFg4azhGiJXfQ=; b=r7u99GI2frYZOsGn1+PiAOZxnVOj/FkDZj0zLnmndUn7+dpYSM6TeogmnQS2IhhaAp rvmux46rG8Al7u7zCeN05+9WYb6elI3jDptst7L09Wijf0nKgELxpa0nvEB1W4A4JoK1 NB4ZBh2v40FXVOBkzMaaayRFbCgK4Zl03Ci7+XQcX/0aMi3rLs1uO2kqVQ3i/8CjO+QU F1n+Vpqv7WqxtKnQHj/jvDZ2DA+cUsMQCW1R0Qth5wujNmcazFx5dkglHaru2S3zu/Zi +MXIIQ7c+QXUbHDJpWUXauYCFxjwmnnGXOA8uYfUmYaKuxRGSTkxZNkv+/0O77blxa3j xZ7Q== 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 24si844651oij.155.2020.02.27.04.30.40; Thu, 27 Feb 2020 04:30:52 -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 S1729049AbgB0MaV (ORCPT + 99 others); Thu, 27 Feb 2020 07:30:21 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:20076 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728856AbgB0MaU (ORCPT ); Thu, 27 Feb 2020 07:30:20 -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 01RCHdHW031294; Thu, 27 Feb 2020 07:29:57 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrwk33m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 07:29:57 -0500 Received: from SCSQMBX11.ad.analog.com (scsqmbx11.ad.analog.com [10.77.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 01RCTtgC004578 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 07:29:55 -0500 Received: from SCSQMBX10.ad.analog.com (10.77.17.5) by SCSQMBX11.ad.analog.com (10.77.17.10) 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:29:54 -0800 Received: from zeus.spd.analog.com (10.64.82.11) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 27 Feb 2020 04:29:53 -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 01RCToKg031017; Thu, 27 Feb 2020 07:29:51 -0500 From: Sergiu Cuciurean To: , , , CC: , , , , , , Sergiu Cuciurean Subject: [PATCH] iio: adc: mcp320x: Use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 14:29:40 +0200 Message-ID: <20200227122940.18243-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/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); -- 2.17.1