[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71007a86-0a62-a180-33b7-7d963d39f84b@lechnology.com>
Date: Fri, 31 Jul 2020 10:59:13 -0500
From: David Lechner <david@...hnology.com>
To: Grzegorz Jaszczyk <grzegorz.jaszczyk@...aro.org>,
Marc Zyngier <maz@...nel.org>
Cc: tglx@...utronix.de, jason@...edaemon.net,
"Anna, Suman" <s-anna@...com>, robh+dt@...nel.org,
Lee Jones <lee.jones@...aro.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
"Mills, William" <wmills@...com>,
"Bajjuri, Praneeth" <praneeth@...com>
Subject: Re: [PATCH v4 4/5] irqchip/irq-pruss-intc: Implement
irq_{get,set}_irqchip_state ops
On 7/31/20 7:28 AM, Grzegorz Jaszczyk wrote:
> On Wed, 29 Jul 2020 at 21:23, David Lechner <david@...hnology.com> wrote:
>>
>> On 7/28/20 4:18 AM, Grzegorz Jaszczyk wrote:
>>> From: David Lechner <david@...hnology.com>
>>>
>>> This implements the irq_get_irqchip_state and irq_set_irqchip_state
>>> callbacks for the TI PRUSS INTC driver. The set callback can be used
>>> by drivers to "kick" a PRU by injecting a PRU system event.
>>>
>>> Example:
>>
>> We could improve this example by showing a device tree node of a
>> firmware-defined device implemented in the PRU:
>>
>> /* Software-defined UART in PRU */
>> pru_uart: serial@...X {
>> compatible = "ti,pru-uart";
>> ...
>> interrupt-parent = <&pruss_intc>;
>> /* PRU system event 31, channel 0, host event 0 */
>> interrupts = <31 0 0>, ...;
>> interrupt-names = "kick", ...;
>> ...
>> },
>>
>> Then driver would request the IRQ during probe:
>>
>> data->kick_irq = of_irq_get_byname(dev, "kick");
>> if (data->kick_irq < 0)
>> ...
>>
>>
>> And later the driver would use the IRQ to kick the PRU:
>>
>> irq_set_irqchip_state(data->kick_irq, IRQCHIP_STATE_PENDING, true);
>>
>>
>
> We could but I am not sure if this kind of complex example should land
> in the commit log.
> Marc could you please comment how you want to see this?
>
> Thank you,
> Grzegorz
>
Based on the discussion in the device tree binding patch, the expanded
example I gave is incorrect, so we can just drop it.
Powered by blists - more mailing lists