On Wed, Oct 30, 2019 at 01:29:14PM +0100, Linus Walleij wrote: > The GPIO irqchip needs to initialize the valid mask > before initializing the IRQ hardware, because sometimes > the latter require the former to be executed first. > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx> > Reported-by: Hans de Goede <hdegoede@xxxxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- > Thinking of applying this for fixes to fix some part > of the problems that Hans is seeing. > --- > drivers/gpio/gpiolib.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index 9afbc0612126..e865c889ba8d 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -1411,11 +1411,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data, > > machine_gpiochip_add(chip); > > - ret = gpiochip_irqchip_init_hw(chip); > + ret = gpiochip_irqchip_init_valid_mask(chip); > if (ret) > goto err_remove_acpi_chip; > > - ret = gpiochip_irqchip_init_valid_mask(chip); > + ret = gpiochip_irqchip_init_hw(chip); > if (ret) > goto err_remove_acpi_chip; > > -- > 2.21.0 > -- With Best Regards, Andy Shevchenko