From: Philipp Zabel <p.zabel@pengutronix.de>
To: Linus Walleij <linusw@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Daniel Palmer <daniel@thingy.jp>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] usb: fotg210: use the common EHCI core
Date: Mon, 31 Aug 2026 11:07:41 +0200 [thread overview]
Message-ID: <cd6db5def6d08ad435facebd16479a6c65de4773.camel@pengutronix.de> (raw)
In-Reply-To: <20260831-gemini-usb-fotg2-v1-2-8a8ee12c4b32@kernel.org>
On Mo, 2026-08-31 at 00:24 +0200, Linus Walleij wrote:
> Replace the private EHCI fork with an hc_driver built from the common
> EHCI implementation. Configure the FOTG210 register, root-hub TT,
> speed-reporting, port-reset, and Gemini timing quirks through the new
> hooks.
>
> Keep role selection fixed at probe time, while cleaning up clock/reset
> handling, interrupt masks, Gemini syscon setup, VBUS sequencing, probe
> failures, shutdown, and system sleep. Device trees without dr_mode
> retain their historical host default.
>
> Assisted-by: LLM
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> drivers/usb/fotg210/Kconfig | 2 +
> drivers/usb/fotg210/fotg210-core.c | 276 +-
> drivers/usb/fotg210/fotg210-hcd.c | 5672 +-----------------------------------
> drivers/usb/fotg210/fotg210-hcd.h | 689 -----
> drivers/usb/fotg210/fotg210.h | 26 +-
> 5 files changed, 338 insertions(+), 6327 deletions(-)
>
[...]
> diff --git a/drivers/usb/fotg210/fotg210-core.c b/drivers/usb/fotg210/fotg210-core.c
> index 7fb4d4715e9f..a6f39306fb19 100644
> --- a/drivers/usb/fotg210/fotg210-core.c
> +++ b/drivers/usb/fotg210/fotg210-core.c
> @@ -1,37 +1,50 @@
[...]
> static int fotg210_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> - enum usb_dr_mode mode;
> + struct reset_control *rst;
> struct fotg210 *fotg;
> u32 val;
> int ret;
> @@ -141,62 +193,112 @@ static int fotg210_probe(struct platform_device *pdev)
> if (IS_ERR(fotg->base))
> return PTR_ERR(fotg->base);
>
> - fotg->pclk = devm_clk_get_optional_enabled(dev, "PCLK");
> + fotg->pclk = devm_clk_get_enabled(dev, "PCLK");
> if (IS_ERR(fotg->pclk))
> - return PTR_ERR(fotg->pclk);
> + return dev_err_probe(dev, PTR_ERR(fotg->pclk),
> + "failed to enable PCLK\n");
> +
> + rst = devm_reset_control_get_optional_exclusive(dev, NULL);
> + if (IS_ERR(rst))
> + return dev_err_probe(dev, PTR_ERR(rst),
> + "failed to get reset\n");
> + if (rst) {
No need for the condition, reset_control_reset(rst) does nothing if rst
is NULL.
> + ret = reset_control_reset(rst);
regards
Philipp
next prev parent reply other threads:[~2026-08-31 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 22:24 [PATCH 0/3] Modernize the Faraday FOTG210 driver Linus Walleij
2026-08-30 22:24 ` [PATCH 1/3] usb: ehci: support controllers with non-standard registers Linus Walleij
2026-08-31 1:15 ` Alan Stern
2026-08-31 8:00 ` Linus Walleij
2026-08-30 22:24 ` [PATCH 2/3] usb: fotg210: use the common EHCI core Linus Walleij
2026-08-31 9:07 ` Philipp Zabel [this message]
2026-08-30 22:24 ` [PATCH 3/3] usb: fotg210-udc: fix endpoint and resource handling Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd6db5def6d08ad435facebd16479a6c65de4773.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=daniel@thingy.jp \
--cc=gregkh@linuxfoundation.org \
--cc=linusw@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox