[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a22f=sQXt+3-PeAuBFQN7_4iXDQhu41teExd6bxJXxDAQ@mail.gmail.com>
Date: Tue, 14 Feb 2017 13:58:40 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Roger Quadros <rogerq@...com>
Cc: Peter Chen <peter.chen@....com>,
gregkh <gregkh@...uxfoundation.org>, stern@...land.harvard.edu,
Ulf Hansson <ulf.hansson@...aro.org>,
Mark Brown <broonie@...nel.org>, sre@...nel.org,
Rob Herring <robh+dt@...nel.org>,
Shawn Guo <shawnguo@...nel.org>, rjw@...ysocki.net,
dbaryshkov@...il.com, Mark Rutland <mark.rutland@....com>,
Heiko Stuebner <heiko@...ech.de>, stephen.boyd@...aro.org,
frank.li@....com, gary.bisson@...ndarydevices.com,
Vivek Gautam <vivek.gautam@...eaurora.org>,
Sriram Dash <sriram.dash@....com>, festevam@...il.com,
stillcompiling@...il.com, vaibhav.hiremath@...aro.org,
Krzysztof Kozlowski <krzk@...nel.org>, mka@...omium.org,
devicetree@...r.kernel.org, mail@...iej.szmigiero.name,
pawel.moll@....com, linux-pm@...r.kernel.org,
s.hauer@...gutronix.de, troy.kisky@...ndarydevices.com,
Alexander Sverdlin <alexander.sverdlin@...ia.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
hverkuil@...all.nl, oscar@...andei.net,
Baolin Wang <baolin.wang@...aro.org>,
linux-usb@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
p.zabel@...gutronix.de, jun.li@....com
Subject: Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration
On Tue, Feb 14, 2017 at 1:26 PM, Roger Quadros <rogerq@...com> wrote:
> On 14/02/17 13:44, Arnd Bergmann wrote:
>> On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros <rogerq@...com> wrote:
>>> Why are we using sysdev to read DT property? We should be using the
>>> XHCI device (&pdev->dev) here, no?
>>
>> If I remember correctly, this is one of the cases where pdev does not
>> have a device node attached to it because it was created by the driver
>> of the parent device on the fly in case of dwc3. When you have a pure xhci
>> device in DT, the two pointers are the same.
>
> From drivers/usb/dwc3/host.c
>
>> if (dwc->usb3_lpm_capable) {
>> props[0].name = "usb3-lpm-capable";
>> ret = platform_device_add_properties(xhci, props);
>> if (ret) {
>> dev_err(dwc->dev, "failed to add properties to xHCI\n");
>> goto err1;
>> }
>> }
>
> So it is setting the usb3-lpm-capable property into the xhci platform device
> and we should be reading the property from there.
Hmm, ideally we would only have properties on one of the two, since we
refer to the sysdev for the properties regarding DMA and PHY among other
things, but I guess that's not an option here, since we can't call
platform_device_add_properties() on a dwc_pci device and have to
use the xhci pdev instead.
Arnd
Powered by blists - more mailing lists