Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2611240ybg; Fri, 31 Jul 2020 05:29:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkle3zXn7Ubs8u5dFC/HSEHt4pb4u00a1TZKz2jQQC5EOQP/ToqgWmecxIcg2s7rC9JG9a X-Received: by 2002:a17:906:3009:: with SMTP id 9mr3748082ejz.220.1596198564194; Fri, 31 Jul 2020 05:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596198564; cv=none; d=google.com; s=arc-20160816; b=XmEeo7584mlP45LBx1Amw0K9FWbsXk7id01LvnwrmzcJzNmZ66UV2klgKgCwKhlzvs 8oUXu7V4eDNSsgmCE5l6YswWSgOH7MsmvDWkzRZbLIolxj2+n3jDunhva7WzTJbpHAxo P+AHtV9QkELvh5HDZVoludox40IulWpawgVt72+bjajBtkjjuTLJclmtYizXxvUeQLoQ uKuL3Cbg9LV86AGFJy92DhoBjgtm33JC+s7CY5bcL5D58R9jKQCJNzjtp32dE1ZpnGOO ZPlAr4aNzd6E6QdZ+UanZoZ6KWe/Kex3vZrxt5yVhTm28IsH6T49xh2eQexRrdcLAscM QrAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GpNuJXQqlOCS5GDhX83vpT+wKOWnehhWp+8dfJ9ixf8=; b=y3rZbpyJQH4PT+BFTUF6OxGpkVS522+3gnddm65YThB0zOMqXgGQLg3L2c5UHv+EO2 tel06YSDe84LADeA8nbw+xisUUhK6CpU++NVfVeE0NfV8uynpcr57D5F4C/w64MScySi b+Wcir8WsZlNpZfWro0z0o4cbxT2351ZIvd8ZXSW85AjRUIboCkYEnMxorIZEOyuv6PS Z4eYaUls0DUTXOoupqqDZ8bIDi/wHpER58t91zmK7vD3MoipuGOS/VvUkSAXXt8N/ULj NFCgMpufG/9rnVGU3BRHb8rHrnn73S/PmXNgBpHqge0G0pXQUpm62ZZNjLIfSokwt7os lbIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cXZ/Eyzf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si5325230ejh.723.2020.07.31.05.29.00; Fri, 31 Jul 2020 05:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cXZ/Eyzf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732953AbgGaM2R (ORCPT + 99 others); Fri, 31 Jul 2020 08:28:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732916AbgGaM2Q (ORCPT ); Fri, 31 Jul 2020 08:28:16 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109F2C061575 for ; Fri, 31 Jul 2020 05:28:16 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id h21so16358572qtp.11 for ; Fri, 31 Jul 2020 05:28:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GpNuJXQqlOCS5GDhX83vpT+wKOWnehhWp+8dfJ9ixf8=; b=cXZ/EyzfeupDWbipTBUjVJZ+y8cP5jdycblY7Z44CJzHSeRA1+/URHNLmNEBG6BcOM stbguOeWoSqquxN/JWuE1EJG24866Y9gW6yGcPv1DjBmzHnHPnYiGSPTgEi2gsemJ0J4 NwSvx+gXc0G4R2oNG5ktox1/YbsRpUYDKMtgMbLW6ktjs6pgCzdFaNHmT5i8GLfar8rX LmIX/euaj/XZnevGsKwtZrOLf3ZUdikX/ARBBD8q1Bcn9QSW91AywUdm3OVBnsaMsjoS cdR0EiIR/Oq/XzEOgxoNyYat+O/9QHuikFCr7b7kYlRE9bfJ5uupbOprsNTY2RGNNx2d ++1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GpNuJXQqlOCS5GDhX83vpT+wKOWnehhWp+8dfJ9ixf8=; b=F5yP2ZEPgR6hDNXs5f6/37VtKNLDpRl/EPfz7DAsAx3GtH9DwhtYegpyQDEFbWlK1A lWglLBna0mp5oCjktUg6I0mD48xSwVfK+Jbf8R1dxK0/+4qOKiExg9i772RdOSaTjRYN 94Sia9WFro+nm6kkPZWE++YQCJrXk7+8zOCLF2Vc6aNT/NlRrp4/tc9AHBekKLEy0b1D HyeE5CGgxKgX0L+ScHx2gVT78Pc3MMKdYw8+cCH1I3fmZ0GiLH+LdkLwXg4siPT/ZOMU ykkN8lJP85jyQBCn3BQ9WIpx8Z0DGbW4GRs3tds/exQQaWx7lYN6xbhOWd66g9AMHEup QYtQ== X-Gm-Message-State: AOAM5336LqRQACN+rqtkBLKvsYhLfR64RRgP6Er53rFEhL8r9Tw7KkCu TK0CCeax9ZrSOm6cfFXfs4IGZKl838WsLTDy4zB7Aw== X-Received: by 2002:aed:22cb:: with SMTP id q11mr1035394qtc.200.1596198495028; Fri, 31 Jul 2020 05:28:15 -0700 (PDT) MIME-Version: 1.0 References: <1595927918-19845-1-git-send-email-grzegorz.jaszczyk@linaro.org> <1595927918-19845-5-git-send-email-grzegorz.jaszczyk@linaro.org> In-Reply-To: From: Grzegorz Jaszczyk Date: Fri, 31 Jul 2020 14:28:04 +0200 Message-ID: Subject: Re: [PATCH v4 4/5] irqchip/irq-pruss-intc: Implement irq_{get,set}_irqchip_state ops To: David Lechner , Marc Zyngier Cc: tglx@linutronix.de, jason@lakedaemon.net, "Anna, Suman" , robh+dt@kernel.org, Lee Jones , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "Mills, William" , "Bajjuri, Praneeth" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 29 Jul 2020 at 21:23, David Lechner wrote: > > On 7/28/20 4:18 AM, Grzegorz Jaszczyk wrote: > > From: David Lechner > > > > 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@XXXX { > 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