usb: fotg210: Move clock handling to core
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 18 Jan 2023 07:09:18 +0000 (08:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2023 13:10:44 +0000 (14:10 +0100)
commitfaaca436699603355c5c9711942c6441eec38b0e
treee1579f70a2358ef3c9cf33c02fac5f405de2d6a2
parentbaef5330d35b477056c0304ce1283f0aed4d5d20
usb: fotg210: Move clock handling to core

Grab the optional silicon block clock, prepare and enable it in
the core before proceeding to prepare the host or peripheral
driver. This saves duplicate code and also uses the simple
devm_clk_get_optional_enabled() to do everything we really
want to do.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230103-gemini-fotg210-usb-v2-4-100388af9810@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/fotg210/fotg210-core.c
drivers/usb/fotg210/fotg210-hcd.c
drivers/usb/fotg210/fotg210-udc.c
drivers/usb/fotg210/fotg210-udc.h
drivers/usb/fotg210/fotg210.h