Re: [PATCH v3 4/8] irqchip/qcom-pdc: Differentiate between direct SPI and GPIO as SPI

From: Konrad Dybcio

Date: Thu Jun 18 2026 - 04:03:00 EST


On 6/16/26 11:25 AM, Maulik Shah wrote:
> Before commit 4dc70713dc24 ("irqchip/qcom-pdc: Kill non-wakeup irqdomain")
> there are separate domains for direct SPIs and GPIO used as SPIs. Separate
> domains can be useful in case irqchip want to differentiate both of them.
> Since commit unified both the domains there is no way to differentiate.
>
> In preparation to add the second level interrupt controller support where
> GPIO interrupts get latched at PDC (but not direct SPIs) there is a need to
> differentiate between SPIs and GPIOs as SPIs. Reverting above commit do not
> seem a good option either which leads to waste of resources.
>
> PDC HW have the IRQ_PARAM register telling number of direct SPIs and number
> of GPIOs as SPIs. Further PDC allocates direct SPIs at the beginning and
> all GPIOs as SPIs are allocated at the end. This information can be used in
> driver to differentiate them.
>
> Add the support to read this register and keep this information in
> struct pdc_desc. Later change utilizes same.
>
> Signed-off-by: Maulik Shah <maulik.shah@xxxxxxxxxxxxxxxx>
> ---

[...]

> + irq_param = pdc_reg_read(pdc->regs->irq_param_reg, 0);
> + pdc->num_spis = FIELD_GET(GENMASK(7, 0), irq_param);
> + pdc->num_gpios = FIELD_GET(GENMASK(15, 8), irq_param);

num_gpios is not used in this series, please either drop it or
use it to limit the index in the following patches

Konrad