From mboxrd@z Thu Jan 1 00:00:00 1970 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.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EDA9FC5DF61 for ; Thu, 7 Nov 2019 13:13:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C46E82075C for ; Thu, 7 Nov 2019 13:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573132431; bh=eDx13pO/r0cFHaUr3AZh8pvkLkC487n5+eEEXVN6WRI=; h=From:To:Cc:Subject:In-Reply-To:Date:List-ID:From; b=vBSIMbbbfht+pyxgNoM5L4Pj9n62L09xnmyo/VuJS/168fP4L/FOhwIPj13m3Kn4R 0kcco/sWZkgTWgEdFJfpyK1/2OleFs17yN87XiJrRxuulzvVfmIYQXk6CsweItjMku 52orHv/FFxwyg023N5Zi9i5D1h3bnh70Z8B3c80E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388990AbfKGNNu (ORCPT ); Thu, 7 Nov 2019 08:13:50 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:39532 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727619AbfKGNNt (ORCPT ); Thu, 7 Nov 2019 08:13:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=WOmUZ1RYVjZFQHJZFGdZnIC3fpebuUYqvoeEbLXTn+Y=; b=lXZ5OiVGTfbS ZivDSSIVQrHmenj9/YfGHVi9li7zosETEuemOS75d5g38zHWrSTu7/KcxC4GthelV01ZY6Q0X8Tk4 b4hOg6VXj6n33UqE4MkYyNmO2muWu9BjBt5odI9zgcNmtnhrJhsTZ5aTMxEFcOZ2ZuoOSy7J+MNvT ivQYs=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=ypsilon.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iShbZ-0004Nm-I5; Thu, 07 Nov 2019 13:13:41 +0000 Received: by ypsilon.sirena.org.uk (Postfix, from userid 1000) id 0A18327431AF; Thu, 7 Nov 2019 13:13:39 +0000 (GMT) From: Mark Brown To: Chris Packham Cc: bcm-kernel-feedback-list@broadcom.com, broonie@kernel.org, kdasu.kdev@gmail.com, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Mark Brown Subject: Applied "spi: spi-mem: fallback to using transfers when CS gpios are used" to the spi tree In-Reply-To: <20191107044235.4864-3-chris.packham@alliedtelesis.co.nz> X-Patchwork-Hint: ignore Message-Id: <20191107131340.0A18327431AF@ypsilon.sirena.org.uk> Date: Thu, 7 Nov 2019 13:13:39 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch spi: spi-mem: fallback to using transfers when CS gpios are used has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.5 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 05766050d5bd9af24dcaec6b29255a6f2b324543 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Thu, 7 Nov 2019 17:42:35 +1300 Subject: [PATCH] spi: spi-mem: fallback to using transfers when CS gpios are used Devices with chip selects driven via GPIO are not compatible with the spi-mem operations. Fallback to using standard spi transfers when the device is connected with a gpio CS. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20191107044235.4864-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Mark Brown --- drivers/spi/spi-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-mem.c b/drivers/spi/spi-mem.c index 9f0fa9f3116d..e5a46f0eb93b 100644 --- a/drivers/spi/spi-mem.c +++ b/drivers/spi/spi-mem.c @@ -286,7 +286,7 @@ int spi_mem_exec_op(struct spi_mem *mem, const struct spi_mem_op *op) if (!spi_mem_internal_supports_op(mem, op)) return -ENOTSUPP; - if (ctlr->mem_ops) { + if (ctlr->mem_ops && !mem->spi->cs_gpiod) { ret = spi_mem_access_start(mem); if (ret) return ret; -- 2.20.1