[PATCH] spi: davinci: request cs_gpio's from probe
Now CS GPIOs are requested from struct spi_master.setup() callback
and that causes failures when Client SPI device is getting accessed
through SPIDEV driver. The failure happens, because .setup() callback
may be called many times from IOCTL handler and when it's called
second time gpio_request() will fail and return -EBUSY.
Hence, fix it by moving CS GPIOs requesting code in .probe().
Re: [PATCH] spi: davinci: request cs_gpio's from probe
On 09/13/2014 07:28 PM, Mark Brown wrote:
> On Fri, Sep 12, 2014 at 05:54:00PM +0300, Grygorii Strashko wrote:
>> static void davinci_spi_cleanup(struct spi_device *spi)
>> - if (spi->cs_gpio >= 0)
>> - gpio_free(spi->cs_gpio);
> This function is now empty so should be removed. I've applied for now
> but please send a followup fixing this.
> So, in broonie/spi.git/for-next it will not be empty.
> Again, I've missed description of this dependency, sorry for that.
Don't do things like this, delete the function and then re-add it - it
makes the review simpler and it means that if the second patch doesn't
get applied (as will happen here for v3.17) then the code still looks