Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756124Ab3GYNTf (ORCPT ); Thu, 25 Jul 2013 09:19:35 -0400 Received: from mail-oa0-f42.google.com ([209.85.219.42]:55019 "EHLO mail-oa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755882Ab3GYNTd (ORCPT ); Thu, 25 Jul 2013 09:19:33 -0400 MIME-Version: 1.0 In-Reply-To: <1408178.cxAUTUGJc5@avalon> References: <1624911.6TtmtVmU1T@avalon> <1408178.cxAUTUGJc5@avalon> Date: Thu, 25 Jul 2013 15:19:32 +0200 Message-ID: Subject: Re: How to create IRQ mappings in a GPIO driver that doesn't control its IRQ domain ? From: Linus Walleij To: Laurent Pinchart Cc: "linux-kernel@vger.kernel.org" , Benjamin Herrenschmidt , Grant Likely , "linux-gpio@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Guennadi Liakhovetski Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 919 Lines: 23 On Thu, Jul 25, 2013 at 11:45 AM, Laurent Pinchart wrote: > The two devices are independent, so there's no real parent/child relationship. > However, as Grant proposed, I could list all the interrupts associated with > GPIOs in the GPIO controller DT node. I would then just call > irq_of_parse_and_map() in the .to_irq() handler to magically translate the > GPIO number to a mapped IRQ number. That works even if the device tree will need a comment or two to explain what is going on. I suggested a similar solution for the OMAP crossbar mux that is discussed in another thread, so I'm happy with this approach. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/