[U-Boot] dm gpio

Bin Meng bmeng.cn at gmail.com
Tue Sep 1 12:44:54 CEST 2015


Hi Simon,

I have the following codes to control a gpio pin in my board codes:

void board_assert_perst(void)
{
    gpio_request(32, "PERST");
    gpio_direction_output(32, 0);
}

But when I read <asm-generic/gpio.h>, I found these two apis are
deprecated. Instead it suggests we should use corresponding dm gpio
apis like gpio_request_by_name(), etc. However these dm gpio apis
takes one udevice* as a parameter, which requires a dm driver.

I don't think I am going to create a dm driver for this. What's the
guideline here?

Regards,
Bin


More information about the U-Boot mailing list