/*-------------------------------------------------------------------------*/
/* Initialization usb_request */
-static void _nbu2ss_create_ep0_packet(
- struct nbu2ss_udc *udc,
- void *p_buf,
- unsigned length
-)
+static void _nbu2ss_create_ep0_packet(struct nbu2ss_udc *udc,
+ void *p_buf, unsigned int length)
{
udc->ep0_req.req.buf = p_buf;
udc->ep0_req.req.length = length;
/*-------------------------------------------------------------------------*/
/* Start IN Transfer */
-static void _nbu2ss_ep_in_end(
- struct nbu2ss_udc *udc,
- u32 epnum,
- u32 data32,
- u32 length
-)
+static void _nbu2ss_ep_in_end(struct nbu2ss_udc *udc,
+ u32 epnum, u32 data32, u32 length)
{
u32 data;
u32 num;
#ifdef USE_DMA
/*-------------------------------------------------------------------------*/
-static void _nbu2ss_dma_map_single(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u8 direct
-)
+static void _nbu2ss_dma_map_single(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u8 direct)
{
if (req->req.dma == DMA_ADDR_INVALID) {
if (req->unaligned) {
}
/*-------------------------------------------------------------------------*/
-static void _nbu2ss_dma_unmap_single(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u8 direct
-)
+static void _nbu2ss_dma_unmap_single(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u8 direct)
{
u8 data[4];
u8 *p;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_ep0_in_transfer(
- struct nbu2ss_udc *udc,
- struct nbu2ss_req *req
-)
+static int _nbu2ss_ep0_in_transfer(struct nbu2ss_udc *udc,
+ struct nbu2ss_req *req)
{
u8 *p_buffer; /* IN Data Buffer */
u32 data;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_ep0_out_transfer(
- struct nbu2ss_udc *udc,
- struct nbu2ss_req *req
-)
+static int _nbu2ss_ep0_out_transfer(struct nbu2ss_udc *udc,
+ struct nbu2ss_req *req)
{
u8 *p_buffer;
u32 i_remain_size;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_out_dma(
- struct nbu2ss_udc *udc,
- struct nbu2ss_req *req,
- u32 num,
- u32 length
-)
+static int _nbu2ss_out_dma(struct nbu2ss_udc *udc, struct nbu2ss_req *req,
+ u32 num, u32 length)
{
dma_addr_t p_buffer;
u32 mpkt;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_epn_out_pio(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u32 length
-)
+static int _nbu2ss_epn_out_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u32 length)
{
u8 *p_buffer;
u32 i;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_epn_out_data(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u32 data_size
-)
+static int _nbu2ss_epn_out_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u32 data_size)
{
u32 num;
u32 i_buf_size;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_epn_out_transfer(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req
-)
+static int _nbu2ss_epn_out_transfer(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req)
{
u32 num;
u32 i_recv_length;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_in_dma(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u32 num,
- u32 length
-)
+static int _nbu2ss_in_dma(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u32 num, u32 length)
{
dma_addr_t p_buffer;
u32 mpkt; /* MaxPacketSize */
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_epn_in_pio(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u32 length
-)
+static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u32 length)
{
u8 *p_buffer;
u32 i;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_epn_in_data(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- u32 data_size
-)
+static int _nbu2ss_epn_in_data(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req, u32 data_size)
{
u32 num;
int nret = 1;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_epn_in_transfer(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req
-)
+static int _nbu2ss_epn_in_transfer(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep, struct nbu2ss_req *req)
{
u32 num;
u32 i_buf_size;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_start_transfer(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- bool bflag)
+static int _nbu2ss_start_transfer(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req,
+ bool bflag)
{
int nret = -EINVAL;
/*-------------------------------------------------------------------------*/
/* Endpoint Toggle Reset */
-static void _nbu2ss_endpoint_toggle_reset(
- struct nbu2ss_udc *udc,
- u8 ep_adrs)
+static void _nbu2ss_endpoint_toggle_reset(struct nbu2ss_udc *udc, u8 ep_adrs)
{
u8 num;
u32 data;
/*-------------------------------------------------------------------------*/
/* Endpoint STALL set */
-static void _nbu2ss_set_endpoint_stall(
- struct nbu2ss_udc *udc,
- u8 ep_adrs,
- bool bstall)
+static void _nbu2ss_set_endpoint_stall(struct nbu2ss_udc *udc,
+ u8 ep_adrs, bool bstall)
{
u8 num, epnum;
u32 data;
}
/*-------------------------------------------------------------------------*/
-static int _nbu2ss_set_feature_device(
- struct nbu2ss_udc *udc,
- u16 selector,
- u16 wIndex
-)
+static int _nbu2ss_set_feature_device(struct nbu2ss_udc *udc,
+ u16 selector, u16 wIndex)
{
int result = -EOPNOTSUPP;
}
/*-------------------------------------------------------------------------*/
-static void _nbu2ss_epn_set_stall(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep
-)
+static void _nbu2ss_epn_set_stall(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep)
{
u8 ep_adrs;
u32 regdata;
}
/*-------------------------------------------------------------------------*/
-static void _nbu2ss_ep_done(
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req,
- int status)
+static void _nbu2ss_ep_done(struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req,
+ int status)
{
struct nbu2ss_udc *udc = ep->udc;
}
/*-------------------------------------------------------------------------*/
-static inline void _nbu2ss_epn_in_int(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req)
+static inline void _nbu2ss_epn_in_int(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req)
{
int result = 0;
u32 status;
}
/*-------------------------------------------------------------------------*/
-static inline void _nbu2ss_epn_out_int(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req)
+static inline void _nbu2ss_epn_out_int(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req)
{
int result;
}
/*-------------------------------------------------------------------------*/
-static inline void _nbu2ss_epn_in_dma_int(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req)
+static inline void _nbu2ss_epn_in_dma_int(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req)
{
u32 mpkt;
u32 size;
}
/*-------------------------------------------------------------------------*/
-static inline void _nbu2ss_epn_out_dma_int(
- struct nbu2ss_udc *udc,
- struct nbu2ss_ep *ep,
- struct nbu2ss_req *req)
+static inline void _nbu2ss_epn_out_dma_int(struct nbu2ss_udc *udc,
+ struct nbu2ss_ep *ep,
+ struct nbu2ss_req *req)
{
int i;
u32 num;
/*-------------------------------------------------------------------------*/
/* usb_ep_ops */
-static int nbu2ss_ep_enable(
- struct usb_ep *_ep,
- const struct usb_endpoint_descriptor *desc)
+static int nbu2ss_ep_enable(struct usb_ep *_ep,
+ const struct usb_endpoint_descriptor *desc)
{
u8 ep_type;
unsigned long flags;
}
/*-------------------------------------------------------------------------*/
-static struct usb_request *nbu2ss_ep_alloc_request(
- struct usb_ep *ep,
- gfp_t gfp_flags)
+static struct usb_request *nbu2ss_ep_alloc_request(struct usb_ep *ep,
+ gfp_t gfp_flags)
{
struct nbu2ss_req *req;
}
/*-------------------------------------------------------------------------*/
-static void nbu2ss_ep_free_request(
- struct usb_ep *_ep,
- struct usb_request *_req)
+static void nbu2ss_ep_free_request(struct usb_ep *_ep,
+ struct usb_request *_req)
{
struct nbu2ss_req *req;
}
/*-------------------------------------------------------------------------*/
-static int nbu2ss_ep_queue(
- struct usb_ep *_ep,
- struct usb_request *_req,
- gfp_t gfp_flags)
+static int nbu2ss_ep_queue(struct usb_ep *_ep,
+ struct usb_request *_req, gfp_t gfp_flags)
{
struct nbu2ss_req *req;
struct nbu2ss_ep *ep;
}
/*-------------------------------------------------------------------------*/
-static int nbu2ss_ep_dequeue(
- struct usb_ep *_ep,
- struct usb_request *_req)
+static int nbu2ss_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{
struct nbu2ss_req *req;
struct nbu2ss_ep *ep;
}
/*-------------------------------------------------------------------------*/
-static int nbu2ss_gad_ioctl(
- struct usb_gadget *pgadget,
- unsigned int code,
- unsigned long param)
+static int nbu2ss_gad_ioctl(struct usb_gadget *pgadget,
+ unsigned int code, unsigned long param)
{
return 0;
}
/*-------------------------------------------------------------------------*/
/* platform_driver */
-static int nbu2ss_drv_contest_init(
- struct platform_device *pdev,
- struct nbu2ss_udc *udc)
+static int nbu2ss_drv_contest_init(struct platform_device *pdev,
+ struct nbu2ss_udc *udc)
{
spin_lock_init(&udc->lock);
udc->dev = &pdev->dev;