Commit b98866c2 authored by John Youn's avatar John Youn Committed by Felipe Balbi

usb: dwc2: Fix lines over 80 characters

Fix lines over 80 characters.
Signed-off-by: default avatarJohn Youn <johnyoun@synopsys.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 34c0887f
...@@ -127,6 +127,8 @@ static const char * const dwc2_hsotg_supply_names[] = { ...@@ -127,6 +127,8 @@ static const char * const dwc2_hsotg_supply_names[] = {
"vusb_a", /* analog USB supply, 1.1V */ "vusb_a", /* analog USB supply, 1.1V */
}; };
#define DWC2_NUM_SUPPLIES ARRAY_SIZE(dwc2_hsotg_supply_names)
/* /*
* EP0_MPS_LIMIT * EP0_MPS_LIMIT
* *
...@@ -246,7 +248,8 @@ struct dwc2_hsotg_req { ...@@ -246,7 +248,8 @@ struct dwc2_hsotg_req {
void *saved_req_buf; void *saved_req_buf;
}; };
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) #if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
#define call_gadget(_hs, _entry) \ #define call_gadget(_hs, _entry) \
do { \ do { \
if ((_hs)->gadget.speed != USB_SPEED_UNKNOWN && \ if ((_hs)->gadget.speed != USB_SPEED_UNKNOWN && \
...@@ -922,7 +925,7 @@ struct dwc2_hsotg { ...@@ -922,7 +925,7 @@ struct dwc2_hsotg {
struct phy *phy; struct phy *phy;
struct usb_phy *uphy; struct usb_phy *uphy;
struct dwc2_hsotg_plat *plat; struct dwc2_hsotg_plat *plat;
struct regulator_bulk_data supplies[ARRAY_SIZE(dwc2_hsotg_supply_names)]; struct regulator_bulk_data supplies[DWC2_NUM_SUPPLIES];
u32 phyif; u32 phyif;
spinlock_t lock; spinlock_t lock;
...@@ -1034,7 +1037,8 @@ struct dwc2_hsotg { ...@@ -1034,7 +1037,8 @@ struct dwc2_hsotg {
#endif #endif
#endif /* CONFIG_USB_DWC2_HOST || CONFIG_USB_DWC2_DUAL_ROLE */ #endif /* CONFIG_USB_DWC2_HOST || CONFIG_USB_DWC2_DUAL_ROLE */
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) #if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
/* Gadget structures */ /* Gadget structures */
struct usb_gadget_driver *driver; struct usb_gadget_driver *driver;
int fifo_mem; int fifo_mem;
...@@ -1177,7 +1181,8 @@ void dwc2_dump_global_registers(struct dwc2_hsotg *hsotg); ...@@ -1177,7 +1181,8 @@ void dwc2_dump_global_registers(struct dwc2_hsotg *hsotg);
u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg); u16 dwc2_get_otg_version(struct dwc2_hsotg *hsotg);
/* Gadget defines */ /* Gadget defines */
#if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) #if IS_ENABLED(CONFIG_USB_DWC2_PERIPHERAL) || \
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg); int dwc2_hsotg_remove(struct dwc2_hsotg *hsotg);
int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2); int dwc2_hsotg_suspend(struct dwc2_hsotg *dwc2);
int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2); int dwc2_hsotg_resume(struct dwc2_hsotg *dwc2);
......
...@@ -1113,7 +1113,8 @@ static int dwc2_hsotg_map_dma(struct dwc2_hsotg *hsotg, ...@@ -1113,7 +1113,8 @@ static int dwc2_hsotg_map_dma(struct dwc2_hsotg *hsotg,
} }
static int dwc2_hsotg_handle_unaligned_buf_start(struct dwc2_hsotg *hsotg, static int dwc2_hsotg_handle_unaligned_buf_start(struct dwc2_hsotg *hsotg,
struct dwc2_hsotg_ep *hs_ep, struct dwc2_hsotg_req *hs_req) struct dwc2_hsotg_ep *hs_ep,
struct dwc2_hsotg_req *hs_req)
{ {
void *req_buf = hs_req->req.buf; void *req_buf = hs_req->req.buf;
...@@ -1143,8 +1144,10 @@ static int dwc2_hsotg_handle_unaligned_buf_start(struct dwc2_hsotg *hsotg, ...@@ -1143,8 +1144,10 @@ static int dwc2_hsotg_handle_unaligned_buf_start(struct dwc2_hsotg *hsotg,
return 0; return 0;
} }
static void dwc2_hsotg_handle_unaligned_buf_complete(struct dwc2_hsotg *hsotg, static void
struct dwc2_hsotg_ep *hs_ep, struct dwc2_hsotg_req *hs_req) dwc2_hsotg_handle_unaligned_buf_complete(struct dwc2_hsotg *hsotg,
struct dwc2_hsotg_ep *hs_ep,
struct dwc2_hsotg_req *hs_req)
{ {
/* If dma is not being used or buffer was aligned */ /* If dma is not being used or buffer was aligned */
if (!using_dma(hsotg) || !hs_req->saved_req_buf) if (!using_dma(hsotg) || !hs_req->saved_req_buf)
...@@ -4449,8 +4452,9 @@ static int dwc2_hsotg_hw_cfg(struct dwc2_hsotg *hsotg) ...@@ -4449,8 +4452,9 @@ static int dwc2_hsotg_hw_cfg(struct dwc2_hsotg *hsotg)
/* Add ep0 */ /* Add ep0 */
hsotg->num_of_eps++; hsotg->num_of_eps++;
hsotg->eps_in[0] = devm_kzalloc(hsotg->dev, sizeof(struct dwc2_hsotg_ep), hsotg->eps_in[0] = devm_kzalloc(hsotg->dev,
GFP_KERNEL); sizeof(struct dwc2_hsotg_ep),
GFP_KERNEL);
if (!hsotg->eps_in[0]) if (!hsotg->eps_in[0])
return -ENOMEM; return -ENOMEM;
/* Same dwc2_hsotg_ep is used in both directions for ep0 */ /* Same dwc2_hsotg_ep is used in both directions for ep0 */
......
...@@ -4236,7 +4236,7 @@ void dwc2_host_complete(struct dwc2_hsotg *hsotg, struct dwc2_qtd *qtd, ...@@ -4236,7 +4236,7 @@ void dwc2_host_complete(struct dwc2_hsotg *hsotg, struct dwc2_qtd *qtd,
if (ep) if (ep)
dwc2_free_bus_bandwidth(dwc2_hsotg_to_hcd(hsotg), dwc2_free_bus_bandwidth(dwc2_hsotg_to_hcd(hsotg),
dwc2_hcd_get_ep_bandwidth(hsotg, ep), dwc2_hcd_get_ep_bandwidth(hsotg, ep),
urb); urb);
} }
...@@ -4682,7 +4682,7 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, ...@@ -4682,7 +4682,7 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
if (alloc_bandwidth) { if (alloc_bandwidth) {
dwc2_allocate_bus_bandwidth(hcd, dwc2_allocate_bus_bandwidth(hcd,
dwc2_hcd_get_ep_bandwidth(hsotg, ep), dwc2_hcd_get_ep_bandwidth(hsotg, ep),
urb); urb);
} }
......
...@@ -1078,7 +1078,8 @@ static void dwc2_hc_xfercomp_intr(struct dwc2_hsotg *hsotg, ...@@ -1078,7 +1078,8 @@ static void dwc2_hc_xfercomp_intr(struct dwc2_hsotg *hsotg,
dev_vdbg(hsotg->dev, " Isochronous transfer complete\n"); dev_vdbg(hsotg->dev, " Isochronous transfer complete\n");
if (qtd->isoc_split_pos == DWC2_HCSPLT_XACTPOS_ALL) if (qtd->isoc_split_pos == DWC2_HCSPLT_XACTPOS_ALL)
halt_status = dwc2_update_isoc_urb_state(hsotg, chan, halt_status = dwc2_update_isoc_urb_state(hsotg, chan,
chnum, qtd, DWC2_HC_XFER_COMPLETE); chnum, qtd,
DWC2_HC_XFER_COMPLETE);
dwc2_complete_periodic_xfer(hsotg, chan, chnum, qtd, dwc2_complete_periodic_xfer(hsotg, chan, chnum, qtd,
halt_status); halt_status);
break; break;
...@@ -1369,7 +1370,7 @@ static void dwc2_hc_nyet_intr(struct dwc2_hsotg *hsotg, ...@@ -1369,7 +1370,7 @@ static void dwc2_hc_nyet_intr(struct dwc2_hsotg *hsotg,
DWC2_HC_XFER_URB_COMPLETE); DWC2_HC_XFER_URB_COMPLETE);
} else { } else {
dwc2_release_channel(hsotg, chan, qtd, dwc2_release_channel(hsotg, chan, qtd,
DWC2_HC_XFER_NO_HALT_STATUS); DWC2_HC_XFER_NO_HALT_STATUS);
} }
goto handle_nyet_done; goto handle_nyet_done;
} }
...@@ -1490,7 +1491,7 @@ static void dwc2_hc_babble_intr(struct dwc2_hsotg *hsotg, ...@@ -1490,7 +1491,7 @@ static void dwc2_hc_babble_intr(struct dwc2_hsotg *hsotg,
enum dwc2_halt_status halt_status; enum dwc2_halt_status halt_status;
halt_status = dwc2_update_isoc_urb_state(hsotg, chan, chnum, halt_status = dwc2_update_isoc_urb_state(hsotg, chan, chnum,
qtd, DWC2_HC_XFER_BABBLE_ERR); qtd, DWC2_HC_XFER_BABBLE_ERR);
dwc2_halt_channel(hsotg, chan, qtd, halt_status); dwc2_halt_channel(hsotg, chan, qtd, halt_status);
} }
...@@ -1649,7 +1650,7 @@ static void dwc2_hc_xacterr_intr(struct dwc2_hsotg *hsotg, ...@@ -1649,7 +1650,7 @@ static void dwc2_hc_xacterr_intr(struct dwc2_hsotg *hsotg,
enum dwc2_halt_status halt_status; enum dwc2_halt_status halt_status;
halt_status = dwc2_update_isoc_urb_state(hsotg, chan, halt_status = dwc2_update_isoc_urb_state(hsotg, chan,
chnum, qtd, DWC2_HC_XFER_XACT_ERR); chnum, qtd, DWC2_HC_XFER_XACT_ERR);
dwc2_halt_channel(hsotg, chan, qtd, halt_status); dwc2_halt_channel(hsotg, chan, qtd, halt_status);
} }
break; break;
...@@ -1684,7 +1685,7 @@ static void dwc2_hc_frmovrun_intr(struct dwc2_hsotg *hsotg, ...@@ -1684,7 +1685,7 @@ static void dwc2_hc_frmovrun_intr(struct dwc2_hsotg *hsotg,
break; break;
case USB_ENDPOINT_XFER_ISOC: case USB_ENDPOINT_XFER_ISOC:
halt_status = dwc2_update_isoc_urb_state(hsotg, chan, chnum, halt_status = dwc2_update_isoc_urb_state(hsotg, chan, chnum,
qtd, DWC2_HC_XFER_FRAME_OVERRUN); qtd, DWC2_HC_XFER_FRAME_OVERRUN);
dwc2_halt_channel(hsotg, chan, qtd, halt_status); dwc2_halt_channel(hsotg, chan, qtd, halt_status);
break; break;
} }
...@@ -1910,7 +1911,7 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg, ...@@ -1910,7 +1911,7 @@ static void dwc2_hc_chhltd_intr_dma(struct dwc2_hsotg *hsotg,
"%s: Halt channel %d (assume incomplete periodic transfer)\n", "%s: Halt channel %d (assume incomplete periodic transfer)\n",
__func__, chnum); __func__, chnum);
dwc2_halt_channel(hsotg, chan, qtd, dwc2_halt_channel(hsotg, chan, qtd,
DWC2_HC_XFER_PERIODIC_INCOMPLETE); DWC2_HC_XFER_PERIODIC_INCOMPLETE);
} else { } else {
dev_err(hsotg->dev, dev_err(hsotg->dev,
"%s: Channel %d - ChHltd set, but reason is unknown\n", "%s: Channel %d - ChHltd set, but reason is unknown\n",
......
...@@ -1131,27 +1131,27 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg, ...@@ -1131,27 +1131,27 @@ static void dwc2_set_parameters(struct dwc2_hsotg *hsotg,
dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable); dwc2_set_param_dma_desc_fs_enable(hsotg, params->dma_desc_fs_enable);
dwc2_set_param_host_support_fs_ls_low_power(hsotg, dwc2_set_param_host_support_fs_ls_low_power(hsotg,
params->host_support_fs_ls_low_power); params->host_support_fs_ls_low_power);
dwc2_set_param_enable_dynamic_fifo(hsotg, dwc2_set_param_enable_dynamic_fifo(hsotg,
params->enable_dynamic_fifo); params->enable_dynamic_fifo);
dwc2_set_param_max_transfer_size(hsotg, dwc2_set_param_max_transfer_size(hsotg,
params->max_transfer_size); params->max_transfer_size);
dwc2_set_param_max_packet_count(hsotg, dwc2_set_param_max_packet_count(hsotg,
params->max_packet_count); params->max_packet_count);
dwc2_set_param_host_channels(hsotg, params->host_channels); dwc2_set_param_host_channels(hsotg, params->host_channels);
dwc2_set_param_phy_type(hsotg, params->phy_type); dwc2_set_param_phy_type(hsotg, params->phy_type);
dwc2_set_param_speed(hsotg, params->speed); dwc2_set_param_speed(hsotg, params->speed);
dwc2_set_param_host_ls_low_power_phy_clk(hsotg, dwc2_set_param_host_ls_low_power_phy_clk(hsotg,
params->host_ls_low_power_phy_clk); params->host_ls_low_power_phy_clk);
dwc2_set_param_phy_ulpi_ddr(hsotg, params->phy_ulpi_ddr); dwc2_set_param_phy_ulpi_ddr(hsotg, params->phy_ulpi_ddr);
dwc2_set_param_phy_ulpi_ext_vbus(hsotg, dwc2_set_param_phy_ulpi_ext_vbus(hsotg,
params->phy_ulpi_ext_vbus); params->phy_ulpi_ext_vbus);
dwc2_set_param_phy_utmi_width(hsotg, params->phy_utmi_width); dwc2_set_param_phy_utmi_width(hsotg, params->phy_utmi_width);
dwc2_set_param_ulpi_fs_ls(hsotg, params->ulpi_fs_ls); dwc2_set_param_ulpi_fs_ls(hsotg, params->ulpi_fs_ls);
dwc2_set_param_ts_dline(hsotg, params->ts_dline); dwc2_set_param_ts_dline(hsotg, params->ts_dline);
dwc2_set_param_i2c_enable(hsotg, params->i2c_enable); dwc2_set_param_i2c_enable(hsotg, params->i2c_enable);
dwc2_set_param_en_multiple_tx_fifo(hsotg, dwc2_set_param_en_multiple_tx_fifo(hsotg,
params->en_multiple_tx_fifo); params->en_multiple_tx_fifo);
dwc2_set_param_reload_ctl(hsotg, params->reload_ctl); dwc2_set_param_reload_ctl(hsotg, params->reload_ctl);
dwc2_set_param_ahbcfg(hsotg, params->ahbcfg); dwc2_set_param_ahbcfg(hsotg, params->ahbcfg);
dwc2_set_param_otg_ver(hsotg, params->otg_ver); dwc2_set_param_otg_ver(hsotg, params->otg_ver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment