From patchwork Wed Aug 4 13:36:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mason Zhang X-Patchwork-Id: 12418965 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B9B9C4338F for ; Wed, 4 Aug 2021 13:55:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E36E60EE5 for ; Wed, 4 Aug 2021 13:55:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0E36E60EE5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MoMWOd8e1cropsaOMCyiym6EBnlu7evVy3YV6OH9pu0=; b=nXm+H4yiwZoV2Z tGmCE9oIaIM8cPNXm9I6Cn726iAzYZNmztviOazZ4l7Tehx7JKlSccx1ugSg77grGQsoaqpVyTDU5 FBqourARn05Whcra+R3LqKfVvhBJL0s2z/hrj94CjrLhFtQWhl+RkkdLMAtqQly9CTphOT2A067GK gNGDx7scfu/tpkmvXlKknWL4V10xVfRbzyAErdS4Hwb89daD2mHd4Cxysrg8Gk2McIGzQ4rK9jT4R qMLA7SW93Z8IZSiEQGUQWMQes2V6lycLpaHby1Snet9hwm9fbGZm+2SfYWeBuP2YbimJl2TGCMy30 /m43v9e0tKZcxz5F7reg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBHLA-006D8u-2w; Wed, 04 Aug 2021 13:53:48 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBHL7-006D7a-5P; Wed, 04 Aug 2021 13:53:46 +0000 X-UUID: 874801991ff74954a93e0412f599dfa3-20210804 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=RKTH7UPG2X0GdgsTLo6Aj1wqRSXIbOVH2hhGdIjlHLw=; b=SZfaahHXQEtgkUgqT8ZkPxDUWADCCKPyOIxADXdpUsyYFtOtCy/a8xHDhFc3YKWf4fAqm8uy8O4/ef9/rz6YTof2xmKe8V0F2r3ZnjCf9bvDdoTkltVhUs7oCJIKhfiivMYNaNgG45pEUuGsM/CDmgyeuRszFNvObdSJoE5iAXk=; X-UUID: 874801991ff74954a93e0412f599dfa3-20210804 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 906275437; Wed, 04 Aug 2021 06:53:36 -0700 Received: from MTKMBS06N1.mediatek.inc (172.21.101.129) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 4 Aug 2021 06:53:35 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 4 Aug 2021 21:53:33 +0800 Received: from localhost.localdomain (10.15.20.246) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 4 Aug 2021 21:53:27 +0800 From: Mason Zhang To: Mark Brown , Matthias Brugger CC: Laxman Dewangan , , , , , , "Mason Zhang" Subject: [PATCH v3 0/2] spi cs_timing restructure Date: Wed, 4 Aug 2021 21:36:31 +0800 Message-ID: <20210804133630.18519-1-Mason.Zhang@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210804_065345_256393_9783B917 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This patchset has restructure spi cs_timing, as we know spi core has removed spi_set_cs_timing() API, it is a correct decision because it asked spi devices to call it in one more time. so we need find another way to support user set cs_timing. Actually, spi_device set spi_delay for cs_timing is enough, and about how to set cs_timing, just put it one the master driver. We have test this patch in mediatek platform, it can compeletly meets our needs. Changed in v2: - fix tegra spi build err Changed in v3: - merged patch2/3/4 for build pass Mason Zhang (2): spi: move cs spi_delay to spi_device spi: modify set_cs_timing parameter drivers/spi/spi-mt65xx.c | 107 +++++++++++++++++++++---------------- drivers/spi/spi-tegra114.c | 8 +-- drivers/spi/spi.c | 6 +-- include/linux/spi/spi.h | 23 ++++---- 4 files changed, 78 insertions(+), 66 deletions(-)