From: Sean Anderson <sean.anderson@seco.com>
To: Robert Hancock <robert.hancock@calian.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"bjagadee@codeaurora.org" <bjagadee@codeaurora.org>,
"balbi@kernel.org" <balbi@kernel.org>,
"baruch@tkos.co.il" <baruch@tkos.co.il>
Subject: Re: [PATCH 2/6] usb: dwc3: Get clocks individually
Date: Tue, 18 Jan 2022 11:53:25 -0500 [thread overview]
Message-ID: <614267d5-4cfa-94d4-3f2a-c2467b3b9cd6@seco.com> (raw)
In-Reply-To: <1c242d0114554b72f8f0b1f6507973a0dea50b3d.camel@calian.com>
Hi Rob,
On 1/14/22 8:04 PM, Robert Hancock wrote:
> On Fri, 2022-01-14 at 18:39 -0500, Sean Anderson wrote:
>> Instead of grabbing all clocks in bulk, grab them individually. This will
>> allow us to get the frequency or otherwise deal with discrete clocks. This
>> may break some platforms if they use a clock which doesn't use one of the
>> documented names.
>
> Another approach would be to keep the bulk get and prepare_enable and just
> search through the clocks in the bulk data to find the "ref" clock, i.e.
> something like:
>
> for (i = 0; i < dwc->num_clks; ++i)
> if (!strcmp("ref", dwc->clks[i].id)) {
> ref_clk_rate = clk_get_rate(dwc->clks[i].clk);
> break;
> }
>
> That's probably simpler than all the extra complexity to get each of the clocks
> individually and release them in the right order.
Hm, maybe. But in the future, we may want to access other clocks as
well. E.g. perhaps PM might be enhanced by treating the bus/suspend
clock specially for some modes. I think grabbing the clocks up front
will make later patches easier to write.
--Sean
next prev parent reply other threads:[~2022-01-18 16:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 23:38 [PATCH 0/6] usb: dwc3: Calculate REFCLKPER et. al. from reference clock Sean Anderson
2022-01-14 23:38 ` [PATCH 1/6] dt-bindings: usb: dwc3: Deprecate snps,ref-clock-period-ns Sean Anderson
2022-01-14 23:39 ` [PATCH 2/6] usb: dwc3: Get clocks individually Sean Anderson
2022-01-15 1:04 ` Robert Hancock
2022-01-18 16:53 ` Sean Anderson [this message]
2022-01-14 23:39 ` [PATCH 3/6] usb: dwc3: Calculate REFCLKPER based on reference clock Sean Anderson
2022-01-14 23:39 ` [PATCH 4/6] usb: dwc3: Handle fractional reference clocks Sean Anderson
2022-01-15 1:09 ` Robert Hancock
2022-01-18 23:46 ` Sean Anderson
2022-01-14 23:39 ` [PATCH 5/6] arm64: dts: zynqmp: Move USB clocks to dwc3 node Sean Anderson
2022-01-14 23:39 ` [PATCH 6/6] arm64: dts: ipq6018: Use reference clock to set dwc3 period Sean Anderson
2022-01-17 10:36 ` [PATCH 0/6] usb: dwc3: Calculate REFCLKPER et. al. from reference clock Baruch Siach
2022-01-18 19:46 ` Thinh Nguyen
2022-01-18 19:53 ` Sean Anderson
2022-01-18 20:00 ` Thinh Nguyen
2022-01-18 20:39 ` Robert Hancock
2022-01-18 20:54 ` Thinh Nguyen
2022-01-18 20:59 ` Sean Anderson
2022-01-18 21:10 ` Thinh Nguyen
2022-01-18 23:21 ` Robert Hancock
2022-01-17 12:30 ` Jun Li
2022-01-17 23:49 ` Robert Hancock
2022-01-18 23:15 ` Sean Anderson
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=614267d5-4cfa-94d4-3f2a-c2467b3b9cd6@seco.com \
--to=sean.anderson@seco.com \
--cc=balbi@kernel.org \
--cc=baruch@tkos.co.il \
--cc=bjagadee@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=robert.hancock@calian.com \
/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
all inboxes | Powered by JetHome®