Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp822713ybf; Thu, 27 Feb 2020 00:05:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwxKsn+om986YUahRmOu0FRRTa3LMkz7vKiPnpzAbrYPx3xeHB6DLod+fWDjKwa92l2CM1w X-Received: by 2002:aca:c0c5:: with SMTP id q188mr2223509oif.169.1582790723810; Thu, 27 Feb 2020 00:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582790723; cv=none; d=google.com; s=arc-20160816; b=tA1nIYux1vhFhsstLzTDyir4JOamTRrZ0UJkD0roS3zgBCVKiLVP6gzMgyb8SRefuK 6hKhWQLKhVxGBFDqThpjEbLHvtu22IRG5nNtxbJvW7MZ6FgaFs6uxR+ZgfPqb74jrYi5 THf5yFMywIP7UKqhszVRhaivUJxamBTr+fWX02XVEVjUS8E4uT4cxOJhLBvX9e1Y0e4q 0QsfFsSls6kQtnN8JVnD0oGPwWgSBRtIDjW3tAYuQNh+41XzOkNNW4F5NsJEc4VbgLX6 I5W1x8gsvRqfeahaPA7E6wGIx62YBrnSAdEqkfyd/cuNRr1fb5hi/uj36+BkvFmZQl1I 1Rmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=BaYQLgeCI1rO6ixqn/eQi+fLMvsUWIjrYTbX4FLvO0Y=; b=cs3XmZXlhpymOGjgWH+RtVRjQIkK0bO3MZv2522cWFWyBhxFbD7eW36hBVzMKlI0JK sHsZR/YFVqKvAS1Du3rek0yIfWoxONAcHO6qf0vudK5eDKMp3ERqVQ0b0l9t/hOf9jB2 YDXqkNc+iwRNnFWd1XQ2vpETtsmI6hg0BC5ce6T0uu3x08mxiEhDgZvqGNScbosJwQ1H O0McmJgdJ7f0WTqYMv4jHnpKKlcCW9s1VzBEN1qBYaIUD6WiRehNI1wm9FCrz7RF+pYo oLYls35qsZyyI9GupnXQnzf68K+u0qXzZkVXtWwPKBMIFDd3OgkdabxwhR2xGj2XJwpJ bpWA== 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 h28si1268628otg.63.2020.02.27.00.05.12; Thu, 27 Feb 2020 00:05:23 -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 S1728520AbgB0IFC (ORCPT + 99 others); Thu, 27 Feb 2020 03:05:02 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:21380 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726999AbgB0IFC (ORCPT ); Thu, 27 Feb 2020 03:05:02 -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 01R7t7m2028280; Thu, 27 Feb 2020 03:03:53 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrx2cqm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 03:03:53 -0500 Received: from ASHBMBX9.ad.analog.com (ashbmbx9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 01R83qeq031704 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 03:03:52 -0500 Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) 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 03:03:51 -0500 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB5.ad.analog.com (10.64.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 03:03:51 -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 03:03:51 -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 01R83ll3012001; Thu, 27 Feb 2020 03:03:47 -0500 From: Sergiu Cuciurean To: , , CC: , , , , Sergiu Cuciurean Subject: [PATCH v2] tpm: tpm_tis_spi_cr50: use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 10:03:39 +0200 Message-ID: <20200227080339.6910-1-sergiu.cuciurean@analog.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226114347.27126-1-sergiu.cuciurean@analog.com> References: <20200226114347.27126-1-sergiu.cuciurean@analog.com> 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_02: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=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002270063 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 --- Changelog v1->v2: *Change to proper subsystem prefix drivers/char/tpm/tpm_tis_spi_cr50.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm_tis_spi_cr50.c b/drivers/char/tpm/tpm_tis_spi_cr50.c index 37d72e818335..ea759af25634 100644 --- a/drivers/char/tpm/tpm_tis_spi_cr50.c +++ b/drivers/char/tpm/tpm_tis_spi_cr50.c @@ -132,7 +132,12 @@ static void cr50_wake_if_needed(struct cr50_spi_phy *cr50_phy) if (cr50_needs_waking(cr50_phy)) { /* Assert CS, wait 1 msec, deassert CS */ - struct spi_transfer spi_cs_wake = { .delay_usecs = 1000 }; + struct spi_transfer spi_cs_wake = { + .delay = { + .value = 1000, + .unit = SPI_DELAY_UNIT_USECS + } + }; spi_sync_transfer(phy->spi_device, &spi_cs_wake, 1); /* Wait for it to fully wake */ -- 2.17.1