[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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]
 \ /
  Last update: 2015-04-09 13:21    [W:0.083 / U:5.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site