To summarize what happens if a driver uses a gpio as irq:
gpio_request() // This works only if the gpio was not requested before
gpio_direction_input()
gpio_to_irq() // This needs an irq-mapping
request_threaded_irq()
So I would suggest multiple steps to change that:
1. Create a mapping for every gpio found in DT (or all gpios if no DT is
used). I think that is what Linus patch does (sorry, I haven't really
followed this thread and didn't look in deep at the patch).
2. Implement gpio_request_for_irq()
This would just be a small macro for gpio_request();
gpio_direction_input()