Re: [PATCH] spi: bcm2835: Convert to use CS GPIO descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 22, 2019 at 7:30 PM <kernel@xxxxxxxxxxxxxxxx> wrote:

> Just applying this single patch gives me:
>   CC [M]  drivers/spi/spi-bcm2835.o
> drivers/spi/spi-bcm2835.c: In function ‘bcm2835_spi_setup’:
> drivers/spi/spi-bcm2835.c:883:6: warning: unused variable ‘err’ [-Wunused-variable]
>   int err;
>       ^~~

OK I'll fix this!

> Then loading the module:
> [   30.403459] spi spi0.0: FIXME: setting up native-CS0 as GPIO
>
> But when loading a spi-device driver it does not detect the device.
>
> One note: the logic analyzer shows that the CS line is inverted
> (high on SPI Clock running)

What did you apply the patch on?

Using v5.1-rc1 will not work, you need a later
RC because of other mistakes of mine :/
I would try just using mainline (Torvalds HEAD).

(I removed the GPIO line number print because we should
not rely on line numbers.)

> With the un-patched version I get the following in dmesg:
> root@raspcm3:~# dmesg
> [   27.987287] spi spi0.0: setting up native-CS0 as GPIO 2002
>
> So you see that I am using the “original” DT that relies on the
> translation to gpio by the driver.

Good this is what we need to test.

I suspect that it is the CS inversion that is the problem as
you point out.

Yours,
Linus Walleij




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux