From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14654C433E1 for ; Thu, 27 Aug 2020 15:43:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCEDF2177B for ; Thu, 27 Aug 2020 15:43:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="U3c9Q721"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="ChMLKsGG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCEDF2177B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jpfYFTABQiQpZnDz6AKlDiShNVmHty543YWIj3Tm0A0=; b=U3c9Q721ZvDlB8EbahXrtrOyJ iBj0Qyhpf4aMWpS8oidQWsb4lXqGiR5dVnxzBK+8hlUrRsAUCX6OmptZvz7JdmPrl2LXcG5jGY/Mw PJi0dswpqonZCWQUnk4bUFQzGwCRu+BEsZrfVPwH/K7lHyPniEttHUOcbnfv0wLzxfLnXL+/ZrnRX 1eDkbajvOTeLADf0hIUp8sp4+QgyTNRlOefHDj3aWyZsMrchXnbkLUSTrsmuBd+wmDWUaK42S3A91 i4YqG2ovZal4T3ufr2paoTyfKvONCAuFpgZ5tIG1gSA1pr58oXjtuidEQDoLB1De9YXkZDQpG8hZL 54XXbDNAA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBK2V-0006ak-HR; Thu, 27 Aug 2020 15:42:11 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBK2S-0006ZG-6Z; Thu, 27 Aug 2020 15:42:09 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A9BA72177B; Thu, 27 Aug 2020 15:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598542926; bh=ew4/DaNSkR925nymDp6t163TDRkhr555dD9aTkRQVvM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ChMLKsGGwFQ0kQmJzCHaL/vTuSo1D5U2QrqnDjR/mzfgM9oBgo+wRxRuQXXUY5WKf gFZqYrQ9Qd9jxi3xlpIlpnbfKYzJdZnLnIa0UzfM/lXSpzVgp7Zn4SH0FHUdXJzOEG qlcCu/xHttiVzC+HvsUh5mNVvXCDh9XfXRt23ia8= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kBK2P-007BBI-2c; Thu, 27 Aug 2020 16:42:05 +0100 MIME-Version: 1.0 Date: Thu, 27 Aug 2020 16:42:04 +0100 From: Marc Zyngier To: Cristian Ciocaltea Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: Add Actions SIRQ controller binding In-Reply-To: <20200827152428.GA2467154@BV030612LT> References: <6bd99d4a7e50904b57bb3ad050725fbb418874b7.1597852360.git.cristian.ciocaltea@gmail.com> <20200825220913.GA1423455@bogus> <20200826214220.GA2444747@BV030612LT> <20200827100629.GA2451538@BV030612LT> <64580e3b9acada6ff4ae9fdef02ac304@kernel.org> <20200827152428.GA2467154@BV030612LT> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <7de137f820d5a3b7921bda0751509f85@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: cristian.ciocaltea@gmail.com, robh@kernel.org, tglx@linutronix.de, jason@lakedaemon.net, afaerber@suse.de, manivannan.sadhasivam@linaro.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200827_114208_417510_3671B4D4 X-CRM114-Status: GOOD ( 26.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Jason Cooper , devicetree@vger.kernel.org, linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam , Thomas Gleixner , =?UTF-8?Q?Andreas_F=C3=A4rber?= , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Cristian, On 2020-08-27 16:24, Cristian Ciocaltea wrote: > Hi Marc, > > On Thu, Aug 27, 2020 at 11:35:06AM +0100, Marc Zyngier wrote: >> On 2020-08-27 11:06, Cristian Ciocaltea wrote: >> > On Wed, Aug 26, 2020 at 04:48:38PM -0600, Rob Herring wrote: >> > > On Wed, Aug 26, 2020 at 3:42 PM Cristian Ciocaltea >> > > wrote: >> >> [...] >> >> > > Ultimately the GIC trigger type has to be >> > > something. Is it fixed or passed thru? If the latter, just use 0 >> > > (IRQ_TYPE_NONE) if the GIC trigger mode is not fixed. Having some sort >> > > of translation of the trigger is pretty common. >> > >> > Yes, as explained above, the SIRQ controller performs indeed the >> > translation of the incoming signal. So if I understand correctly, your >> > suggestion would be to use the following inside the sirq node: >> > >> > interrupts = , /* SIRQ0 */ >> > [...] >> >> Please don't. If you are describing a GIC interrupt, use a >> trigger that actually exists. Given that you have a 1:1 >> mapping between input and output, just encode the output >> trigger that matches the input. > > Understood, the only remark here is that internally, the driver will > not use this information and instead will continue to rely on the input > to properly set the trigger type for the output. It's fine. The binding has to be consistent on its own, but doesn't dictate the way the driver does thing. > The question is if the driver should also emit a warning (or error?) > when the trigger type supplied via DT doesn't match the expected value. Rob will tell you that the kernel isn't a validation tool for broken DTs. Shout if you want, but you are allowed to simply ignore the output trigger for example > If yes, we should also clarify what the user is supposed to provide in > the controller node: the trigger type before the conversion (the input) > or the one after the conversion (the output). The output of a SIRQ should be compatible with the GIC input it is attached to. You can have: device (LEVEL_LOW) -> SIRQ (LEVEL_HIGH) -> GIC but you can't have: device (LEVEL_LOW) -> SIRQ (EDGE_RISING) -> GIC because that's not an acceptable transformation for the SIRQ, nor can you have: device (EDGE_FALLING) -> SIRQ (EDGE_FALLING) -> GIC because EDGE_FALLING isn't a valid input for the GIC. In both of the invalid cases, you would be free to apply which ever transformation actually makes sense, and shout at the user if you want to help them debugging their turf. The later part is definitely optional. Hope this helps, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel