Messages in this thread |  | | Date | Thu, 9 Apr 2015 11:52:02 +0100 | From | Mark Brown <> | Subject | Re: [PATCH] spi: omap2-mcspi: Add support for GPIO chipselects |
| |
On Wed, Apr 08, 2015 at 04:36:01PM -0500, Michael Welling wrote: > This patch allows for GPIOs specified in the devicetree to be used as SPI chipselects > on TI OMAP2 SoCs.
Please keep your commit messages under 80 columns.
> + if (gpio_is_valid(spi->cs_gpio)) { > + if (gpio_request(spi->cs_gpio, dev_name(&spi->dev)) == 0) > + gpio_direction_output(spi->cs_gpio, > + !(spi->mode & SPI_CS_HIGH)); > + }
For this to work we need to be sure that unspecified GPIOs are invalid which isn't normally the default - zero tends to be a valid GPIO and that's also the default for otherwise uninitialized data. Is there something that takes care of this? [unhandled content-type:application/pgp-signature] |  |