forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/usb/gadget/udc/pxa27x_udc.c
....@@ -207,7 +207,7 @@
207207 {
208208 struct dentry *root;
209209
210
- root = debugfs_create_dir(udc->gadget.name, NULL);
210
+ root = debugfs_create_dir(udc->gadget.name, usb_debug_root);
211211 udc->debugfs_root = root;
212212
213213 debugfs_create_file("udcstate", 0400, root, udc, &state_dbg_fops);
....@@ -386,7 +386,7 @@
386386
387387 /**
388388 * ep_write_UDCCSR - set bits in UDCCSR
389
- * @udc: udc device
389
+ * @ep: udc endpoint
390390 * @mask: bits to set in UDCCR
391391 *
392392 * Sets bits in UDCCSR (UDCCSR0 and UDCCSR*).
....@@ -472,7 +472,7 @@
472472
473473 /**
474474 * set_ep0state - Set ep0 automata state
475
- * @dev: udc device
475
+ * @udc: udc device
476476 * @state: state
477477 */
478478 static void set_ep0state(struct pxa_udc *udc, int state)
....@@ -498,7 +498,6 @@
498498 /**
499499 * inc_ep_stats_reqs - Update ep stats counts
500500 * @ep: physical endpoint
501
- * @req: usb request
502501 * @is_in: ep direction (USB_DIR_IN or 0)
503502 *
504503 */
....@@ -1473,7 +1472,6 @@
14731472 * Context: any
14741473 *
14751474 * The UDC should be enabled if :
1476
-
14771475 * - the pullup resistor is connected
14781476 * - and a gadget driver is bound
14791477 * - and vbus is sensed (or no vbus sense is available)
....@@ -1688,7 +1686,7 @@
16881686
16891687 /**
16901688 * udc_enable - Enables the udc device
1691
- * @dev: udc device
1689
+ * @udc: udc device
16921690 *
16931691 * Enables the udc device : enables clocks, udc interrupts, control endpoint
16941692 * interrupts, sets usb as UDC client and setups endpoints.
....@@ -1732,8 +1730,8 @@
17321730
17331731 /**
17341732 * pxa27x_start - Register gadget driver
1733
+ * @g: gadget
17351734 * @driver: gadget driver
1736
- * @bind: bind function
17371735 *
17381736 * When a driver is successfully registered, it will receive control requests
17391737 * including set_configuration(), which enables non-control requests. Then
....@@ -1775,7 +1773,6 @@
17751773 /**
17761774 * stop_activity - Stops udc endpoints
17771775 * @udc: udc device
1778
- * @driver: gadget driver
17791776 *
17801777 * Disables all udc endpoints (even control endpoint), report disconnect to
17811778 * the gadget user.
....@@ -1792,7 +1789,7 @@
17921789
17931790 /**
17941791 * pxa27x_udc_stop - Unregister the gadget driver
1795
- * @driver: gadget driver
1792
+ * @g: gadget
17961793 *
17971794 * Returns 0 if no error, -ENODEV, -EINVAL otherwise
17981795 */
....@@ -2349,14 +2346,13 @@
23492346
23502347 /**
23512348 * pxa_udc_probe - probes the udc device
2352
- * @_dev: platform device
2349
+ * @pdev: platform device
23532350 *
23542351 * Perform basic init : allocates udc clock, creates sysfs files, requests
23552352 * irq.
23562353 */
23572354 static int pxa_udc_probe(struct platform_device *pdev)
23582355 {
2359
- struct resource *regs;
23602356 struct pxa_udc *udc = &memory;
23612357 int retval = 0, gpio;
23622358 struct pxa2xx_udc_mach_info *mach = dev_get_platdata(&pdev->dev);
....@@ -2378,8 +2374,7 @@
23782374 udc->gpiod = devm_gpiod_get(&pdev->dev, NULL, GPIOD_ASIS);
23792375 }
23802376
2381
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2382
- udc->regs = devm_ioremap_resource(&pdev->dev, regs);
2377
+ udc->regs = devm_platform_ioremap_resource(pdev, 0);
23832378 if (IS_ERR(udc->regs))
23842379 return PTR_ERR(udc->regs);
23852380 udc->irq = platform_get_irq(pdev, 0);