Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9111563pxu; Mon, 28 Dec 2020 06:57:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXLgAxY2J6SkuYRTmgQCrJIrA9iF0Wvnc0gunCh8NBfUUCdej/VtZxIpuGq8LKr95BOGsb X-Received: by 2002:a17:906:e093:: with SMTP id gh19mr42122955ejb.510.1609167436991; Mon, 28 Dec 2020 06:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167436; cv=none; d=google.com; s=arc-20160816; b=CziUWcP7sU1EhWxs0h1xQzxg84p70YT/f4qenCZ0w2Vpq18zsw6s7E28Tv6bTKdo/T l4SwvuYjqIJ58U9Nq6cGwnpSBIdzc8LRltzlxvqLn2JYFjuF5oV6KdnvSKaxTv1cEclu s19hTxPYnCquzNOj603Ce235+WBlyc1ATE54rDF70A0MCxhfP7YchACDKwwwR2B+mUF5 m6TUPBBrcAsJFiJj4PRkTg25BpwyFz+uZtWZtSXCBwp5fY+62syLrE8J7Q9EnKBukDJS elt9FqTqms8yo4Qrzf8eAihJpd/Iw4Mmn2fYtzeRPKj9iCASQSioM8RmCEwkOtTYGbf6 Qn6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nB887OI4N+Iyet77vZleoakpv0SW8CB4FkBllwS7yTc=; b=USFCSxUqMwkIejERYqn150HPPOCdP+vVV88ILFINtFN6GVWZHWShJTOtI/dr7Srm1q uYDJpLY9aKR5tztmz/zmPH/qwpU7CVmkF5wNPR9M07TWjTVsYj9AuBatBYpgJCuoogAP UclVupsI4E9OmXKB+uFFTSlZMIA4zWJlxU7FGlr71rGuY+nL5Wzn7YC1qx8zzRNqyzZh kYaWQX6gSpo+tewoUVQKydmHpdf9bt0JIc1v9mJzdFBTbieqwUkxuc0InkmTLpGc03Ur SdBY5EL4nZ9CcRKMZqqxV0z7YcmNhroW3w6jmlqCAell2fh9+NuSzpKQRWkIuQxwdWFL +lUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qpCuGqHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q23si20256738edg.55.2020.12.28.06.56.54; Mon, 28 Dec 2020 06:57:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qpCuGqHN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391854AbgL1OSm (ORCPT + 99 others); Mon, 28 Dec 2020 09:18:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:53122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2501990AbgL1OSl (ORCPT ); Mon, 28 Dec 2020 09:18:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 49CCC2242A; Mon, 28 Dec 2020 14:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165099; bh=tNgvctoeVXR7xM+pBVnx4ek8DlN/hObfI0BKU4+kJ/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qpCuGqHN3qnwfDQSSfrCK0UJqVRh5MKbiv20GN0XThreT+o7cggORFdVqWxqfp8Pv YQAhLzAmDEqdNcZ55zTURsqUOAJ03sZr38jl0Rc8NUGP4Rfrgwxrrw4IdHRadjg4ML uFrqYzUrikfyWirX55g6dXVJJoeflE4pf8BovIIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Simon Glass , Gwendal Grignou , Douglas Anderson , Enric Balletbo i Serra , Alexandru M Stan , Stephen Boyd , Mark Brown , Sasha Levin Subject: [PATCH 5.10 381/717] platform/chrome: cros_ec_spi: Dont overwrite spi::mode Date: Mon, 28 Dec 2020 13:46:19 +0100 Message-Id: <20201228125039.255302733@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Boyd [ Upstream commit 74639cbf51d7c0304342544a83dfda354a6bd208 ] There isn't any need to overwrite the mode here in the driver with what has been detected by the firmware, such as DT or ACPI. In fact, if we use the SPI CS gpio descriptor feature we will overwrite the mode with SPI_MODE_0 where it already contains SPI_MODE_0 and more importantly SPI_CS_HIGH. Clearing the SPI_CS_HIGH bit causes the CS line to toggle when the device is probed when it shouldn't change, confusing the driver and making it fail to probe. Drop the assignment and let the spi core take care of it. Fixes: a17d94f0b6e1 ("mfd: Add ChromeOS EC SPI driver") Cc: Simon Glass Cc: Gwendal Grignou Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Acked-by: Enric Balletbo i Serra Cc: Alexandru M Stan Signed-off-by: Stephen Boyd Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/20201204193540.3047030-2-swboyd@chromium.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/platform/chrome/cros_ec_spi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_spi.c b/drivers/platform/chrome/cros_ec_spi.c index dfa1f816a45f4..f9df218fc2bbe 100644 --- a/drivers/platform/chrome/cros_ec_spi.c +++ b/drivers/platform/chrome/cros_ec_spi.c @@ -742,7 +742,6 @@ static int cros_ec_spi_probe(struct spi_device *spi) int err; spi->bits_per_word = 8; - spi->mode = SPI_MODE_0; spi->rt = true; err = spi_setup(spi); if (err < 0) -- 2.27.0