Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp219695pxu; Fri, 4 Dec 2020 01:19:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHAkX0P3UPCRtSk/aAmKhhD1Hstb+EAegdkw9DR0fuJDIBnIp5naSxKZTP55skq6qa3HdO X-Received: by 2002:a17:906:a047:: with SMTP id bg7mr6177020ejb.30.1607073585751; Fri, 04 Dec 2020 01:19:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607073585; cv=none; d=google.com; s=arc-20160816; b=CiR6fyfsOgw+pYsnzlrF695tkBVm/aQxHYB8hoCzP1MTBRvcgfXBdZqtb0t89K/jYd /YrYFKRhMFHOor5v1ac3vg+ZD4lnvvFAm0BvlaHm3yWAUTMyxIuldCQ2qLXdsd2sfsa5 4lUHp3gOmy2H5PM7NqELZMEbhJVd1QmcxE19xe7RmUndCUD7xS+SaAqm4TkMuTsJ67S0 R5UfKYhwwmXywLXoCBuDHj5DZ2hBwunb7qN5kxLTDQQKg7alBr04x8aF3H9wIQor1fu5 6By0F6+0l7vng9QyEyLUS5reNw3TRmuVWC8r/B+oGc2ZeKQQlfGo6sm58RPt+WbGa9q5 kpOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=AojGSKgNg1aT2amJW2qqNq5/35x1v0VWGCA+IrGd+tI=; b=becbISLYONVHSswFWQ1ECd8ByhWZx7CYuGLdv0sC3cqaIOzv52Wpl3LxTZnI0X2s07 9WUiYFjeFqhGLMkKIMaQJ5xmhWXAP/M4kWwsYTnjfapzjeDco8WtYXQF7KG1Ub9bJbIX hBH0wO1m/oVhnAFi6WbsUBxJ3SFyBzmJF7WkKAGCuJCvk7UfEsgwn3aSpa5A5c2QRfoD rsTPPWsd++nGrYo7qtN1y0KwRnxXkR/H8YSk1CatYiwaxS6qCYSfpUHIfgtP8gXR+Bm+ CDDY3r4BVbsmoqyU/XSJY/cblTOR4Qn3RQxpxYbhVff/4n+srdyxemiYKrxz47wb8O5k Hk5g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dc22si1125778ejb.568.2020.12.04.01.19.22; Fri, 04 Dec 2020 01:19:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727518AbgLDJPx (ORCPT + 99 others); Fri, 4 Dec 2020 04:15:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726636AbgLDJPx (ORCPT ); Fri, 4 Dec 2020 04:15:53 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C801CC061A4F for ; Fri, 4 Dec 2020 01:15:12 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id B79A01F45EFB Subject: Re: [PATCH 1/2] platform/chrome: cros_ec_spi: Don't overwrite spi::mode To: Stephen Boyd , Benson Leung Cc: linux-kernel@vger.kernel.org, Simon Glass , Gwendal Grignou , Douglas Anderson , Alexandru M Stan References: <20201203011649.1405292-1-swboyd@chromium.org> <20201203011649.1405292-2-swboyd@chromium.org> From: Enric Balletbo i Serra Message-ID: <03518a00-c30c-a3ba-d26e-10bae4060640@collabora.com> Date: Fri, 4 Dec 2020 10:15:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201203011649.1405292-2-swboyd@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stephen, Thank you for your patch. On 3/12/20 2:16, Stephen Boyd wrote: > 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 > --- Acked-by: Enric Balletbo i Serra > 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) >