On Wed, Oct 26, 2022 at 01:21:23PM +0200, Levente Révész wrote: > The PCAL-ness of a chip can be known from its chip type: > PCAL953X and PCAL653X chips have the PCAL register set, the others > do not. It's better to have a separate chip type for PCAL953X chips: > this encodes that the driver needs to use their extended registers, > without the need for a separate PCA_PCAL flag in the driver_data. > > Remove PCA_PCAL bit and PCA_LATCH_INT bitmask. > > Add pca953x_is_pcal_type() function to check if chip is PCAL. Suggested-by: ? > Signed-off-by: Levente Révész <levente.revesz@xxxxxxxxxx> ... > +static inline bool pca953x_is_pcal_type(const struct pca953x_chip *chip) > +{ > + int chip_type = PCA_CHIP_TYPE(chip->driver_data); + blank line > + return chip_type == PCAL953X_TYPE || chip_type == PCAL653X_TYPE; > +} -- With Best Regards, Andy Shevchenko