diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h index 5fe0d4fc0f8c..3cfe3b647711 100644 --- a/arch/arm/mach-sa1100/generic.h +++ b/arch/arm/mach-sa1100/generic.h @@ -48,6 +48,9 @@ int sa11xx_clk_init(void); struct gpiod_lookup_table; void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *); +struct software_node; +extern const struct software_node sa1100_gpiochip_node; + struct fixed_voltage_config; struct regulator_consumer_supply; int sa11x0_register_fixed_regulator(int n, struct fixed_voltage_config *cfg, diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c index 1938ffa2f4f3..ffa73dd3b982 100644 --- a/drivers/gpio/gpio-sa1100.c +++ b/drivers/gpio/gpio-sa1100.c @@ -13,6 +13,11 @@ #include #include #include +#include + +const struct software_node sa1100_gpiochip_node = { + .name = "sa1100-gpio", +}; struct sa1100_gpio_chip { struct gpio_chip chip; @@ -317,6 +322,7 @@ static const int sa1100_gpio_irqs[] __initconst = { void __init sa1100_init_gpio(void) { struct sa1100_gpio_chip *sgc = &sa1100_gpio_chip; + struct gpio_chip *gc = &sgc->chip; int i; /* clear all GPIO edge detects */ @@ -324,7 +330,9 @@ void __init sa1100_init_gpio(void) writel_relaxed(0, sgc->membase + R_GRER); writel_relaxed(-1, sgc->membase + R_GEDR); - gpiochip_add_data(&sa1100_gpio_chip.chip, NULL); + software_node_register(&sa1100_gpiochip_node); + gc->fwnode = software_node_fwnode(&sa1100_gpiochip_node); + gpiochip_add_data(gc, NULL); sa1100_gpio_irqdomain = irq_domain_create_simple(NULL, 28, IRQ_GPIO0,