Thread (17 messages) 17 messages, 3 authors, 2021-10-05

Re: [PATCH v7 4/7] usb: phy: tegra: Support OTG mode programming

From: Thierry Reding <hidden>
Date: 2021-10-04 21:22:55
Also in: linux-devicetree, linux-usb, lkml

On Tue, Oct 05, 2021 at 12:13:48AM +0300, Dmitry Osipenko wrote:
05.10.2021 00:05, Thierry Reding пишет:
quoted
On Mon, Sep 27, 2021 at 07:36:52PM +0300, Dmitry Osipenko wrote:
quoted
12.09.2021 21:17, Dmitry Osipenko пишет:
quoted
Support programming USB PHY into OTG mode.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/usb/phy/phy-tegra-usb.c   | 198 +++++++++++++++++++++++++++++-
 include/linux/usb/tegra_usb_phy.h |   5 +
 2 files changed, 198 insertions(+), 5 deletions(-)
Greg / Felipe, could you please ack this patch to allow Thierry to take
this series via the Tegra tree? It depends on the soc/tegra patch of
this patchset.
Looking at the series, I don't think this necessarily needs to go
through the Tegra tree. Given that you have backwards-compatibility with
older device trees, applying this separately to the USB tree should work
fine. Once the soc/tegra and DT bits and the USB bits get combined they
should enable the new functionality, but nothing should break if things
are applied separately.

If so, I can just pick up the rest and let Felipe or Greg pick this one
up.

Dmitry, can you confirm that this patch should be applicable separately?
If so:

Acked-by: Thierry Reding <redacted>
This PHY patch has this hunk:

+	phy->pmc_regmap = dev_get_regmap(&pmc_pdev->dev, "usb_sleepwalk");
+	if (!phy->pmc_regmap)
+		return -EINVAL;

If this patch and the DT patches will be applied before the soc/tegra
patch, then USB PHY driver will fail to probe.
I had missed that. I was assuming that this other hunk took care of the
backwards-compatibility:

+       /* older device-trees don't have PMC regmap */
+       if (!phy->pmc_regmap)
+               return 0;

but that's rather pointless given your check above, right? Why not just
return 0 instead and let the remaining code skip sleepwalk configuration
if the regmap doesn't exist?

Thierry

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help