On Mon, Jan 27, 2025 at 6:45 PM lakabd <lakabd.work@xxxxxxxxx> wrote: > > On Mon, Jan 27, 2025 at 09:47:17AM +0200, Andy Shevchenko wrote: ... > > Meanwhile looking into the code I'm wondering why we can't actually use > > just input port register data with the logic as for PCAL. Nonetheless this > > can be optimized later. I think Mark's patch is good enough as current fix. > > If we accept Mark's patch there will be no difference between PCA_PCAL > and regular chips in IRQ handling. > Looking at pca953x_irq_pending() the process for non-PCA_PCAL is quite > slower; there is one I2C read in addition, plus multiple bitmap > operations. I think that the solution I proposed at least helps in > keeping the leverage for PCA_PCAL chips. As I said, we can do optimisations later on. The non-PCAL code is widely tested, so I prefer to have a slower but tested approach. On top of that bitmap operations for the chips up to 32 lines are just operations on one register, which are quite fast even on slow CPUs (like Intel Quark), in comparison to I²C transactions. -- With Best Regards, Andy Shevchenko