在 2017-05-24 04:41,Danny Milosavljevic 写道:
Next, I'll try to disable CS manual mode in drivers/spi/spi-sun4i.c and test - still with nothing but the resistor connected. Let's see...I've done that and it changed nothing wrt SCLK. Good to know... diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c index c5cd635..3e9e7b6 100644 --- a/drivers/spi/spi-sun4i.c +++ b/drivers/spi/spi-sun4i.c @@ -174,8 +174,9 @@ static void sun4i_spi_set_cs(struct spi_device *spi, bool enable) reg |= SUN4I_CTL_CS(spi->chip_select); /* We want to control the chip select manually */ - reg |= SUN4I_CTL_CS_MANUAL; + /* reg |= SUN4I_CTL_CS_MANUAL; */ +#if 0 if (enable) reg |= SUN4I_CTL_CS_LEVEL; else @@ -196,6 +197,7 @@ static void sun4i_spi_set_cs(struct spi_device *spi, bool enable) reg &= ~SUN4I_CTL_CS_ACTIVE_LOW; else reg |= SUN4I_CTL_CS_ACTIVE_LOW; +#endif sun4i_spi_write(sspi, SUN4I_CTL_REG, reg); }
Please note that this can break the capability to use any GPIO as CS. -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
