[U-Boot] [PATCH RFT] gpio: vybrid: Fix up setting output value in vybrid_gpio_direction_output

Axel Lin axel.lin at ingics.com
Tue Jun 9 16:03:22 CEST 2015


2015-06-09 21:53 GMT+08:00 Bhuvanchandra DV <bhuvanchandra.dv at toradex.com>:
> On 06/09/2015 06:49 PM, Axel Lin wrote:
>>
>> 2015-06-09 20:58 GMT+08:00 Bhuvanchandra DV
>> <bhuvanchandra.dv at toradex.com>:
>>>
>>> Hello Axel,
>>>
>>> On 06/09/2015 02:45 PM, Axel Lin wrote:
>>>>
>>>>
>>>> Pass correct gpio argument to gpio_set_value().
>>>> The calcualation of gpio = gpio + (gpios->chip * VYBRID_GPIO_COUNT);
>>>> is required for calling imx_iomux_gpio_* functions so move them close to
>>>> improve readability.
>>>>
>>>> Signed-off-by: Axel Lin <axel.lin at ingics.com>
>>>> ---
>>>> Hi Bhuvanchandra,
>>>> I think current code does not pass correct gpio argument to
>>>> gpio_set_value()
>>>> in vybrid_gpio_direction_output(). It only works if gpios->chip is 0.
>>>> I don't have the h/w to test, can you double check this?
>>>
>>>
>>> gpio_set_value() needs the actual gpio number to be passed not the gpio
>>> offset of gpio chip.
>>
>>
>> Are you sure?
>> Please take a look at gpio_get_value()/gpio_set_value() implement in
>> drivers/gpio/gpio-uclass.c.
>
> Yes,

Ah, my fault actually.
Sorry for the noise.

Regards,
Axel


More information about the U-Boot mailing list