[U-Boot] [PATCH 1/1] altera_pio: fix get_value

Marek Vasut marex at denx.de
Sat Jan 5 10:59:28 UTC 2019


On 1/5/19 9:34 AM, Simon Goldschmidt wrote:
> Am 04.01.2019 um 19:53 schrieb Marek Vasut:
>> On 1/4/19 5:48 PM, Julien BĂ©raud wrote:
>>> gpio_get_value should return 0 or 1, not 1 << pin
>>
>> Is this documented somewhere ?
> 
> I saw it's kind of documented on 'dm_gpio_get_value', but not on struct
> dm_gpio_ops:
> 
> "@return GPIO value (0 for inactive, 1 for active) or -ve on error"

Ah, and now that I think about it, it does make sense, since GPIO 31
would trigger an error on 32bit systems.

-- 
Best regards,
Marek Vasut


More information about the U-Boot mailing list