#include <linux/time.h>
#include <linux/interrupt.h>
#include <linux/usb.h>
-
#include <linux/i2c/twl4030.h>
/* Register defines */
/*-------------------------------------------------------------------------*/
+struct twl4030_usb {
+ int irq;
+ u8 usb_mode; /* pin configuration */
+#define T2_USB_MODE_ULPI 1
+/* #define T2_USB_MODE_CEA2011_3PIN 2 */
+ u8 asleep;
+};
+
+static struct twl4030_usb *the_transceiver;
+
+/*-------------------------------------------------------------------------*/
+
static int twl4030_i2c_write_u8_verify(u8 module, u8 data, u8 address)
{
u8 check;
/*-------------------------------------------------------------------------*/
-struct twl4030_usb {
- int irq;
- u8 usb_mode; /* pin configuration */
-#define T2_USB_MODE_ULPI 1
-/* #define T2_USB_MODE_CEA2011_3PIN 2 */
- u8 asleep;
-};
-
-static struct twl4030_usb *the_transceiver;
-
-/*-------------------------------------------------------------------------*/
-
static inline int
twl4030_usb_set_bits(struct twl4030_usb *twl, u8 reg, u8 bits)
{
if (the_transceiver)
return 0;
- twl = kcalloc(1, sizeof *twl, GFP_KERNEL);
+ twl = kzalloc(sizeof *twl, GFP_KERNEL);
if (!twl)
return 0;
omap_vbus_power(musb, musb->board_mode == MUSB_HOST, 1);
-
if (is_host_enabled(musb))
musb->board_set_vbus = omap_set_vbus;
if (is_peripheral_enabled(musb))