ath79: add missing v5.4 SPI chipselect patch
[openwrt/staging/ynezz.git] / target / linux / ath79 / patches-5.4 / 412-spi-ath79-set-number-of-chipselect-lines.patch
1 From e2e9f6d9f9bd7449ff113c157b639ce1a24b9d3f Mon Sep 17 00:00:00 2001
2 From: David Bauer <mail@david-bauer.net>
3 Date: Sat, 24 Apr 2021 16:14:48 +0200
4 Subject: [PATCH 2/2] spi: ath79: set number of chipselect lines
5
6 All chipsets from AR7100 up to QCA9563 have three dedicated chipselect
7 lines for the integrated SPI controller. Remove the number of
8 chipselects from the platform data, as there is no need to manually set
9 this to a different value.
10
11 Signed-off-by: David Bauer <mail@david-bauer.net>
12 ---
13 drivers/spi/spi-ath79.c | 2 +-
14 include/linux/platform_data/spi-ath79.h | 1 -
15 2 files changed, 1 insertion(+), 2 deletions(-)
16
17 --- a/drivers/spi/spi-ath79.c
18 +++ b/drivers/spi/spi-ath79.c
19 @@ -187,6 +187,7 @@ static int ath79_spi_probe(struct platfo
20 master->use_gpio_descriptors = true;
21 master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
22 master->flags = SPI_MASTER_GPIO_SS;
23 + master->num_chipselect = 3;
24
25 sp->bitbang.master = master;
26 sp->bitbang.chipselect = ath79_spi_chipselect;