Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp136091pxu; Wed, 2 Dec 2020 17:22:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSO2g1SJtQdqoHBBQjylEvDKRWytepOP1A5K/B5szEnLmipkFgd3fEqu6yzroNW0p2mpyX X-Received: by 2002:a17:906:e28c:: with SMTP id gg12mr532713ejb.74.1606958564292; Wed, 02 Dec 2020 17:22:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606958564; cv=none; d=google.com; s=arc-20160816; b=atlYHvNQaJZMqg9gbB2e/yOsrUWfgEdMQh0M6lro8WJlgFhRfSLNmaMDtRG0RBbap0 KQIqmKPd19kdd47gIRa0b+K+aIYXrrGtU9/P/JkyxqVKCo6KwjqjKHWjDYBnLD33uR5d Kkn3Vo++UyMtVw5SefXsrKIGir6SRDJqTK/j39Z1kylqujzVSjBzLvMRZyRdOtojxT/h JHACqJ5TQ5pj+XbbEiLI5d0DJtj4bbBG3GD4GW/0rUK+ebm8YzncbWyx6qNrGnJa0PgP rKhFhUDzKAHk5uPuePcb9mDA7h0RPAnSQkSgwYar3iR9RI8gVcM31bMNw3rIwFWPOjeM /mIw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hD9iy6y3twkRO/sasJ9OUkDNnBcrZtQW8hMDw++T9NI=; b=Mwr9/qPYdzh1OqXpekCIqNFGUUv3eYAUIj4dz5/b6C+NQdXNDyAWlUOrmg4MSu7XJY 78Eigx0kse4zSMjjyRfgP7kdUUBMRv7AhBJMVHiqSxZqCMbs6rJADMzZwMXCq1x6j3Ec 8IpBDSeWQZhgwWpJpTvA02tUHJDf6kmXfXNPAWwIxaQbkvvbeYpLdh0lTAkMaKVpKC0f SKJxYguwGLaNqjF0dYpok0mZA/jz2nvKEvn+lvAm8lmLMe3XlOdRwjFbNMMUdHkBwSo6 3VmZpMYAcVbkyxcNGVlGLbff8oabub/aZG7xS2hOyCpfWP6CpsJ1fJUGXRHzAdujVg5M pYuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QBOhggJd; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gw26si163488ejb.537.2020.12.02.17.22.21; Wed, 02 Dec 2020 17:22:44 -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=@chromium.org header.s=google header.b=QBOhggJd; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729307AbgLCBRi (ORCPT + 99 others); Wed, 2 Dec 2020 20:17:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727727AbgLCBRi (ORCPT ); Wed, 2 Dec 2020 20:17:38 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58A90C0617A6 for ; Wed, 2 Dec 2020 17:16:52 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id o9so177373pfd.10 for ; Wed, 02 Dec 2020 17:16:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hD9iy6y3twkRO/sasJ9OUkDNnBcrZtQW8hMDw++T9NI=; b=QBOhggJd+oxU3sS9QhXlTKlmR+l0VmhNxMFxIMAiF0jdc4fpGxkK21Y8tlPZBxn7qb fUTAtm/RvZ14Tr/zupt8FEdTRZMXXH2kTnAgauM9WXwmUAeLGabIMgh+0+ZOrDdWKraU eN2KaOXwW1WdhLUGY1WXFYbDhVgqy2HwwJmWA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hD9iy6y3twkRO/sasJ9OUkDNnBcrZtQW8hMDw++T9NI=; b=JWpy51OJPQoOTYsFUd5nDY5l0gCcVKcQ90X8wnmLDnwluv15ziY4ZguDhlTW0gHFM3 pnLfnwRc00J2wBx7T8f7Iux2O3h0QaqvtMuSHFkQFbToZL9Joh+jMpFugJxnFa3cvQAm AbP688Tlw4jL4RCPl1KHZnbHqo8sMHgoO2huz3u3s7uHmtdLzu7jPqjiuUu5Iueing6c /KxROSF5FVOSpBFneU88lTh4a1aFp2q9BGMxAkrHYL2N/Vb8/OpL7i3tb6e4zRideNhO iyaZ6lLI860iUiATOjpFKK6FkdxXJ4jEylNB4LMBj6QPdVrpYnOeJAiv+gd3hOHTyj0X h7dQ== X-Gm-Message-State: AOAM531paHah0lwwZrv6DCNXHQeJ1x3PlZPePAgZg7v7qiREviM1qwt0 vvfqykwWNeeebrXnnZlS8AVCZg== X-Received: by 2002:a65:52c1:: with SMTP id z1mr920527pgp.46.1606958211920; Wed, 02 Dec 2020 17:16:51 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:201:3e52:82ff:fe6c:83ab]) by smtp.gmail.com with ESMTPSA id d19sm123292pjs.0.2020.12.02.17.16.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 17:16:51 -0800 (PST) From: Stephen Boyd To: Benson Leung , Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, Simon Glass , Gwendal Grignou , Douglas Anderson , Alexandru M Stan Subject: [PATCH 1/2] platform/chrome: cros_ec_spi: Don't overwrite spi::mode Date: Wed, 2 Dec 2020 17:16:48 -0800 Message-Id: <20201203011649.1405292-2-swboyd@chromium.org> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog In-Reply-To: <20201203011649.1405292-1-swboyd@chromium.org> References: <20201203011649.1405292-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: Douglas Anderson Cc: Alexandru M Stan Signed-off-by: Stephen Boyd --- 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 dfa1f816a45f..f9df218fc2bb 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) -- https://chromeos.dev