[PATCH] pinctrl: Add SPEAr pinctrl drivers

Linus Walleij linus.walleij at linaro.org
Tue Apr 3 17:24:35 EDT 2012


On Tue, Apr 3, 2012 at 3:47 PM, Arnd Bergmann <arnd at arndb.de> wrote:

> The initialization order dependencies can now be handled using
> the deferred probe mechanism, by returning -EPROBE_DEFER from
> the probe() function of any driver that is loaded before its
> pins are available.

So how do I as a driver writer do that?

Example: drivers/tty/serial/sirfsoc_uart.c:

#include <linux/pinctrl/consumer.h>

probe() {
       if (sirfport->hw_flow_ctrl) {
                sirfport->p = pinctrl_get_select_default(&pdev->dev);
                ret = IS_ERR(sirfport->p);
                if (ret)
                        goto pin_err;
        }

pin_err:
    (...)
   return ret;

So basically the pinctrl subsystem needs to return -EPROBE_DEFER
to the driver in this case, so it can escalate that further.

Shall we go in and patch not just pinctrl but also regulator,
clk etc to return this if the subsystem is not yet up and no maps
and drivers at all have been yet been registered?

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list