ar71xx: mach-rbspi: fix 74x164 support
authorThibaut VARENE <hacks@slashdirt.org>
Wed, 1 Nov 2017 11:06:20 +0000 (12:06 +0100)
committerMathias Kresin <dev@kresin.me>
Fri, 3 Nov 2017 19:04:51 +0000 (20:04 +0100)
The platform data was missing the num_registers element which is now
mandatory in linux 4.9

Without this patch, the gpio probing would fail with:
gpio gpiochip1: (74x164): tried to insert a GPIO chip with zero lines

Fixes: #1106
Tested-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c

index 4cdc171de1ccddaea0b00a939e215d2e5926e4f2..1045dfc6e7d3fe9d59407d07c8bc143ab8b6d9df 100644 (file)
@@ -488,6 +488,7 @@ static struct gpio_keys_button rblhg_gpio_keys[] __initdata = {
 
 static struct gen_74x164_chip_platform_data rbspi_ssr_data = {
        .base = RBSPI_SSR_GPIO_BASE,
 
 static struct gen_74x164_chip_platform_data rbspi_ssr_data = {
        .base = RBSPI_SSR_GPIO_BASE,
+       .num_registers = 1,
 };
 
 /* the spi-ath79 driver can only natively handle CS0. Other CS are bit-banged */
 };
 
 /* the spi-ath79 driver can only natively handle CS0. Other CS are bit-banged */