Re: [PATCH v2 2/6] gpio: pca953x: Add PCAL953X as a separate chip type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux