mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@kernel.org>,
	devicetree@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	Peter Chen <peter.chen@kernel.org>,
	David Heidelberg <david@ixit.cz>
Subject: Re: [PATCH v7 4/7] usb: phy: tegra: Support OTG mode programming
Date: Tue, 5 Oct 2021 00:24:37 +0300	[thread overview]
Message-ID: <99040137-64dd-2895-a90e-7b4478e97bec@gmail.com> (raw)
In-Reply-To: <YVtwqLlG8+S9cooU@orome.fritz.box>

05.10.2021 00:22, Thierry Reding пишет:
> 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@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 <treding@nvidia.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?

Because regmap must exists if node exists.

  reply	other threads:[~2021-10-04 21:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-12 18:17 [PATCH v7 0/7] Add OTG mode support to Tegra USB PHY and Nexus 7 Dmitry Osipenko
2021-09-12 18:17 ` [PATCH v7 1/7] dt-bindings: phy: tegra20-usb-phy: Convert to schema Dmitry Osipenko
2021-10-04 21:07   ` Thierry Reding
2021-10-05 10:47     ` Greg Kroah-Hartman
2021-09-12 18:17 ` [PATCH v7 2/7] dt-bindings: phy: tegra20-usb-phy: Document properties needed for OTG mode Dmitry Osipenko
2021-10-04 21:08   ` Thierry Reding
2021-09-12 18:17 ` [PATCH v7 3/7] soc/tegra: pmc: Expose USB regmap to all SoCs Dmitry Osipenko
2021-09-12 18:17 ` [PATCH v7 4/7] usb: phy: tegra: Support OTG mode programming Dmitry Osipenko
2021-09-27 16:36   ` Dmitry Osipenko
2021-10-04 21:05     ` Thierry Reding
2021-10-04 21:13       ` Dmitry Osipenko
2021-10-04 21:22         ` Thierry Reding
2021-10-04 21:24           ` Dmitry Osipenko [this message]
2021-09-12 18:17 ` [PATCH v7 5/7] ARM: tegra: Add new properties to USB PHY device-tree nodes Dmitry Osipenko
2021-09-12 18:17 ` [PATCH v7 6/7] ARM: tegra: nexus7: Enable USB OTG mode Dmitry Osipenko
2021-09-12 18:17 ` [PATCH v7 7/7] arm64: tegra132: Add new properties to USB PHY device-tree node Dmitry Osipenko
2021-10-04 21:13 ` [PATCH v7 0/7] Add OTG mode support to Tegra USB PHY and Nexus 7 Thierry Reding

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=99040137-64dd-2895-a90e-7b4478e97bec@gmail.com \
    --to=digetx@gmail.com \
    --cc=balbi@kernel.org \
    --cc=david@ixit.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.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

Powered by JetHome