Thanks , I figured it out ! I was not putting the valid gpio in the <&gpio0 
<here> 0> 


On Friday, August 19, 2016 at 2:45:03 PM UTC+5:30, William Hermans wrote:
>
> http://linux.die.net/man/3/strerror
>
> On Thu, Aug 18, 2016 at 9:03 PM, Jane <[email protected] <javascript:>> 
> wrote:
>
>> Hello,
>>
>> This topic is not solely related to beagleboneBlack , still posting on 
>> this group .
>>
>> With reference to the example below what is the correct way to get the 
>> gpio values from the device tree :
>>
>> I modified the existing leds-ns2 device tree as below(slow1 ,cmd1) :
>>
>>
>>           blue-sata {
>>
>>                    label = "ns2:blue:sata";
>>
>>                    slow-gpio = <&gpio0 29 0>;
>>
>>                    cmd-gpio = <&gpio0 30 0>;
>>
>> +                 slow1-gpio=<&gpio 31 0>;
>>
>> +                 cmd1-gpio=<&gpio 32 0>;
>>
>>                    modes-map = <NS_V2_LED_OFF  0 1
>>
>>                                 NS_V2_LED_ON   1 0
>>
>>                                 NS_V2_LED_ON   0 0
>>
>>                                 NS_V2_LED_SATA 1 1>;
>>
>>            };
>>
>>  
>>
>>  
>>
>> And modified the driver by adding slow1 and cmd1 in all the structure 
>> (just like slow and cmd) in the attached leds-ns2.c driver
>>
>> But when I am trying to get the gpio number for slow1 and cmd1 I am 
>> getting the below error(number gpio #31 and 32 are random numbers of gpio 
>> for testing, does it matters?) :
>>
>> error : leds-ns2:probe of ns2-leds failed with error -2.What does error 
>> code -2 represents ?Is this a device tree parsing error?
>>
>> ret = of_get_named_gpio(child, "slow1-gpio", 0);
>>
>>                  if (ret < 0)
>>
>>                          return ret;
>>
>> same error if I try to get the cmd1-gpio . 
>>  
>>
>> Thanks in advance !
>>
>> Regards,
>>
>> Rp
>>
>> -- 
>> For more options, visit http://beagleboard.org/discuss
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/4f1ce45b-5a75-4152-a93d-ea33f2df87bc%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beagleboard/4f1ce45b-5a75-4152-a93d-ea33f2df87bc%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/c0af2a4f-0c29-4d7e-9527-d5636a0450f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to