lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqL_ri3XgojPWnhJ9DrUTgqS2ucJbXacVaY5B5VaKfT7eQ@mail.gmail.com>
Date:	Thu, 2 Jul 2015 10:38:21 -0500
From:	Rob Herring <robherring2@...il.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	Tomeu Vizoso <tomeu.vizoso@...labora.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Alexandre Courbot <gnurou@...il.com>
Subject: Re: [PATCH v1 1/3] gpio: defer probe if pinctrl cannot be found

On Thu, Jul 2, 2015 at 3:59 AM, Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> Hi Rob,
>
> On Wed, Jul 1, 2015 at 7:36 PM, Rob Herring <robherring2@...il.com> wrote:
>> On Wed, Jul 1, 2015 at 7:45 AM, Tomeu Vizoso <tomeu.vizoso@...labora.com> wrote:
>>> When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if
>>> the pin controller isn't available.
>>>
>>> Otherwise, the GPIO range wouldn't be set at all unless the pin
>>> controller probed always before the GPIO chip.
>>>
>>> With this change, the probe of the GPIO chip will be deferred and will
>>> be retried at a later point, hopefully once the pin controller has been
>>> registered and probed already.
>>
>> This will break cases where the pinctrl driver does not exist, but the
>> DT contains pinctrl bindings. We can have similar problems already
>> with clocks though. However, IMO this problem is a bit different in
>> that pinctrl is more likely entirely optional while clocks are often
>> required. You may do all pin setup in bootloader/firmware on some
>> boards and not others. Of course then why put pinctrl in the DT in
>> that case? They could be present just due to how chip vs. board dts
>> files are structured.
>
> Isn't that already the case?
> If I change the compatible value of a pinctrl node to an invalid value, I get:
>
>     sh-sci e6c50000.serial: could not find pctldev for node
> /pfc@...50000/serial1, deferring probe

I guess so.

>> We could address this by simply marking the pin controller node
>> disabled. However, ...
>
> Doesn't seem to make any difference.

No doubt. I'm proposing that it should, not that it does already. Of
course, the callers will also have to test for -ENODEV and ignore
those errors.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ