[PATCH 4/6] spi: bcm2835: warn about native-chip-selects being used

Mark Brown broonie at kernel.org
Sun Mar 29 21:22:06 PDT 2015


On Sun, Mar 29, 2015 at 04:03:26PM +0200, Martin Sperl wrote:

> Could get replaced by something similar to this.
> 	if (!gpio_is_valid(spi->gpio_cs)) {
> 		if (spi->chip_select == 0) {
> 			spi->gpio_cs = 8;
> 			gpio_set_output(spi->gpio_cs);
> 		}
> 		if (spi->chip_select == 1) {
> 			spi->gpio_cs = 7;
> 			gpio_set_output(spi->gpio_cs);
> 		}
> 	}
> But I do not know what is the correct call to use.

I don't know what you mean by "correct call" here, sorry.  If you're
talking about working out which GPIO maps to the /CS pin then can the
pinctrl API help?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20150329/81c005df/attachment.sig>


More information about the linux-rpi-kernel mailing list