OSDN Git Service

ARM/musb: omap2: Remove global GPIO numbers from TUSB6010
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 30 Apr 2023 19:38:24 +0000 (21:38 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 24 May 2023 13:01:59 +0000 (15:01 +0200)
commit8e0285ab95a9baf374f2c13eb152221c8ecb3f28
tree9be96f59d69062f7a08ab1182ef8b34fd0c677cd
parent078dc5194c0ac1b8e2fc088be2168a1104e16f72
ARM/musb: omap2: Remove global GPIO numbers from TUSB6010

The TUSB6010 (MUSB) device is picking up some GPIO lines
hardcoded by number and passing on to the TUSB6010 device
when registering it.

Instead of nasty workarounds, provide a GPIO descriptor
table and then make the TUSB6010 MUSB glue driver pick up
the GPIO lines directly, convert it to an IRQ and pass down
to the MUSB driver. OMAP2 is the only system using the
TUSB6010.

Stash the GPIO descriptors in the glue layer and use
then to power up and down the TUSB6010 on-demand, instead
of using boardfile callbacks.

Since the OMAP2 boards are the only boards using the
.set_power() and .board_set_power() callbacks, we can
just delete them as the power is now handled directly
in the TUSB6010 glue code.

Cc: Bin Liu <b-liu@ti.com>
Cc: linux-usb@vger.kernel.org
Fixes: 92bf78b33b0b ("gpio: omap: use dynamic allocation of base")
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/usb-tusb6010.c
arch/arm/mach-omap2/usb-tusb6010.h [new file with mode: 0644]
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.h
drivers/usb/musb/tusb6010.c
include/linux/usb/musb.h