[U-Boot] What can cause gpio_request return negative value

Adam Ford aford173 at gmail.com
Thu Aug 15 13:09:21 UTC 2019


On Thu, Aug 15, 2019 at 7:46 AM Nemanja Savic <vlasinac at gmail.com> wrote:
>
> Hi all,
>
> I am struggling with porting our old board init code for a sabre auto based
> custom board with i.MX6 DualLite processor. The code used to work in our
> older u-boot version, but what I saw in mx6qsabreauto.c is that the new
> style is by using new driver model which means the gpio should be first
> requested. However gpio_request returns negative value in my case. Where
> could the problem be? As far as I could see our device tree doesn't reserve
> this pin for other purpose. It is even not mentioned there. The only thing
> related to those pins are iomux pin definitions in the device tree but
> removing that doesn't help at all. Also device tree for the Sabre Auto
> board doesn't mention gpio pins that they use in their u-boot. I am dealing
> with 2017.03 version of u-boot.

Do you know what the negative value is?  include/linux/errno.h  should
have a list of error numbers which should correlate to the error
you're seeing.  That should also tell you what the error means.  From
there, you should be able to search the code for where that error
might return.

adam
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list