All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Mark Brown <broonie@kernel.org>,
	lk <linux-kernel@vger.kernel.org>,
	linux-spi@vger.kernel.org, Benson Leung <bleung@chromium.org>,
	linux-arm-msm@vger.kernel.org,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Gwendal Grignou <gwendal@chromium.org>,
	Douglas Anderson <dianders@chromium.org>,
	Alexandru M Stan <amstan@chromium.org>
Subject: Re: [PATCH 1/3] platform/chrome: cros_ec_spi: Don't overwrite spi::mode
Date: Wed, 9 Dec 2020 09:41:08 -0700	[thread overview]
Message-ID: <CAPnjgZ1nV4FTvA9zAh046Vpki01WfVcowP8CPxrx1b3dONM-Og@mail.gmail.com> (raw)
In-Reply-To: <20201204193540.3047030-2-swboyd@chromium.org>

On Fri, 4 Dec 2020 at 12:35, Stephen Boyd <swboyd@chromium.org> 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 <sjg@chromium.org>
> Cc: Gwendal Grignou <gwendal@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> Tested-by: Douglas Anderson <dianders@chromium.org>
> Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> Cc: Alexandru M Stan <amstan@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>  drivers/platform/chrome/cros_ec_spi.c | 1 -
>  1 file changed, 1 deletion(-)


Reviewed-by: Simon Glass <sjg@chromium.org>


>
>
> 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
>

  reply	other threads:[~2020-12-09 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 19:35 [PATCH 0/3] spi: spi-geni-qcom: Use gpio descriptors for CS Stephen Boyd
2020-12-04 19:35 ` [PATCH 1/3] platform/chrome: cros_ec_spi: Don't overwrite spi::mode Stephen Boyd
2020-12-09 16:41   ` Simon Glass [this message]
2020-12-04 19:35 ` [PATCH 2/3] platform/chrome: cros_ec_spi: Drop bits_per_word assignment Stephen Boyd
2020-12-09 16:41   ` Simon Glass
2020-12-04 19:35 ` [PATCH 3/3] spi: spi-geni-qcom: Use the new method of gpio CS control Stephen Boyd
2020-12-11 17:51 ` [PATCH 0/3] spi: spi-geni-qcom: Use gpio descriptors for CS Mark Brown
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnjgZ1nV4FTvA9zAh046Vpki01WfVcowP8CPxrx1b3dONM-Og@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=amstan@chromium.org \
    --cc=bleung@chromium.org \
    --cc=broonie@kernel.org \
    --cc=dianders@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gwendal@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.