[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVtwqLlG8+S9cooU@orome.fritz.box>
Date: Mon, 4 Oct 2021 23:22:48 +0200
From: Thierry Reding <thierry.reding@...il.com>
To: Dmitry Osipenko <digetx@...il.com>
Cc: Thierry Reding <treding@...dia.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Felipe Balbi <balbi@...nel.org>, devicetree@...r.kernel.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org, Peter Chen <peter.chen@...nel.org>,
David Heidelberg <david@...t.cz>
Subject: Re: [PATCH v7 4/7] usb: phy: tegra: Support OTG mode programming
On Tue, Oct 05, 2021 at 12:13:48AM +0300, Dmitry Osipenko wrote:
> 05.10.2021 00:05, Thierry Reding пишет:
> > On Mon, Sep 27, 2021 at 07:36:52PM +0300, Dmitry Osipenko wrote:
> >> 12.09.2021 21:17, Dmitry Osipenko пишет:
> >>> Support programming USB PHY into OTG mode.
> >>>
> >>> Signed-off-by: Dmitry Osipenko <digetx@...il.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 <treding@...dia.com>
> >
>
> 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
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists