[PATCH v2] clk: Propagate prepare and enable when reparenting orphans
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Nov 20 02:06:33 PST 2014
On Wed, Nov 19, 2014 at 11:45:14PM -0800, Dmitry Torokhov wrote:
> On Wed, Nov 19, 2014 at 09:15:41PM -0800, Doug Anderson wrote:
> > I will defer to your wisdom here. I agree that these are the two
> > primary solutions and I've picked one, but I have no idea which will
> > be more of a PITA in the long run.
> > Note: I'm not sure that anyone expects EPROBE_DEFER to be returned
> > from a clk_enable() (do they?). It almost seems like the right answer
> > is to fail to allow anyone to clk_get() any clock that doesn't have a
> > path to root.
> EPROBE_DEFER only makes sense in driver's probe paths and so I would be
> very against adding it to clk_enable() which is called from many places
> in the kernel. If we decide to go with EPROBE_DEFER then returning it
> from clk_get() seems like a much better choice since it is normally
> called during probing.
Absolutely correct. EINVAL would be better for clk_prepare() since it
isn't something that can be recovered from by just retrying a bit later.
You're absolutely correct that EPROBE_DEFER has no business being returned
in any path other than a driver's probe function; it is not a user visible
error code, it is a special internal Linux error code which only the driver
model understands to mean "add this device to the deferred probe list and
try again a while later." Userspace, especially, should never see this
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel