Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1073660ybf; Thu, 27 Feb 2020 04:36:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwZpgA0120nQIcOQE9/kf9bt83DmyIM3HV0EARxqcU0ADLl8dRssRFvOvRAeqE4a5HZjXai X-Received: by 2002:a05:6830:1e64:: with SMTP id m4mr3207287otr.244.1582806991435; Thu, 27 Feb 2020 04:36:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582806991; cv=none; d=google.com; s=arc-20160816; b=fPl/zFOXM5oMM9WQ5IDPwIqcSYl0L74MUaUyHhvONweCFFFRh6R3BNNiiDVVqkhkY7 rsSBf/K07rK18rwmMqaoQjwGtneuvqpIIyt8cjF5KJ3KgObthAyhGrZhhUvNLZQ09GIq 1XnoYetF7cCUGg/DgGkon7PZKG5TbIV1NC/4tZclCebCY4FZgQTeZPkWVu1SLFRQ+jHv 0UGxLlLc09tbOzCNzfMPc2Wj3Jht/xQI3ncqWZWBpWNYijAuSUM85/ZChsaIIeKdz7zh VFeg8uVQlLmC0oXXSPH2CHHqPFhJHgkFjOoExYpHnsus69fL0P1jzlVw/2bXsrPWcSLk VgiQ== 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=2VyXbZkMHVtFJaxMadI3SJLcZ2Ux0eCSTu65Jldj09c=; b=GOjSspPZGFdess12JLBDigJSVMRm5GoO5ex3UnIWb/OVGTcTD4QuxMJBmLQNsycE9H ncSBEMtqlrvSmcI6iAyXm0nzFZmzLOAyxNLGqkBRtE4Zs2wjDobuM7XtM9jU9irX49qf NdFipEzPqxwAYUeIZkj3vsHWl4pgSnse6AI7rujBASFpuPQK1ZvG3yE1aQ+m5NdA20Ua F3JNZitpd67jl74F5MLHDBqj4IiObax2NipRAuMaOJ41Ge+xqprdVA4lw3hlpFYfht4P ABJD4O2vj7HpFK7sswtbnuIMgYu1FR5VCwnSnm0EQUIf3NhQuahEwxtQdxcK6nt3N8/q /kTw== 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 j8si1335492otr.161.2020.02.27.04.36.18; Thu, 27 Feb 2020 04:36:31 -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 S1729082AbgB0MfC (ORCPT + 99 others); Thu, 27 Feb 2020 07:35:02 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:53044 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728999AbgB0MfC (ORCPT ); Thu, 27 Feb 2020 07:35:02 -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 01RCXQcO028667; Thu, 27 Feb 2020 07:34:37 -0500 Received: from nwd2mta4.analog.com ([137.71.173.58]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrwk3jy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 07:34:37 -0500 Received: from ASHBMBX9.ad.analog.com (ashbmbx9.ad.analog.com [10.64.17.10]) by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 01RCYawT046758 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 07:34:36 -0500 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX9.ad.analog.com (10.64.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 07:34:35 -0500 Received: from ASHBMBX8.ad.analog.com (10.64.17.5) 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:34:35 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 27 Feb 2020 07:34:35 -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 01RCYV5t031346; Thu, 27 Feb 2020 07:34:32 -0500 From: Sergiu Cuciurean To: , , , , CC: , , , , , , "Sergiu Cuciurean" Subject: [PATCH] iio: adc: ti-tlc4541: Use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 14:34:27 +0200 Message-ID: <20200227123427.20249-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=952 suspectscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 impostorscore=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/adc/ti-tlc4541.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti-tlc4541.c b/drivers/iio/adc/ti-tlc4541.c index 4965246808bd..77620359b54c 100644 --- a/drivers/iio/adc/ti-tlc4541.c +++ b/drivers/iio/adc/ti-tlc4541.c @@ -189,7 +189,8 @@ static int tlc4541_probe(struct spi_device *spi) /* Setup default message */ st->scan_single_xfer[0].rx_buf = &st->rx_buf[0]; st->scan_single_xfer[0].len = 3; - st->scan_single_xfer[1].delay_usecs = 3; + st->scan_single_xfer[1].delay.value = 3; + st->scan_single_xfer[1].delay.unit = SPI_DELAY_UNIT_NSECS; st->scan_single_xfer[2].rx_buf = &st->rx_buf[0]; st->scan_single_xfer[2].len = 2; -- 2.17.1