lkml.org 
[lkml]   [2015]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/7] ARM: bcm2835: Add a Raspberry Pi-specific clock driver.
On 05/29/2015 03:02 PM, Eric Anholt wrote:
> Stephen Warren <swarren@wwwdotorg.org> writes:
>
>> On 05/18/2015 01:43 PM, Eric Anholt wrote:

>>> +static struct clk *rpi_firmware_delayed_get_clk(struct
>>> of_phandle_args *clkspec, + void *_data)
>>
>>> + rpi_clk = &rpi_clocks[clkspec->args[0]]; + + firmware_node =
>>> of_parse_phandle(of_node, "firmware", 0); + if (!firmware_node)
>>> { + dev_err(dev, "%s: Missing firmware node\n",
>>> rpi_clk->name); + return ERR_PTR(-ENODEV); + } + + /* Try a
>>> no-op transaction to see if the driver is loaded yet. */ + ret
>>> = rpi_firmware_property_list(firmware_node, NULL, 0); + if
>>> (ret) + return ERR_PTR(ret);
>>
>> I would move all that into this driver's probe().
>
> We can't move all this into the driver's probe, because this is
> where we're returning -EPROBE_DEFER. We could potentially do just
> the phandle parse up front and allocate some memory to pass it and
> our own device node to this function through the _data arg, but I
> don't see much point.

Well, once the clock core correctly supports deferred probe, that can
be moved.

Aside from that, I think all your other replies to my replies in this
thread/series make sense.


\
 
 \ /
  Last update: 2015-06-05 05:21    [W:0.115 / U:4.740 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site