Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4117807pxu; Wed, 9 Dec 2020 08:46:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4i9LdcX6GqGzKP+5QssvlePdmMqqaJpnqKEjVJr1Z4dC8UFLBM/QTd05138M+dSwTCG4u X-Received: by 2002:aa7:c403:: with SMTP id j3mr2790147edq.217.1607532415550; Wed, 09 Dec 2020 08:46:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607532415; cv=none; d=google.com; s=arc-20160816; b=oN+lO7AODF/gMmVh8yC8M8vOhxr/REKk6bgl6G1yiDwDWk/jddbz/5p0sVFJ4Z8zdg L5HYHyzBIqNgIgnAKsnvSr6B6vS5fdDWAlfr6oL64FsJCBj4Tj1mAifd65u6DFsZbSc6 wwnuVBmoZGykkYrE9mkxb2AMwzXjmXLs0BGI3g0QsazP5NLi9fCCEITNT5m4x5h12fX7 KM7DMisCBFs9kLAiHuQs/hZ2IXGcwdq+eI0UlMHhBjEyh9et8xoXzMoNekxle2L7LvVx woSaqFgbMEDbNQ8wxnoUzNHY8xEcYoQs1P9zTYc50K0XlcHYlkJzS7fUXX/XzHJQ4qf0 t3gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=G7EU11PHgFsJFA5nDKbU03Fk+7GyGqDKScGIXgeNQqU=; b=beZPjzPayQX7vTH38pa5lrNnIul1S8l5xjkmqh3J9l07RPuLXIhtCYZQRGR3vz3iUG w3NAT+HtyOyRfu5zw1MjPPA3AMTT87KWlUpRMf8HP5/PtHGK6Rh8PgY3MIdwcIEf/Gk0 C5nx+yK4w3XLXmGPMJSxvU4FRmghZAHwK8Fy0Xe0rvUsM6MMxRO6/jsx6GMlDPjegyP+ VqdFSt5+Zg2tv7VYo5Ss6rRsC2FAwpnvJpQeWxjDFWwNKyxw8jnGCjxCA0iF9GnxujjB xDBspAOYeFB5SLZUxx3FtvRG2MhaYeBYhSVTcNZvqgvInCda2k5jhl/APpvc64yLF0IL hxbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eG+oWcIv; 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 j23si1197136eje.690.2020.12.09.08.46.33; Wed, 09 Dec 2020 08:46:55 -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=eG+oWcIv; 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 S1732146AbgLIQmo (ORCPT + 99 others); Wed, 9 Dec 2020 11:42:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730388AbgLIQmo (ORCPT ); Wed, 9 Dec 2020 11:42:44 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A132C0617A6 for ; Wed, 9 Dec 2020 08:41:21 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id x6so2436872wro.11 for ; Wed, 09 Dec 2020 08:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G7EU11PHgFsJFA5nDKbU03Fk+7GyGqDKScGIXgeNQqU=; b=eG+oWcIvbvjeSujB8w9rC9FysPL6rBXwMAfVo+NMk/6Vn5Myb8MwqqPgOooFPsZ/uV F3mZu/o6uqakiRyeYYzyVDrlewRY41v1pg/KMxL2jGhKoZO8r32FikNzZL9F7NnxW2xT WtfBARKMIm2z1zU5M6Bvhn4czPwUeXdSJm0Xg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G7EU11PHgFsJFA5nDKbU03Fk+7GyGqDKScGIXgeNQqU=; b=clMlu8py+9QpiE59lxy0tCYjS3bIoes/zR7wjZY7TgZF4/4XmBGvgEgpEAGfLBqy7B hx3+k3oCMrp51F2ek5EH2PI24eBtwbp03Cc/wynwpiXt5rINj2zBmOfRWdOW5XeGkHip WpDxwo09/uQ7HVEVKKAXEj+2mCULs+C7r9ZwVknJfVipioIDKq6xSETnAxTx1Qe0jrDV X5IM3hlnQKE2F15iH3PGuM+Olq3YofufSzZn2NeoGyi4n1IQrjWcD+VHRekUt/LHfnzc fnJ/3VkF9+YbGJ1Bo9W5ja/rMMDj1t/nJVuUDQDaGGkj0hDqRN8lbHwI1WqUnfxx+V0g kTLw== X-Gm-Message-State: AOAM53353/vSsRW3Jh0tanNFSYl0gldStHEUeCydYByxlbPFgaEh2cpd qR1KMmMI7L/PeMf/UJPobzpogafZ8/+ffDdDfUxpTAP0Jp9lnA== X-Received: by 2002:adf:82c8:: with SMTP id 66mr3598316wrc.420.1607532079884; Wed, 09 Dec 2020 08:41:19 -0800 (PST) MIME-Version: 1.0 References: <20201204193540.3047030-1-swboyd@chromium.org> <20201204193540.3047030-2-swboyd@chromium.org> In-Reply-To: <20201204193540.3047030-2-swboyd@chromium.org> From: Simon Glass Date: Wed, 9 Dec 2020 09:41:08 -0700 Message-ID: Subject: Re: [PATCH 1/3] platform/chrome: cros_ec_spi: Don't overwrite spi::mode To: Stephen Boyd Cc: Mark Brown , lk , linux-spi@vger.kernel.org, Benson Leung , linux-arm-msm@vger.kernel.org, Enric Balletbo i Serra , Gwendal Grignou , Douglas Anderson , Alexandru M Stan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 4 Dec 2020 at 12:35, 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 > Reviewed-by: Douglas Anderson > Tested-by: Douglas Anderson > Acked-by: Enric Balletbo i Serra > Cc: Alexandru M Stan > Signed-off-by: Stephen Boyd > --- > drivers/platform/chrome/cros_ec_spi.c | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Simon Glass > > > 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 >