Re: [PATCH] spi: omap2-mcspi: Add support for GPIO chipselects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux