/* Routine: get_sdio2_config Description: Return information about the wifi module connection Returns 0 if the module connects though a level translator Returns 1 if the module connects directly  */
int get_sdio2_config(void)
/* Routine: get_sdio2_config Description: Return information about the wifi module connection Returns 0 if the module connects though a level translator Returns 1 if the module connects directly  */
int get_sdio2_config(void)
{
	int sdio_direct;
	if (!gpio_request(130, "") && !gpio_request(139, "")) {
		gpio_direction_output(130, 0);
		gpio_direction_input(139);
		sdio_direct = 1;
		gpio_set_value(130, 0);
		if (gpio_get_value(139) == 0) {
			gpio_set_value(130, 1);
			if (gpio_get_value(139) == 1)
				sdio_direct = 0;
		}
		gpio_direction_input(130);
	} else {
		puts("Error: unable to acquire sdio2 clk GPIOs\n");
		sdio_direct = -1;
	}
	return sdio_direct;
}