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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 07:00:46 +0000 (09:00 +0200)
commitf5da0820c59da3e5895735e2a4a39ff7d4c1308f
tree6dc66bbb2b89a3abb3f965e4b5d95397879cc2b7
parentcd37040ba9312e840839eecfa69e0623751098d5
spi: Assume GPIO CS active high in ACPI case

[ 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>
drivers/spi/spi.c