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

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

 



On Tue, Apr 28, 2015 at 03:34:25PM +0100, Mark Brown wrote:
> On Mon, Apr 27, 2015 at 08:21:50PM -0500, Michael Welling wrote:
> 
> > Before I send another patch how does this look?
> 
> > 	if (gpio_is_valid(spi->cs_gpio)) {
> > 		if (cs_active)
> > 			gpio_set_value(spi->cs_gpio, spi->mode & SPI_CS_HIGH);
> > 		else
> > 			gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH));
> > 	}
> 
> That's good but please have braces around the inner if for clarity.

I try to follow the CodingStyle documentation and it says differently:
http://lxr.free-electrons.com/source/Documentation/CodingStyle#L156

> 
> > If I were to attempt to convert the driver to use the core chipselect support,
> > how would I go about doing it?
> 
> > Is there another driver that I can use for reference?
> 
> Martin and Ezequiel already gave you some good examples - in general
> anything providing the set_cs() operation should be reasonable to look
> at.

I was trying to minimise the impact of the change but will look into using
this method.

I have also been looking at ways of allowing more GPIO chipselects than
DMA channels. Currently this driver is limited to one chipselect per
DMA channel.

Do you have any ideas on how to accomplish this?

The number of chipselects on each channel is very restrictive on the mcspi.
By using multiple GPIO chipselects per DMA channel it opens many more
applications. 

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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