I've been digging around the kernel a bit to see if I can work this out but I thought it would be quicker to post the question here.
Basically I want to combine the gpio-poweroff-overlay and gpio-shutdown-overlay into a single overlay that does both tasks on the same pin. This seems feasible in theory as the gpio-poweroff driver allows the pin to the set as in input until shutdown, however both drivers (gpio-poweroff and gpio-keys) seem to use different methods to get their gpio_desc (although they both include gpio/consumer.h)
My question is, if I pass the same gpio pin to both, will they still be able to get a gpio_desc and 'just work' or can only one driver hold a gpio_desc for a pin?