lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 Apr 2015 15:34:25 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Michael Welling <mwelling@...e.org>
Cc:	linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] spi: omap2-mcspi: Add support for GPIO chipselects

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.

> 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.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ