#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/err.h>
+#include <linux/gpio.h>
#include <linux/usb/musb.h>
#include <mach/gpmc.h>
-#include <mach/gpio.h>
#include <mach/pm.h>
#define TUSB_ASYNC_CS 1
.dyn_fifo = 1,
.soft_con = 1,
.dma = 1,
- .num_eps = 32,
+ .num_eps = 16,
.dma_channels = 7,
.ram_bits = 12,
.eps_bits = musb_eps,
int i, retval = 0;
if (state) {
- omap_set_gpio_dataout(GPIO_TUSB_ENABLE, 1);
+ gpio_set_value(GPIO_TUSB_ENABLE, 1);
msleep(1);
/* Wait until TUSB6010 pulls INT pin down */
i = 100;
- while (i && omap_get_gpio_datain(GPIO_TUSB_INT)) {
+ while (i && gpio_get_value(GPIO_TUSB_INT)) {
msleep(1);
i--;
}
retval = -ENODEV;
}
} else {
- omap_set_gpio_dataout(GPIO_TUSB_ENABLE, 0);
+ gpio_set_value(GPIO_TUSB_ENABLE, 0);
msleep(10);
}
if (osc_ck_on > 0)
return -ENODEV;
- omap2_block_sleep();
+ //omap2_block_sleep();
clk_enable(osc_ck);
osc_ck_on = 1;
} else {
clk_disable(osc_ck);
osc_ck_on = 0;
- omap2_allow_sleep();
+ //omap2_allow_sleep();
}
return 0;
static char announce[] __initdata = KERN_INFO "TUSB 6010\n";
/* PM companion chip power control pin */
- ret = omap_request_gpio(GPIO_TUSB_ENABLE);
+ ret = gpio_request(GPIO_TUSB_ENABLE, "TUSB6010 enable");
if (ret != 0) {
printk(KERN_ERR "Could not get TUSB power GPIO%i\n",
GPIO_TUSB_ENABLE);
return;
}
- omap_set_gpio_direction(GPIO_TUSB_ENABLE, 0);
+ gpio_direction_output(GPIO_TUSB_ENABLE, 0);
tusb_set_power(0);
return;
err:
- omap_free_gpio(GPIO_TUSB_ENABLE);
+ gpio_free(GPIO_TUSB_ENABLE);
}