From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754900AbbE1VRZ (ORCPT ); Thu, 28 May 2015 17:17:25 -0400 Received: from avon.wwwdotorg.org ([70.85.31.133]:38546 "EHLO avon.wwwdotorg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754352AbbE1VRP (ORCPT ); Thu, 28 May 2015 17:17:15 -0400 Message-ID: <556785D8.2090709@wwwdotorg.org> Date: Thu, 28 May 2015 15:17:12 -0600 From: Stephen Warren User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Eric Anholt CC: linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones , devicetree@vger.kernel.org Subject: Re: [PATCH 2/3 v2] ARM: bcm2835: Add the Raspberry Pi firmware driver References: <1431543609-19646-1-git-send-email-eric@anholt.net> <1431543609-19646-3-git-send-email-eric@anholt.net> In-Reply-To: <1431543609-19646-3-git-send-email-eric@anholt.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/13/2015 01:00 PM, Eric Anholt wrote: > This gives us a function for making mailbox property channel requests > of the firmware, which is most notable in that it will let us get and > set clock rates. ... > Note that I don't think I've done what srwarren wanted for > -EPROBE_DEFER, because I'm not clear what he wants. I think he might > just be asking for a function that does: > > /* > * Returns 0 if the firmware device is probed and available, otherwise > * -EPROBE_DEFER. > */ > int rpi_firmware_get(struct device_node *firmware_node) > { > struct platform_device *pdev = of_find_device_by_node(of_node); > if (!platform_get_drvdata(pdev)) > return -EPROBE_DEFER; > return 0; > } > EXPORT_SYMBOL(rpi_firmware_get) > > If that's all, I'm happy to add it. Yes, there definitely needs to be something that clients can call at probe() time to make sure the firmware driver is there already. That check is quite different from actually sending a request to the FW, so I'd certainly expect a separate function for that.