From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukas Wunner Subject: Re: [PATCH] spi: spidev: Fix CS polarity if GPIO descriptors are used Date: Thu, 20 Feb 2020 07:18:30 +0100 Message-ID: <20200220061830.gzi67u555kgvrfah@wunner.de> References: <20200220061122.srkb663imntm4c6a@wunner.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mark Brown , linux-spi , Simon Han To: Linus Walleij Return-path: Content-Disposition: inline In-Reply-To: <20200220061122.srkb663imntm4c6a-JFq808J9C/izQB+pC5nmwQ@public.gmane.org> Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: On Thu, Feb 20, 2020 at 07:11:22AM +0100, Lukas Wunner wrote: > - if (spi->mode & SPI_CS_HIGH) > + if (spi->mode & SPI_CS_HIGH && !(ctlr->use_gpio_descriptors && > + ctlr->cs_gpiods && > + ctlr->cs_gpiods[spi->chip_select])) > enable = !enable; Sorry, I meant (spi->mode & SPI_CS_HIGH || (ctlr->...) ^^^^