13 Nov, 2020

1 commit

  • This reverts commit 2d30e408a2a6b3443d3232593e3d472584a3e9f8.

    On Beaglebone Black, where each interface has 2 children:

    musb-dsps 47401c00.usb: can't request region for resource [mem 0x47401800-0x474019ff]
    musb-hdrc musb-hdrc.1: musb_init_controller failed with status -16
    musb-hdrc: probe of musb-hdrc.1 failed with error -16
    musb-dsps 47401400.usb: can't request region for resource [mem 0x47401000-0x474011ff]
    musb-hdrc musb-hdrc.0: musb_init_controller failed with status -16
    musb-hdrc: probe of musb-hdrc.0 failed with error -16

    Before, devm_ioremap_resource() was called on "dev" ("musb-hdrc.0" or
    "musb-hdrc.1"), after it is called on "&pdev->dev" ("47401400.usb" or
    "47401c00.usb"), leading to a duplicate region request, which fails.

    Signed-off-by: Geert Uytterhoeven
    Fixes: 2d30e408a2a6 ("usb: musb: convert to devm_platform_ioremap_resource_byname")
    Cc: stable
    Link: https://lore.kernel.org/r/20201112135900.3822599-1-geert+renesas@glider.be
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     

10 Oct, 2020

1 commit

  • In order to enable -Wimplicit-fallthrough for Clang[1], replace the
    existing /* FALLTHROUGH */ comment with the new pseudo-keyword
    macro fallthrough[2].

    [1] https://git.kernel.org/linus/e2079e93f562c7f7a030eb7642017ee5eabaaa10
    [2] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20201008222849.GA18634@embeddedor
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     

24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

06 Aug, 2020

1 commit

  • Pull USB/Thunderbolt updates from Greg KH:
    "Here is the large set of USB and Thunderbolt patches for 5.9-rc1.

    Nothing really magic/major in here, just lots of little changes and
    updates:

    - clean up language usages in USB core and some drivers

    - Thunderbolt driver updates and additions

    - USB Gadget driver updates

    - dwc3 driver updates (like always...)

    - build with "W=1" warning fixups

    - mtu3 driver updates

    - usb-serial driver updates and device ids

    - typec additions and updates for new hardware

    - xhci debug code updates for future platforms

    - cdns3 driver updates

    - lots of other minor driver updates and fixes and cleanups

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'usb-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (330 commits)
    usb: common: usb-conn-gpio: Register charger
    usb: mtu3: simplify mtu3_req_complete()
    usb: mtu3: clear dual mode of u3port when disable device
    usb: mtu3: use MTU3_EP_WEDGE flag
    usb: mtu3: remove useless member @busy in mtu3_ep struct
    usb: mtu3: remove repeated error log
    usb: mtu3: add ->udc_set_speed()
    usb: mtu3: introduce a funtion to check maximum speed
    usb: mtu3: clear interrupts status when disable interrupts
    usb: mtu3: reinitialize CSR registers
    usb: mtu3: fix macro for maximum number of packets
    usb: mtu3: remove unnecessary pointer checks
    usb: xhci: Fix ASMedia ASM1142 DMA addressing
    usb: xhci: define IDs for various ASMedia host controllers
    usb: musb: convert to devm_platform_ioremap_resource_byname
    usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname
    usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname
    usb: dwc3: convert to devm_platform_ioremap_resource_byname
    usb: cdns3: convert to devm_platform_ioremap_resource_byname
    usb: phy: am335x: convert to devm_platform_ioremap_resource_byname
    ...

    Linus Torvalds
     

29 Jul, 2020

1 commit


17 Jul, 2020

1 commit

  • Using uninitialized_var() is dangerous as it papers over real bugs[1]
    (or can in the future), and suppresses unrelated compiler warnings
    (e.g. "unused variable"). If the compiler thinks it is uninitialized,
    either simply initialize the variable or make compiler changes.

    In preparation for removing[2] the[3] macro[4], remove all remaining
    needless uses with the following script:

    git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
    xargs perl -pi -e \
    's/\buninitialized_var\(([^\)]+)\)/\1/g;
    s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

    drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
    pathological white-space.

    No outstanding warnings were found building allmodconfig with GCC 9.3.0
    for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
    alpha, and m68k.

    [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
    [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
    [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
    [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

    Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5
    Acked-by: Jason Gunthorpe # IB
    Acked-by: Kalle Valo # wireless drivers
    Reviewed-by: Chao Yu # erofs
    Signed-off-by: Kees Cook

    Kees Cook
     

15 Jul, 2020

1 commit


09 Jul, 2020

1 commit

  • No attempt has been made to document any of the demoted functions here.

    Fixes the following W=1 kernel build warning(s):

    drivers/usb/musb/musb_dsps.c:44: warning: cannot understand function prototype: 'struct dsps_musb_wrapper '
    drivers/usb/musb/musb_dsps.c:102: warning: cannot understand function prototype: 'struct dsps_glue '
    drivers/usb/musb/musb_dsps.c:169: warning: Function parameter or member 'musb' not described in 'dsps_musb_enable'
    drivers/usb/musb/musb_dsps.c:195: warning: Function parameter or member 'musb' not described in 'dsps_musb_disable'

    Cc: Bin Liu
    Cc: Ravi B
    Cc: Kumar Gupta
    Signed-off-by: Lee Jones
    Link: https://lore.kernel.org/r/20200703174148.2749969-29-lee.jones@linaro.org
    Signed-off-by: Greg Kroah-Hartman

    Lee Jones
     

24 Jun, 2020

1 commit

  • For some reason, the TEST_ defines in the usb/ch9.h files did not have
    the USB_ prefix on it, making it a bit confusing when reading the file,
    as well as not the nicest thing to do in a uapi file.

    So fix that up and add the USB_ prefix on to them, and fix up all
    in-kernel usages. This included deleting the duplicate copy in the
    net2272.h file.

    Cc: Felipe Balbi
    Cc: Michal Simek
    Cc: Mathias Nyman
    Cc: Pawel Laszczak
    Cc: YueHaibing
    Cc: Nathan Chancellor
    Cc: Jason Yan
    Cc: Jia-Ju Bai
    Cc: Stephen Boyd
    Cc: Christophe JAILLET
    Cc: Arnd Bergmann
    Cc: Jules Irenge
    Cc: Alan Stern
    Cc: Thinh Nguyen
    Cc: Rob Gill
    Cc: Macpaul Lin
    Acked-by: Minas Harutyunyan
    Acked-by: Bin Liu
    Acked-by: Chunfeng Yun
    Acked-by: Peter Chen
    Link: https://lore.kernel.org/r/20200618144206.2655890-1-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 Jun, 2020

1 commit

  • The USB OTG code has the ability to disable external hubs, but the
    configuration option for it is oddly named. Rename it to be more
    obvious as to what it does.

    Cc: Thomas Bogendoerfer
    Cc: Bin Liu
    Cc: Paul Cercueil
    Cc: Alan Stern
    Cc: Eugeniu Rosca
    Cc: Kai-Heng Feng
    Cc: David Heinzelmann
    Cc: "Lee, Chiasheng"
    Cc: Keiya Nobuta
    Cc: Hardik Gajjar
    Link: https://lore.kernel.org/r/20200618094300.1887727-3-gregkh@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

25 May, 2020

6 commits

  • When copy_from_user() returns an error code, there
    is a runtime PM usage counter imbalance.

    Fix this by moving copy_from_user() to the beginning
    of this function.

    Fixes: 7b6c1b4c0e1e ("usb: musb: fix runtime PM in debugfs")

    Signed-off-by: Dinghao Liu
    Cc: stable@vger.kernel.org
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200525025049.3400-7-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Dinghao Liu
     
  • The function dma_controller_irq() locks up the exact same spinlock we
    locked before calling it, which obviously resulted in a deadlock when
    CONFIG_SMP was enabled. This flew under the radar as none of the boards
    supported by this driver needs SMP.

    Fixes: 57aadb46bd63 ("usb: musb: jz4740: Add support for DMA")

    Cc: stable@vger.kernel.org
    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200525025049.3400-6-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • When receiving reset interrupt, FADDR need to be reset to zero in
    peripheral mode. Otherwise ep0 cannot do enumeration when re-plugging USB
    cable.

    Signed-off-by: Macpaul Lin
    Acked-by: Min Guo
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200525025049.3400-5-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Macpaul Lin
     
  • Fix the following coccicheck warning:

    drivers/usb/musb/musb_core.c:1798:12-19: WARNING: Assignment of 0/1 to
    bool variable

    Signed-off-by: Jason Yan
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200525025049.3400-4-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Jason Yan
     
  • Commit 17539f2f4f0b ("usb: musb: fix enumeration after resume") replaced
    musb_start() in musb_resume() to not override softconnect bit, but it
    doesn't restart the session for host port which was done in musb_start().
    The session could be disabled in musb_suspend(), which leads the host
    port doesn't stay in host mode.

    So let's start the session specifically for host port in musb_resume().

    Fixes: 17539f2f4f0b ("usb: musb: fix enumeration after resume")

    Cc: stable@vger.kernel.org
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200525025049.3400-3-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Bin Liu
     
  • When a USB device attached to a hub got disconnected, MUSB controller
    generates RXCSR_RX_ERROR interrupt for the 3-strikes-out error.

    Currently the MUSB host driver returns -EPROTO in current URB, then the
    USB device driver could immediately resubmit the URB which causes MUSB
    generate RXCSR_RX_ERROR interrupt again. This circle causes interrupt
    storm then the hub never got a chance to report the USB device detach.

    To fix the interrupt storm, change the URB return code to -ESHUTDOWN for
    MUSB_RXCSR_H_ERROR interrupt, so that the USB device driver will not
    immediately resubmit the URB.

    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200525025049.3400-2-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Bin Liu
     

16 Apr, 2020

1 commit

  • This patch corrects the SPDX License Identifier style in
    header files related to USB Dual Role (OTG-ready) Controller Drivers.
    For C header files Documentation/process/license-rules.rst
    mandates C-like comments (opposed to C source files where
    C++ style should be used).

    Changes made by using a script provided by Joe Perches here:
    https://lkml.org/lkml/2019/2/7/46.

    Suggested-by: Joe Perches
    Signed-off-by: Nishad Kamdar
    Link: https://lore.kernel.org/r/20200404104952.GA6575@nishad
    Signed-off-by: Greg Kroah-Hartman

    Nishad Kamdar
     

18 Mar, 2020

7 commits

  • Replace "unsigned" to "u32" for checkpatch fix to tusb_writeb().

    Signed-off-by: Macpaul Lin
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-9-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Macpaul Lin
     
  • When handling a PIO bulk transfer with highmem buffer, a temporary
    mapping is assigned to urb->transfer_buffer. After the transfer is
    complete, an invalid address is left behind in this pointer. This is
    not ordinarily a problem since nothing touches that buffer before the
    urb is released. However, when usbmon is active, usbmon_urb_complete()
    calls (indirectly) mon_bin_get_data() which does access the transfer
    buffer if it is set. To prevent an invalid memory access here, reset
    urb->transfer_buffer to NULL when finished (musb_host_rx()), or do not
    set it at all (musb_host_tx()).

    Fixes: 8e8a55165469 ("usb: musb: host: Handle highmem in PIO mode")
    Signed-off-by: Mans Rullgard
    Cc: stable@vger.kernel.org
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-8-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Mans Rullgard
     
  • Add support for probing the jz4740-musb driver on the JZ4770 SoC.

    The USB IP in the JZ4770 works the same Inventra IP as for the JZ4740,
    but it features more endpoints, and officially supports OTG.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-7-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • The jz4740-musb driver is unconditionally probed from devicetree, so we
    can add a hard dependency on devicetree. This makes the code a bit
    cleaner, and is more future-proof as the platform data is now retrieved
    using of_device_get_match_data().

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-6-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • Register a USB role switch, in order to get notified by the connector
    driver when the USB role changes. The notification is then transmitted
    to the PHY.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-5-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • Add support for using the DMA channels built into the Inventra IP.

    Signed-off-by: Paul Cercueil
    Tested-by: Artur Rojek
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-4-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • Variable ret is being initialized with a value that is never read,
    it is assigned a new value later on. The assignment is redundant
    and can be removed.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200316211136.2274-2-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Colin Ian King
     

04 Mar, 2020

1 commit

  • The USB role callback functions had a parameter pointing to
    the parent device (struct device) of the switch. The
    assumption was that the switch parent is always the
    controller. Firstly, that may not be true in every case, and
    secondly, it prevents us from supporting devices that supply
    multiple muxes.

    Changing the first parameter of usb_role_switch_set_t and
    usb_role_switch_get_t from struct device to struct
    usb_role_switch.

    Cc: Peter Chen
    Cc: Felipe Balbi
    Cc: Chunfeng Yun
    Cc: Bin Liu
    Signed-off-by: Heikki Krogerus
    Link: https://lore.kernel.org/r/20200302135353.56659-6-heikki.krogerus@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     

19 Feb, 2020

1 commit


15 Feb, 2020

1 commit

  • The current codebase makes use of the zero-length array language
    extension to the C90 standard, but the preferred mechanism to declare
    variable-length types such as these ones is a flexible array member[1][2],
    introduced in C99:

    struct foo {
    int stuff;
    struct boo array[];
    };

    By making use of the mechanism above, we will get a compiler warning
    in case the flexible array does not occur last in the structure, which
    will help us prevent some kind of undefined behavior bugs from being
    inadvertenly introduced[3] to the codebase from now on.

    This issue was found with the help of Coccinelle.

    [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
    [2] https://github.com/KSPP/linux/issues/21
    [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

    Signed-off-by: Gustavo A. R. Silva
    Link: https://lore.kernel.org/r/20200211232519.GA23263@embeddedor
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     

22 Jan, 2020

1 commit


15 Jan, 2020

12 commits

  • Since commit 0782e8572ce4 ("ARM: dts: Probe am335x musb with ti-sysc"),
    the dummy driver musb_am335x.c is no longer needed, let's drop it.

    Acked-by: Tony Lindgren
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-26-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Bin Liu
     
  • The DaVinci MUSB glue contains an optional GPIO line to
    control VBUS power, convert this to use a GPIO descriptor
    and augment the EVM board file to provide this descriptor.

    I can't get this driver to compile properly and it depends
    on broken but when I didn get it to compile brokenly, it
    did at least not complain about THIS code being broken so
    I don't think I broke the driver any more than what it
    already is.

    I did away with the ifdefs that do not work with
    multiplatform anyway so the day someone decides to
    resurrect the code, the path to get it working should be
    easier as well since DaVinci is now multiplatform.

    Cc: Sekhar Nori
    Cc: Bartosz Golaszewski
    Cc: Tony Lindgren
    Signed-off-by: Linus Walleij
    [b-liu@ti.com: fixed one instance still ref to global variable vbus_state]
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-25-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Linus Walleij
     
  • This adds support for MediaTek musb controller in
    host, peripheral and otg mode.
    There are some quirk of MediaTek musb controller, such as:
    -W1C interrupt status registers
    -Private data toggle registers
    -No dedicated DMA interrupt line

    Signed-off-by: Min Guo
    Signed-off-by: Yonglong Wu
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-24-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Min Guo
     
  • Delete the const attribute of addr parameter in readb/w/l hooks, these
    changes are for implementing clearing W1C registers.
    Replace musb_readb/w with musb_clearb/w to clear the interrupt status.

    While at here, change some unsigned type to u32 to fix checkpatch.pl
    warnings.

    Signed-off-by: Min Guo
    [b-liu@ti.com: fix checkpatch.pl warnings.]
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-23-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Min Guo
     
  • Add noirq type of dma create interface for platform which do not
    have dedicated DMA interrupt line, move musbhsdma macro definition
    to musb_dma.h

    Signed-off-by: Min Guo
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-22-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Min Guo
     
  • Add get/set toggle hooks in struct musb_io and struct musb_platform_ops
    for special platform; remove function musb_save_toggle, use the set/get
    callback to handle toggle.

    Signed-off-by: Min Guo
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-21-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Min Guo
     
  • dma_request_slave_channel() is a wrapper on top of dma_request_chan()
    eating up the error code.

    Signed-off-by: Peter Ujfalusi
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-19-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Peter Ujfalusi
     
  • The trace functions should have __iomem on the addr
    pointers. Add __iomem to avoid the following warnings
    from sparse:

    drivers/usb/musb/musb_core.c:253:55: warning: incorrect type in argument 2 (different address spaces)
    drivers/usb/musb/musb_core.c:253:55: expected void const *addr
    drivers/usb/musb/musb_core.c:253:55: got void const [noderef] *addr
    drivers/usb/musb/musb_core.c:259:56: warning: incorrect type in argument 2 (different address spaces)
    drivers/usb/musb/musb_core.c:259:56: expected void const *addr
    drivers/usb/musb/musb_core.c:259:56: got void [noderef] *addr
    drivers/usb/musb/musb_core.c:267:55: warning: incorrect type in argument 2 (different address spaces)
    drivers/usb/musb/musb_core.c:267:55: expected void const *addr
    drivers/usb/musb/musb_core.c:267:55: got void const [noderef] *addr
    drivers/usb/musb/musb_core.c:273:56: warning: incorrect type in argument 2 (different address spaces)
    drivers/usb/musb/musb_core.c:273:56: expected void const *addr
    drivers/usb/musb/musb_core.c:273:56: got void [noderef] *addr
    drivers/usb/musb/musb_core.c:383:55: warning: incorrect type in argument 2 (different address spaces)
    drivers/usb/musb/musb_core.c:383:55: expected void const *addr
    drivers/usb/musb/musb_core.c:383:55: got void const [noderef] *addr
    drivers/usb/musb/musb_core.c:390:56: warning: incorrect type in argument 2 (different address spaces)
    drivers/usb/musb/musb_core.c:390:56: expected void const *addr
    drivers/usb/musb/musb_core.c:390:56: got void [noderef] *addr

    Signed-off-by: Ben Dooks (Codethink)
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-18-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Ben Dooks (Codethink)
     
  • Fix lines with too much or not enough indentation, and lines which were
    indented with spaces instead of tabs.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-17-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • Add a /* sentinel */ comment to the sentinel entry of the devicetree ID
    table, and fix a multi-line comment not having its opening token on a
    separate line.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-16-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • Name the platform_device pointer 'pdev' instead of 'musb'. Since the
    driver also deal with pointers to 'struct musb', it can be very
    confusing to have a pointer named after this struct but with a different
    type.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-15-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil
     
  • By moving around the jz4740_musb_pdata structure, we can have the
    .platform_ops field initialized, so that we don't have to initialize it
    manually in the probe function. Therefore, the struct can be const now.

    Signed-off-by: Paul Cercueil
    Signed-off-by: Bin Liu
    Link: https://lore.kernel.org/r/20200115132547.364-14-b-liu@ti.com
    Signed-off-by: Greg Kroah-Hartman

    Paul Cercueil