[PATCH v2 0/6] gpio: pca953x: Add interrupt mask support for pca953x chips

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

 



Hello,

Some chips in the pca953x family have an interrupt mask register in
addition to the standard 4 registers:

    0: INPUT
    1: OUTPUT
    2: POLARITY
    3: CONFIGURATION
    4: INTERRUPT MASK

Chips with this register:

    - pca9505
    - pca9506
    - pca9698

The interrupt mask register defaults to all interrupts disabled, so
interrupts are unusable unless the driver sets this register.

Interrupt masking is already implemented for pcal chips. That
implementation could be extended to support this register as well.

This patch series adds support for the interrupt mask register in
mentioned pca chips.

Kind regards,
Levente

---
Changes in v2:

    1. Implemented Andy Shevchenko's suggestions.
    2. Added pca953x_is_pcal_type(), pca953x_has_interrupt() and
       pca953x_has_int_mask_reg() functions.
    3. Included Martyn Welch's suggestion.
    4. Added interrupt support for pca9698 in a new patch.

Levente Révész (6):
  gpio: pca953x: Convert PCA_TYPE from bits to number
  gpio: pca953x: Add PCAL953X as a separate chip type
  gpio: pca953x: Add helper function to check if chip has interrupts
  gpio: pca953x: Generalize interrupt mask register handling
  gpio: pca953x: Add interrupt mask support for chips with the standard
    register set
  gpio: pca953x: Enable interrupt for pca9698

 drivers/gpio/gpio-pca953x.c | 212 ++++++++++++++++++++++++------------
 1 file changed, 140 insertions(+), 72 deletions(-)

-- 
2.37.3




[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