Commit 7c1bc0da authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Ralf Baechle

ssb: gpio: add own IRQ domain

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Acked-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Acked-by: default avatarMichael Buesch <m@bues.ch>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6342/
parent 89fb3ac8
...@@ -168,6 +168,7 @@ config SSB_DRIVER_GIGE ...@@ -168,6 +168,7 @@ config SSB_DRIVER_GIGE
config SSB_DRIVER_GPIO config SSB_DRIVER_GPIO
bool "SSB GPIO driver" bool "SSB GPIO driver"
depends on SSB && GPIOLIB depends on SSB && GPIOLIB
select IRQ_DOMAIN if SSB_EMBEDDED
help help
Driver to provide access to the GPIO pins on the bus. Driver to provide access to the GPIO pins on the bus.
......
This diff is collapsed.
...@@ -593,6 +593,13 @@ static int ssb_attach_queued_buses(void) ...@@ -593,6 +593,13 @@ static int ssb_attach_queued_buses(void)
ssb_pcicore_init(&bus->pcicore); ssb_pcicore_init(&bus->pcicore);
if (bus->bustype == SSB_BUSTYPE_SSB) if (bus->bustype == SSB_BUSTYPE_SSB)
ssb_watchdog_register(bus); ssb_watchdog_register(bus);
err = ssb_gpio_init(bus);
if (err == -ENOTSUPP)
ssb_dbg("GPIO driver not activated\n");
else if (err)
ssb_dbg("Error registering GPIO driver: %i\n", err);
ssb_bus_may_powerdown(bus); ssb_bus_may_powerdown(bus);
err = ssb_devices_register(bus); err = ssb_devices_register(bus);
...@@ -830,11 +837,6 @@ static int ssb_bus_register(struct ssb_bus *bus, ...@@ -830,11 +837,6 @@ static int ssb_bus_register(struct ssb_bus *bus,
ssb_chipcommon_init(&bus->chipco); ssb_chipcommon_init(&bus->chipco);
ssb_extif_init(&bus->extif); ssb_extif_init(&bus->extif);
ssb_mipscore_init(&bus->mipscore); ssb_mipscore_init(&bus->mipscore);
err = ssb_gpio_init(bus);
if (err == -ENOTSUPP)
ssb_dbg("GPIO driver not activated\n");
else if (err)
ssb_dbg("Error registering GPIO driver: %i\n", err);
err = ssb_fetch_invariants(bus, get_invariants); err = ssb_fetch_invariants(bus, get_invariants);
if (err) { if (err) {
ssb_bus_may_powerdown(bus); ssb_bus_may_powerdown(bus);
......
...@@ -486,6 +486,7 @@ struct ssb_bus { ...@@ -486,6 +486,7 @@ struct ssb_bus {
#endif /* EMBEDDED */ #endif /* EMBEDDED */
#ifdef CONFIG_SSB_DRIVER_GPIO #ifdef CONFIG_SSB_DRIVER_GPIO
struct gpio_chip gpio; struct gpio_chip gpio;
struct irq_domain *irq_domain;
#endif /* DRIVER_GPIO */ #endif /* DRIVER_GPIO */
/* Internal-only stuff follows. Do not touch. */ /* Internal-only stuff follows. Do not touch. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment