Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1121310ybf; Thu, 27 Feb 2020 05:26:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyBdfdOIoKIUfmar8GF72dc9Tk5Z0qY2rqoLnBP45wdCtOcJ6njBmM1UUM7WhccF7E0qOH3 X-Received: by 2002:a9d:51ca:: with SMTP id d10mr3342379oth.76.1582809983206; Thu, 27 Feb 2020 05:26:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582809983; cv=none; d=google.com; s=arc-20160816; b=p+mSI05NJqJjkhZBfbYD3xL5WeEAVCwUX19oobuPUT0jjvr2YyfSPNL5Yx8IHrgmsl /OrhjJnyvDkGV8VxxcEnbs6X/museJxUBBe6a/IiSC0rLvEhnG8Y7m+XeM4tzCj7JJcW +EUqzMN1u8s6jO08VxGNANRM+cuVldxC8sAcuLzn7lXVnzkhcHL+USu2s63PfL7dJ02V nPYvrCcWWWro+qVF3ltIh9pC0WW5laG45pWLDKk4m2wKwlp/cZriJzzZ8R0GkhSgI1Ym nIFHCd9Wk1J+TD2/0l3wV+oLOTWRaKPzXuNxHLSbeVsoOItAY2JCMJ1e1w07x12aRkaR q2Jg== 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=CRzMqJfp01LLq7t8lJCVjrJJSIlm5R77OYyM4C2K8Dw=; b=mzqmLVvR99PytS2gr/PLHOMz9uZO1CQLyyY9pu5sWsKb6kCgYC9e9TkcgjuIynk+yQ BXraPhj6gSMKp2MzH6ci7zFeWFr6bsfeAkmht4EQuCPIQaACmK5P0IId/iVg5KYvnAc8 fBSBXANeQOOyLpQrzT+zQ9PAT+zwBJ8ly+HDwj0JwvxALrxy3z8YigGdP3kWpZ9Iu3zd uomBD0f7Kh7fLbnwKiwk8/syhG8z+7ClBm3G82fTEoOJf7/uKHYh6EvryMlbdohAsWGA YZ8O899Xu7cwZ7l5CkY8tKBIrmAf6Faf7sx7fXOAnlSv+be8U/n0hu8mf2rHd7UoH6Ia mOxw== 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 m12si1265678oim.195.2020.02.27.05.26.10; Thu, 27 Feb 2020 05:26: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 S1729158AbgB0NZt (ORCPT + 99 others); Thu, 27 Feb 2020 08:25:49 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:49850 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729100AbgB0NZs (ORCPT ); Thu, 27 Feb 2020 08:25:48 -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 01RDDkQ3029475; Thu, 27 Feb 2020 08:25:13 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrx37wt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 08:25:10 -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 01RDP8mX013472 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 08:25:09 -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 05:25:07 -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 05:25:07 -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 05:25:06 -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 01RDP4pQ026410; Thu, 27 Feb 2020 08:25:04 -0500 From: Sergiu Cuciurean To: , , , CC: Sergiu Cuciurean Subject: [PATCH v2] media: spi: gs1662: Use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 15:24:54 +0200 Message-ID: <20200227132454.2875-1-sergiu.cuciurean@analog.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200227131000.29264-1-sergiu.cuciurean@analog.com> References: <20200227131000.29264-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_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=976 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002270103 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 the remaining delays drivers/media/spi/gs1662.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c index d789d82df7c4..f86ef1ca1288 100644 --- a/drivers/media/spi/gs1662.c +++ b/drivers/media/spi/gs1662.c @@ -147,11 +147,17 @@ static int gs_read_register(struct spi_device *spi, u16 addr, u16 *value) { .tx_buf = &buf_addr, .len = 2, - .delay_usecs = 1, + .delay = { + .value = 1, + .unit = SPI_DELAY_UNIT_USECS + }, }, { .rx_buf = &buf_value, .len = 2, - .delay_usecs = 1, + .delay = { + .value = 1, + .unit = SPI_DELAY_UNIT_USECS + }, }, }; @@ -175,11 +181,17 @@ static int gs_write_register(struct spi_device *spi, u16 addr, u16 value) { .tx_buf = &buf_addr, .len = 2, - .delay_usecs = 1, + .delay = { + .value = 1, + .unit = SPI_DELAY_UNIT_USECS + }, }, { .tx_buf = &buf_value, .len = 2, - .delay_usecs = 1, + .delay = { + .value = 1, + .unit = SPI_DELAY_UNIT_USECS + }, }, }; -- 2.17.1