Message ID | 1409648557-5470-2-git-send-email-Barry.Song@csr.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Sep 02, 2014 at 05:02:35PM +0800, Barry Song wrote: > From: Qipan Li <Qipan.Li@csr.com> > > give spi a default frequence if it is not set and the value is 0. I think this is a good idea but I think we should do this in the SPI core rather than this driver since the same thing is going to apply to many drivers. Can you do a patch for that?
2014-09-05 6:39 GMT+08:00 Mark Brown <broonie@kernel.org>: > On Tue, Sep 02, 2014 at 05:02:35PM +0800, Barry Song wrote: >> From: Qipan Li <Qipan.Li@csr.com> >> sorry, this patch actually has no effect now as it is outdated. >> give spi a default frequence if it is not set and the value is 0. > > I think this is a good idea but I think we should do this in the SPI > core rather than this driver since the same thing is going to apply to > many drivers. Can you do a patch for that? > this has been done by commit 052eb2d49, sorry for making noise. -barry -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index 7499076..74835c2 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c @@ -134,6 +134,7 @@ ALIGNED(x->len) && (x->len < 2 * PAGE_SIZE)) #define SIRFSOC_MAX_CMD_BYTES 4 +#define SIRFSOC_SPI_DEFAULT_FREQ 1000000 struct sirfsoc_spi { struct spi_bitbang bitbang; @@ -630,7 +631,7 @@ static int spi_sirfsoc_setup(struct spi_device *spi) struct sirfsoc_spi *sspi; int ret = 0; if (!spi->max_speed_hz) - return -EINVAL; + spi->max_speed_hz = SIRFSOC_SPI_DEFAULT_FREQ; sspi = spi_master_get_devdata(spi->master);