Hello,
We encounter strange behavior with gpio kernel APIs.
I am using gpio output pin as following:
gpio_request(93, "lcd_reset"); // Set up the gpioButton
gpio_direction_output(93, 1);
gpio_set_value(93,1); // Set the button GPIO to be an input
msleep(10);
gpio_set_value(93,0); // Set the button GPIO to be an input
msleep(10);
gpio_set_value(93,1); // Set the button GPIO to be an input
msleep(10);
But if I add gpio_free(93) as last command, then it seems that gpio is disables (not yet validated with scope, but the LCD stops functioning):
gpio_request(93, "lcd_reset"); // Set up the gpioButton
gpio_direction_output(93, 1);
gpio_set_value(93,1); // Set the button GPIO to be an input
msleep(10);
gpio_set_value(93,0); // Set the button GPIO to be an input
msleep(10);
gpio_set_value(93,1); // Set the button GPIO to be an input
msleep(10);
gpio_free(93)
I'm not sure why. Isn't it supposed to keep it's value ?
This can also explain strange behavior with have with LCD that's get reset.
Seems that on passing from u-boot to Linux gpio (or other modules?) value is changed ?
Is this related to the options of sysc_flag (SYSC_HAS_SOFTRESET |SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS ...)
Thank you!
Ran