regmap: Add support for devices with no interrupt readback
authorMark Brown <broonie@kernel.org>
Mon, 6 Mar 2023 14:07:40 +0000 (14:07 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 6 Mar 2023 14:07:40 +0000 (14:07 +0000)
Merge series from William Breathitt Gray <william.gray@linaro.org>:

There are devices which have interrupt support with mask and ack
registers but no status register.  Add a flag which lets us support
them, we just assume that all the interrupts fired.

1  2 
include/linux/regmap.h

@@@ -1567,9 -1565,11 +1567,10 @@@ struct regmap_irq_chip_data
   *                  offsets to each peripheral. Deprecated; the same thing
   *                  can be accomplished with a @get_irq_reg callback, without
   *                  the need for a @sub_reg_offsets table.
 - * @status_invert: Inverted status register: cleared bits are active interrupts.
 - * @runtime_pm:  Hold a runtime PM lock on the device when accessing it.
+  * @no_status: No status register: all interrupts assumed generated by device.
   *
   * @num_regs:    Number of registers in each control bank.
 + *
   * @irqs:        Descriptors for individual IRQs.  Interrupt numbers are
   *               assigned based on the index in the array of the interrupt.
   * @num_irqs:    Number of descriptors.
@@@ -1628,12 -1626,13 +1629,13 @@@ struct regmap_irq_chip 
        unsigned int use_ack:1;
        unsigned int ack_invert:1;
        unsigned int clear_ack:1;
 +      unsigned int status_invert:1;
        unsigned int wake_invert:1;
 -      unsigned int runtime_pm:1;
        unsigned int type_in_mask:1;
        unsigned int clear_on_unmask:1;
 +      unsigned int runtime_pm:1;
        unsigned int not_fixed_stride:1;
 -      unsigned int status_invert:1;
+       unsigned int no_status:1;
  
        int num_regs;