]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
spi: Assume GPIO CS active high in ACPI case
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 11 May 2021 14:09:12 +0000 (17:09 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:22:53 +0000 (19:22 +0200)
commiteec2b53c4e2ccc84cc0b7d0df2620b0695a479c7
tree3b343f0e309cf23adf05189b46e70ecbe6dae0f6
parent4aae79be3b955b572347d65b3472dc5039997e70
spi: Assume GPIO CS active high in ACPI case

BugLink: https://bugs.launchpad.net/bugs/1931896
[ Upstream commit 6b69546912a57ff8c31061f98e56383cc0beffd3 ]

Currently GPIO CS handling, when descriptors are in use, doesn't
take into consideration that in ACPI case the default polarity
is Active High and can't be altered. Instead we have to use the
per-chip definition provided by SPISerialBus() resource.

Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors")
Cc: Liguang Zhang <zhangliguang@linux.alibaba.com>
Cc: Jay Fang <f.fangjian@huawei.com>
Cc: Sven Van Asbroeck <thesven73@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Xin Hao <xhao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20210511140912.30757-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/spi/spi.c