Hi Mark,
On Mon, Jan 27, 2014 at 06:57:54PM +0000, Mark Brown wrote:
> > + if (gpio_is_valid(spi->cs_gpio)) {
> > + ret = devm_gpio_request(&spi->dev, spi->cs_gpio,
> > + dev_name(&spi->dev));
> > + if (ret)
> > + return ret;
> > + ret = gpio_direction_output(spi->cs_gpio,
> > + !(spi->mode & SPI_CS_HIGH));
> > + if (ret)
> > + return ret;
> > + }
>
> Should be devm_gpio_request_one(). This won't work with probe deferral,
> it's outside the probe() function so nothing will retry.
So how about doing devm_gpio_request_one() in probe() right after
devm_spi_register_master()? This should be compatible with deferral, and yet
avoid open coding the "cs-gpios" property parsing as the pl022 driver does.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html