Side effect of SPI GPIO descriptor usage

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

 



Hi,

A relatively recent patch [1] to the spi-bcm2835 driver modified it to use GPIO descriptors for chip select handling. A side effect of this change is to set the SPI_MODE_CS_HIGH flag for devices connected to the controller, which seems strange since it happens for devices that require the usual active-low chip select.

This change came to light when a user reported that the SPI-Py library
(a client of the spidev driver) wasn't working on 5.4, which was traced to it overwriting the SPI mode flags when it was only trying to set the
CPHA and CPOL flags. This had the affect of inverting the chip select
line, with the obvious consequences. That corruption of the flags is clearly an error, but what if the application and library were genuinely trying to specify that the attached device required an active-high chip select? Would it now require that they _clear_ the CS_HIGH flag?

Thanks,

Phil

[1] 3bd158c56a56 ("spi: bcm2835: Convert to use CS GPIO descriptors")



[Index of Archives]     [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