mirror of https://gitee.com/openkylin/linux.git
GPIO fixes for v4.16:
- Fix up device tree properties readout caused by my own refactorings. -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJal7CpAAoJEEEQszewGV1zij8QALoTOgsX0x1RHRzJBPIVcoGL QBQJKBFm1dKwAHNrhgzY9rF1LNnsBN0LQ00PUiKJSPbsc8aa9WZw9XbhtXx1ICRK uEOytwAwkBNd//O1en3ohteg5ihszmG/mr0DwGF62AM1wstmy+4ewciLFxBIC/ue a9Wf1k1abDriqFjmwQS/TWN5YmaHOCKtrt6eSNE46YkKAEGFsPEfe64P08kg6Y1m UBxLJg8HBUMVl2lA6UQwrnrCrY4PQR6Jl3j5qaY3ENMtnr3EYFvQenwzHunDWu51 dR43gg+isjVsANomB1+yrwB6yS7Xhrz/uQwkdeMR9Gq06uq39B82/L96jHr9Xpvk OjKLOP2j/hoAQ+P6eoVGZcm522F6itpavaCdV/78wm6BEetvZWavXsREyb8D8i/i 8Xmc65Gn2+tOTBbLp5QDHabxhJnSR5xc3d2q5rDx2RjZBS4H+OZvvoYm1jgo2gOg y9ccAaaLMitQ3dBpuPvidn159nBC3hcZIiGXaCXJKdclxQptIcMCaO4cZuxIF1bU 4gFo/cn4cr/TAL929UZFtgqfkAxdLaiJXQs9mzLC0EqWy89aaB7XFxI22JlYlCFH pLJEpEqY3b6rTpIrNaH5Agbwk+BkamMSYx7jMuK+cw/8AbKSc78KVIJfUGZomXUb B9qXuyzuaS3Bg8kFYByX =XcVM -----END PGP SIGNATURE----- Merge tag 'gpio-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Fix up device tree properties readout caused by my own refactorings" * tag 'gpio-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Handle deferred probing in of_find_gpio() properly gpiolib: Keep returning EPROBE_DEFER when we should
This commit is contained in:
commit
f902a778df
|
@ -241,6 +241,19 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
|||
|
||||
desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx,
|
||||
&of_flags);
|
||||
/*
|
||||
* -EPROBE_DEFER in our case means that we found a
|
||||
* valid GPIO property, but no controller has been
|
||||
* registered so far.
|
||||
*
|
||||
* This means we don't need to look any further for
|
||||
* alternate name conventions, and we should really
|
||||
* preserve the return code for our user to be able to
|
||||
* retry probing later.
|
||||
*/
|
||||
if (IS_ERR(desc) && PTR_ERR(desc) == -EPROBE_DEFER)
|
||||
return desc;
|
||||
|
||||
if (!IS_ERR(desc) || (PTR_ERR(desc) != -ENOENT))
|
||||
break;
|
||||
}
|
||||
|
@ -250,7 +263,7 @@ struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
|
|||
desc = of_find_spi_gpio(dev, con_id, &of_flags);
|
||||
|
||||
/* Special handling for regulator GPIOs if used */
|
||||
if (IS_ERR(desc))
|
||||
if (IS_ERR(desc) && PTR_ERR(desc) != -EPROBE_DEFER)
|
||||
desc = of_find_regulator_gpio(dev, con_id, &of_flags);
|
||||
|
||||
if (IS_ERR(desc))
|
||||
|
|
Loading…
Reference in New Issue