Hi Mark,
On Thu, Jan 23, 2014 at 01:26:23PM +0000, Mark Brown wrote:
> On Thu, Jan 23, 2014 at 03:05:58PM +0200, Baruch Siach wrote:
> > Signed-off-by: Baruch Siach <[email protected]>
>
> If you convert to the generic queue then there's generic support for
> managing a GPIO based /CS if you set cs_gpio in the spi_device. We
> should extend that for GPIO descriptors too.
Thank. This further simplifies things. AFAICS the generic gpio chip select
code does not request the GPIO. Is there a reason for that?
> > + if (gpio_is_valid(spi->cs_gpio)) {
> > + ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev));
> > + if (ret)
> > + return ret;
> > + ret = gpio_direction_output(spi->cs_gpio,
> > + !(spi->mode & SPI_CS_HIGH));
>
> devm_gpio_request_one().
Right.
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