1 --- a/drivers/ssb/driver_gpio.c
2 +++ b/drivers/ssb/driver_gpio.c
3 @@ -74,6 +74,16 @@ static void ssb_gpio_chipco_free(struct
4 ssb_chipco_gpio_pullup(&bus->chipco, 1 << gpio, 0);
7 +static int ssb_gpio_chipco_to_irq(struct gpio_chip *chip, unsigned gpio)
9 + struct ssb_bus *bus = ssb_gpio_get_bus(chip);
11 + if (bus->bustype == SSB_BUSTYPE_SSB)
12 + return ssb_mips_irq(bus->chipco.dev) + 2;
17 static int ssb_gpio_chipco_init(struct ssb_bus *bus)
19 struct gpio_chip *chip = &bus->gpio;
20 @@ -86,6 +96,7 @@ static int ssb_gpio_chipco_init(struct s
21 chip->set = ssb_gpio_chipco_set_value;
22 chip->direction_input = ssb_gpio_chipco_direction_input;
23 chip->direction_output = ssb_gpio_chipco_direction_output;
24 + chip->to_irq = ssb_gpio_chipco_to_irq;
26 /* There is just one SoC in one device and its GPIO addresses should be
27 * deterministic to address them more easily. The other buses could get
28 @@ -134,6 +145,16 @@ static int ssb_gpio_extif_direction_outp
32 +static int ssb_gpio_extif_to_irq(struct gpio_chip *chip, unsigned gpio)
34 + struct ssb_bus *bus = ssb_gpio_get_bus(chip);
36 + if (bus->bustype == SSB_BUSTYPE_SSB)
37 + return ssb_mips_irq(bus->extif.dev) + 2;
42 static int ssb_gpio_extif_init(struct ssb_bus *bus)
44 struct gpio_chip *chip = &bus->gpio;
45 @@ -144,6 +165,7 @@ static int ssb_gpio_extif_init(struct ss
46 chip->set = ssb_gpio_extif_set_value;
47 chip->direction_input = ssb_gpio_extif_direction_input;
48 chip->direction_output = ssb_gpio_extif_direction_output;
49 + chip->to_irq = ssb_gpio_extif_to_irq;
51 /* There is just one SoC in one device and its GPIO addresses should be
52 * deterministic to address them more easily. The other buses could get
53 --- a/include/linux/ssb/ssb_driver_mips.h
54 +++ b/include/linux/ssb/ssb_driver_mips.h
55 @@ -45,6 +45,11 @@ void ssb_mipscore_init(struct ssb_mipsco
59 +static inline unsigned int ssb_mips_irq(struct ssb_device *dev)
64 #endif /* CONFIG_SSB_DRIVER_MIPS */
66 #endif /* LINUX_SSB_MIPSCORE_H_ */