From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Hurley Subject: Re: [PATCH] [RFC] OF: probe order dependency aware of_platform_populate Date: Thu, 16 Apr 2015 06:40:24 -0400 Message-ID: <552F9198.4030902@hurleysoftware.com> References: <1418731891-24768-1-git-send-email-pantelis.antoniou@konsulko.com> <20150319191834.5346CC40A35@trevor.secretlab.ca> <8E250936-B06C-40B4-8C34-557D2361CAF6@konsulko.com> <1B3AF599-4A64-4FB0-BFB0-0C0544917C6C@konsulko.com> <20150402023803.E6A4DC4076D@trevor.secretlab.ca> <552E7309.8020505@hurleysoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring Cc: Geert Uytterhoeven , Grant Likely , Pantelis Antoniou , Guenter Roeck , Greg Kroah-Hartman , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Matt Porter List-Id: devicetree@vger.kernel.org On 04/15/2015 10:35 AM, Rob Herring wrote: > On Wed, Apr 15, 2015 at 9:17 AM, Peter Hurley wrote: >> 2. Should DT-specific drivers not be using irq_of_parse_and_map()? >> On probe failure irq_dispose_mapping() will be junking the mapping, >> thus invalidating the irq assignment in the platform resource table, >> which breaks platform drivers which might otherwise probe successfully. > > Generally no, they should not use irq_of_parse_and_map as we want > drivers to work with platform_data, DT, ACPI, or Bob's Firmware > Interface. I think most users are PPC drivers which don't have so much > of the probe ordering problems. Apologies for hijacking this thread for a moment. If of_device_alloc() creates the irq mapping, and no driver probes succeed, what is disposing the mapping? Similarly, if a platform driver fails its probe after platform_get_irq() what should dispose of that mapping? Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html