public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Aniket Limaye <a-limaye@ti.com>
To: Thomas Gleixner <tglx@kernel.org>,
	Vignesh Raghavendra <vigneshr@ti.com>, <u-kumar1@ti.com>,
	Nishanth Menon <nm@ti.com>, Tero Kristo <kristo@kernel.org>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: <j-mcarthur@ti.com>, <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/2] drivers: irqchip: irq-ti-sci-intr: Allow parsing interrupt-types per-line
Date: Mon, 19 Jan 2026 22:35:13 +0530	[thread overview]
Message-ID: <6342109c-7345-4895-8eba-e5efca0606f5@ti.com> (raw)
In-Reply-To: <8734432qur.ffs@tglx>



On 18/01/26 15:19, Thomas Gleixner wrote:
> On Fri, Jan 16 2026 at 18:38, Aniket Limaye wrote:
> 
> The subject line prefix is made up. Please follow the documented
> conventions:
> 
> https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-submission-notes
> 
>> Some INTR router instances act as simple passthroughs that preserve the
>> source interrupt type unchanged at the output line, rather than converting
>> all interrupts to a fixed type.
>>
>> When interrupt sources are not homogeneous with respect to trigger type,
>> the driver needs to read each source's interrupt type from DT and pass it
>> unchanged to its interrupt parent
>>
>> Previously, the interrupt type for all output lines was set globally using
>> the "ti,intr-trigger-type" property (values 1 or 4).
> 
> What means 'previously'?
> 
> You want to describe the current state and not something which might be
> in the past after applying the change.
> 

Sure, makes sense... will update this in v2.

>> Add support for "ti,intr-trigger-type" = 15 (IRQ_TYPE_DEFAULT) to indicate
>> passthrough mode:
>> - When set to 15: Parse interrupt type per-line from DT
>> - When set to 1 or 4: Use global setting (maintains backward compatibility)
> 
>> @@ -156,11 +168,27 @@ static int ti_sci_intr_alloc_parent_irq(struct irq_domain *domain,
>>   		fwspec.param_count = 3;
>>   		fwspec.param[0] = 0;	/* SPI */
>>   		fwspec.param[1] = p_hwirq - 32; /* SPI offset */
>> -		fwspec.param[2] = intr->type;
>> +		fwspec.param[2] = hwirq_type;
>>   	} else {
>>   		/* Parent is Interrupt Router */
>> -		fwspec.param_count = 1;
>> -		fwspec.param[0] = p_hwirq;
>> +		u32 parent_trigger_type;
>> +
>> +		err = of_property_read_u32(parent_node,
>> +					  "ti,intr-trigger-type",
>> +					  &parent_trigger_type);
> 
> You have 100 characters and if you need a line break align the second
> line argument with the first line argument and not with the bracket.
> See documentation.
> 
>> +		if (err)
>> +			goto err_irqs;
>> +
>> +		if (parent_trigger_type != IRQ_TYPE_DEFAULT) {
>> +			/* Parent has global trigger type */
>> +			fwspec.param_count = 1;
>> +			fwspec.param[0] = p_hwirq;
>> +		} else {
>> +			/* Parent supports per-line trigger types */
>> +			fwspec.param_count = 2;
>> +			fwspec.param[0] = p_hwirq;
>> +			fwspec.param[1] = hwirq_type;
>> +		}
>>   	}
>>   
>>   	err = irq_domain_alloc_irqs_parent(domain, virq, 1, &fwspec);
>> @@ -197,14 +225,14 @@ static int ti_sci_intr_irq_domain_alloc(struct irq_domain *domain,
>>   {
>>   	struct irq_fwspec *fwspec = data;
>>   	unsigned long hwirq;
>> -	unsigned int flags;
>> +	unsigned int hwirq_type;
> 
> https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#variable-declarations
> 
>>   	int err, out_irq;
>>   
>> -	err = ti_sci_intr_irq_domain_translate(domain, fwspec, &hwirq, &flags);
>> +	err = ti_sci_intr_irq_domain_translate(domain, fwspec, &hwirq, &hwirq_type);
>>   	if (err)
>>   		return err;
>>   
>> -	out_irq = ti_sci_intr_alloc_parent_irq(domain, virq, hwirq);
>> +	out_irq = ti_sci_intr_alloc_parent_irq(domain, virq, hwirq, hwirq_type);
>>   	if (out_irq < 0)
>>   		return out_irq;
> 
> Thanks,
> 
>          tglx


Thanks for reviewing the patch.

Will send a v2 addressing all of your feedback and will note all 
recommendations for future patches too.

Regards,
Aniket




      reply	other threads:[~2026-01-19 17:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 13:08 [PATCH 0/2] ti-sci-intr: Support level+pulse interrupt sources together Aniket Limaye
2026-01-16 13:08 ` [PATCH 1/2] dt-bindings: interrupt-controller: ti,sci-intr: Per-line interrupt-types Aniket Limaye
2026-01-16 13:08 ` [PATCH 2/2] drivers: irqchip: irq-ti-sci-intr: Allow parsing interrupt-types per-line Aniket Limaye
2026-01-18  9:49   ` Thomas Gleixner
2026-01-19 17:05     ` Aniket Limaye [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6342109c-7345-4895-8eba-e5efca0606f5@ti.com \
    --to=a-limaye@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j-mcarthur@ti.com \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=robh@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=tglx@kernel.org \
    --cc=u-kumar1@ti.com \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox