Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-25 Thread Grant Likely
On 18/11/2020 11:40, Mark Brown wrote: On Wed, Nov 18, 2020 at 02:03:41AM +0100, Linus Walleij wrote: On Mon, Nov 16, 2020 at 10:06 PM Mark Brown wrote: I think the main push in the other direction has always been people who want to not have to write a driver at all and put absolutely eve

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-25 Thread Grant Likely
On 11/11/2020 13:36, Linus Walleij wrote: On Wed, Nov 11, 2020 at 1:33 PM Mark Brown wrote: On Wed, Nov 11, 2020 at 02:05:19AM +0100, Linus Walleij wrote: I would say that anything that has: spi->mode = ... is essentially broken. This is not clear to me, most of these settings are

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-24 Thread Mark Brown
On Tue, Nov 24, 2020 at 04:21:48PM +0100, Linus Walleij wrote: > > What people think they were sold was the idea that they shouldn't have > > to write driver code or upstream things, something with more AML like > > capabilities (not realising that AML works partly because ACPI hugely > > constrai

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-24 Thread Linus Walleij
On Wed, Nov 18, 2020 at 12:41 PM Mark Brown wrote: > What people think they were sold was the idea that they shouldn't have > to write driver code or upstream things, something with more AML like > capabilities (not realising that AML works partly because ACPI hugely > constrains system design).

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-18 Thread Mark Brown
On Wed, Nov 18, 2020 at 02:03:41AM +0100, Linus Walleij wrote: > On Mon, Nov 16, 2020 at 10:06 PM Mark Brown wrote: > > I think the main push in the other direction has always been people who > > want to not have to write a driver at all and put absolutely everything > > into DT which has scaling

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-17 Thread Linus Walleij
On Mon, Nov 16, 2020 at 10:06 PM Mark Brown wrote: > On Wed, Nov 11, 2020 at 02:36:07PM +0100, Linus Walleij wrote: > > I don't know if we ever formalized it, there is nowadays a rule akin to > > > "if a property can be determined from the compatible-string, and if the > > compatible-string is i

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-16 Thread Mark Brown
On Wed, Nov 11, 2020 at 02:36:07PM +0100, Linus Walleij wrote: > On Wed, Nov 11, 2020 at 1:33 PM Mark Brown wrote: > > On Wed, Nov 11, 2020 at 02:05:19AM +0100, Linus Walleij wrote: > > This is not clear to me, most of these settings are things that are > > constant for the device so it's not cle

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-12 Thread Charles Keepax
On Wed, Nov 11, 2020 at 11:24:14AM -0500, Sven Van Asbroeck wrote: > On Wed, Nov 11, 2020 at 10:48 AM Mark Brown wrote: > > > > Applied to > > > >https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next > > Thank you ! > > Now that our minds are still focused on this subject,

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-11 Thread Mark Brown
On Wed, Nov 11, 2020 at 11:24:14AM -0500, Sven Van Asbroeck wrote: > Now that our minds are still focused on this subject, should > commit 138c9c32f090 ("spi: spidev: Fix CS polarity if GPIO descriptors > are used") > be reverted? If you think changes should be made to the code please propose pat

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-11 Thread Sven Van Asbroeck
On Wed, Nov 11, 2020 at 10:48 AM Mark Brown wrote: > > Applied to > >https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thank you ! Now that our minds are still focused on this subject, should commit 138c9c32f090 ("spi: spidev: Fix CS polarity if GPIO descriptors are us

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-11 Thread Mark Brown
On Fri, 6 Nov 2020 10:07:06 -0500, Sven Van Asbroeck wrote: > Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") > introduced the optional use of GPIO descriptors for chip selects. > > A side-effect of this change: when a SPI bus uses GPIO descriptors, > all its client devic

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-11 Thread Linus Walleij
On Wed, Nov 11, 2020 at 1:33 PM Mark Brown wrote: > On Wed, Nov 11, 2020 at 02:05:19AM +0100, Linus Walleij wrote: > > I would say that anything that has: > > > spi->mode = ... > > > is essentially broken. > > This is not clear to me, most of these settings are things that are > constant for the

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-11 Thread Mark Brown
On Wed, Nov 11, 2020 at 02:05:19AM +0100, Linus Walleij wrote: > On Mon, Nov 9, 2020 at 3:41 PM Sven Van Asbroeck wrote: > > I don't disagree. Fact is that after the imx cspi bus driver was converted > > to gpio descriptors, most spi client drivers broke. It would be great if > > this > > could

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-10 Thread Linus Walleij
On Fri, Nov 6, 2020 at 4:07 PM Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") > introduced the optional use of GPIO descriptors for chip selects. > > A side-effect of this change: when a SPI bus uses GPIO descripto

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-10 Thread Linus Walleij
On Mon, Nov 9, 2020 at 3:41 PM Sven Van Asbroeck wrote: > On Mon, Nov 9, 2020 at 9:24 AM Andy Shevchenko > wrote: > > > > Sounds like "many SPI drivers have to be fixed". > > I don't disagree. Fact is that after the imx cspi bus driver was converted > to gpio descriptors, most spi client drivers

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-09 Thread Sven Van Asbroeck
Hi Andy, thank you for looking at this patch ! On Mon, Nov 9, 2020 at 9:24 AM Andy Shevchenko wrote: > > Sounds like "many SPI drivers have to be fixed". > I don't disagree. Fact is that after the imx cspi bus driver was converted to gpio descriptors, most spi client drivers broke. It would be g

Re: [PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-09 Thread Andy Shevchenko
On Fri, Nov 6, 2020 at 5:08 PM Sven Van Asbroeck wrote: > > From: Sven Van Asbroeck > > Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") > introduced the optional use of GPIO descriptors for chip selects. > > A side-effect of this change: when a SPI bus uses GPIO descript

[PATCH v1] spi: fix client driver breakages when using GPIO descriptors

2020-11-06 Thread Sven Van Asbroeck
From: Sven Van Asbroeck Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") introduced the optional use of GPIO descriptors for chip selects. A side-effect of this change: when a SPI bus uses GPIO descriptors, all its client devices have SPI_CS_HIGH set in spi->mode. This f