On 12/14/2018 03:50 PM, Linus Walleij wrote: > I applied the whole series to an immutable branch and pushed to > kernelorg for testing in zeroday. If it builds fine I will push it > to devel. > > Must say this series is impressive. It's doing away with a whole > slew of "technical debt" (old code not using modern frameworks). Yeah, I gave up twice while trying to untangle the mess in that driver. It had indeed a lot of technical debt accumulated over the years of incremental development. I'm worried this series breaks some of the chips though, as I couldn't test it on the whole lot of the supported ones. I even wonder whether we shouldn't remove support for some of the chips which have no users in the kernel and add extra complexity to the driver, like the PCA957x . > Strangely this driver doesn't support any pin config, it even seems > to have per-pin debounce and everything. That depends on the chip, really. Most of the PCA953x series and compatible only have the In/Out/Direction/Invert registers, in various quantities. There are some which have extra functionality (like the integrated pull resistors) but those are rare. > Some can be quickly > supported by just adding the .set_config() callback, others like > pull up/down are more dubious. If it supports open drain in hardware > we should definately make use of it. Just in case you're interested! I went through the hardware I have around and the datasheets to the PCA953x chips on them, but I couldn't find a board which would have a PCA953x chip with those extra features. I'll keep my eyes peeled for a board with one. -- Best regards, Marek Vasut