Hi, Thanks for your in-depth review of the changes! In general, what I did was cherry-pick all the commits from Linux-xlnx that we’re not in mainline Linux in the order they were made such that the end result is the current gpio-xilinx.c at the head of Linux-xlnx. Also I made sure that it builds correctly after each partial application of patches. This is the reason sometimes changes are added and then removed again. About the first patch: Yes, this is a big change, but to be fair, most of it comes from me merging it with all the changes that were done to Linux in the mean time (the original commit is from 2011). Are you suggesting: 1) I apply (some of) the existing commits (the parts of them that make sense) and change their messages and then add some of my own commits such that it uses GPIO_GENERIC and co.? 2) I apply only (some of) the existing commits but change their message and contents so that they use the new facilities, keeping the attribution? 3) I squash some of the existing commits where it makes sense (same author, similar changeset) and add my own commits in between so that it makes use of the new facilities? Going forward, I agree, it is probably best to rewrite the driver in the ways you suggested, but this *only* makes sense if those changes are picked up by Linux-xlnx. If by the next LTS merge Xilinx chooses their side, we are in the same situation again where fixes made in the official repository don’t make it into Linux because they don’t apply. The reason I submitted the patch in the first place was so that Xilinx and Linux could develop the driver from the same code base and that changes from one could be easily merged into the other. So I’m happy to add some changes to the drivers to make them more in line with the newer Linux APIs and incorporate other suggestions made by you and Michal, but only if those changes will also be merged back into Xilinx Linux. Best Regards, Alexander > On 22 Jul 2018, at 21:41, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > > After looking at the patch set again I think the following is going to > be simplest > to proceed: > > 1. Look carefully at drivers like gpio-ftgpio010.c or gpio-pl061.c > 2. Rewrite the driver to use GPIO_GENERIC instead of the "mm" > stuff. > 3. Use GPIOLIB_IRQCHIP and implement IRQ support. > 4. Think about how to handle the dual GPIO. > > Yours, > Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html