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

2019-08-29 Thread Nemanja Savic
This is solved. Namely, I called gpio_request from checkboard function, and it seems like at that point it is not possible to use gpios. When I moved my code to board_init it started working fine. On Thu, Aug 15, 2019 at 4:18 PM Nemanja Savic wrote: > And to be more precise inside

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

2019-08-15 Thread Nemanja Savic
And to be more precise inside gpio-uclass.c, the function gpio_to_device which is called by gpio_request loops through all gpio objects in order to search for the gpio number provided never loops in my case. puts("gpio-uclass"); for (ret = uclass_first_device(UCLASS_GPIO, ); dev; ret =

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

2019-08-15 Thread Nemanja Savic
It return -2 which should be -ENOENT. In the comment at the end of gpio_to_device() it is written "No such GPIO". Are there any prerequisites before calling gpio_request regarding device tree or something else? On Thu, Aug 15, 2019 at 3:09 PM Adam Ford wrote: > On Thu, Aug 15, 2019 at 7:46 AM

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

2019-08-15 Thread Adam Ford
On Thu, Aug 15, 2019 at 7:46 AM Nemanja Savic 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 >