* [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property
@ 2022-10-24 5:17 Li Jun
2022-10-24 5:17 ` [PATCH 2/2] usb: phy: generic: Add wakeup capability Li Jun
2022-10-25 0:23 ` [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Krzysztof Kozlowski
0 siblings, 2 replies; 5+ messages in thread
From: Li Jun @ 2022-10-24 5:17 UTC (permalink / raw)
To: gregkh, robh+dt, krzysztof.kozlowski+dt
Cc: balbi, linux-usb, devicetree, xu.yang_2, jun.li
usb phy may be part of wakeup source, so add wakeup source property
to keep its resource(e.g power domain) active to make usb remote
wakeup work.
Signed-off-by: Li Jun <jun.li@nxp.com>
---
Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
index 2824c17285ee..7b71e32d1df0 100644
--- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
+++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
@@ -39,6 +39,11 @@ properties:
the VBus line.
$ref: /schemas/types.yaml#/definitions/phandle
+ wakeup-source:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Specify if it's USB remote wakeup capable.
+
required:
- compatible
- '#phy-cells'
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] usb: phy: generic: Add wakeup capability
2022-10-24 5:17 [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Li Jun
@ 2022-10-24 5:17 ` Li Jun
2022-10-25 0:23 ` [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Krzysztof Kozlowski
1 sibling, 0 replies; 5+ messages in thread
From: Li Jun @ 2022-10-24 5:17 UTC (permalink / raw)
To: gregkh, robh+dt, krzysztof.kozlowski+dt
Cc: balbi, linux-usb, devicetree, xu.yang_2, jun.li
In case usb phy is the wakeup source, enable its wakeup
capability.
Signed-off-by: Li Jun <jun.li@nxp.com>
---
drivers/usb/phy/phy-generic.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/phy/phy-generic.c b/drivers/usb/phy/phy-generic.c
index 8ed9327cc4a5..c1309ea24a52 100644
--- a/drivers/usb/phy/phy-generic.c
+++ b/drivers/usb/phy/phy-generic.c
@@ -286,6 +286,7 @@ EXPORT_SYMBOL_GPL(usb_phy_gen_create_phy);
static int usb_phy_generic_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
+ struct device_node *dn = dev->of_node;
struct usb_phy_generic *nop;
int err;
@@ -323,6 +324,9 @@ static int usb_phy_generic_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, nop);
+ device_set_wakeup_capable(&pdev->dev,
+ of_property_read_bool(dn, "wakeup-source"));
+
return 0;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property
2022-10-24 5:17 [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Li Jun
2022-10-24 5:17 ` [PATCH 2/2] usb: phy: generic: Add wakeup capability Li Jun
@ 2022-10-25 0:23 ` Krzysztof Kozlowski
2022-10-25 10:43 ` Jun Li
1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-25 0:23 UTC (permalink / raw)
To: Li Jun, gregkh, robh+dt, krzysztof.kozlowski+dt
Cc: balbi, linux-usb, devicetree, xu.yang_2
On 24/10/2022 01:17, Li Jun wrote:
> usb phy may be part of wakeup source, so add wakeup source property
s/usb/USB/
"part of wakeup source" is actually not descriptive. What do you want to
say here?
> to keep its resource(e.g power domain) active to make usb remote
space before (
s/e.g/e.g./
s/usb/USB/
> wakeup work.
>
> Signed-off-by: Li Jun <jun.li@nxp.com>
> ---
> Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> index 2824c17285ee..7b71e32d1df0 100644
> --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> @@ -39,6 +39,11 @@ properties:
> the VBus line.
> $ref: /schemas/types.yaml#/definitions/phandle
>
> + wakeup-source:
> + $ref: /schemas/types.yaml#/definitions/flag
This shouldn't be needed, as it is a standard property.
> + description:
> + Specify if it's USB remote wakeup capable.
Now you have to explain in the bindings what is "USB remote wakeup".
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property
2022-10-25 0:23 ` [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Krzysztof Kozlowski
@ 2022-10-25 10:43 ` Jun Li
2022-10-25 12:00 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Jun Li @ 2022-10-25 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, gregkh@linuxfoundation.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org
Cc: balbi@kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, Xu Yang
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Sent: Tuesday, October 25, 2022 8:23 AM
> To: Jun Li <jun.li@nxp.com>; gregkh@linuxfoundation.org;
> robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org
> Cc: balbi@kernel.org; linux-usb@vger.kernel.org;
> devicetree@vger.kernel.org; Xu Yang <xu.yang_2@nxp.com>
> Subject: Re: [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source
> property
>
> On 24/10/2022 01:17, Li Jun wrote:
> > usb phy may be part of wakeup source, so add wakeup source property
>
> s/usb/USB/
>
> "part of wakeup source" is actually not descriptive. What do you want to
> say here?
Will change to be "USB phy may be a system wakeup source".
>
> > to keep its resource(e.g power domain) active to make usb remote
>
> space before (
> s/e.g/e.g./
> s/usb/USB/
Okay.
>
> > wakeup work.
> >
> > Signed-off-by: Li Jun <jun.li@nxp.com>
> > ---
> > Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> > b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> > index 2824c17285ee..7b71e32d1df0 100644
> > --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> > +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
> > @@ -39,6 +39,11 @@ properties:
> > the VBus line.
> > $ref: /schemas/types.yaml#/definitions/phandle
> >
> > + wakeup-source:
> > + $ref: /schemas/types.yaml#/definitions/flag
>
> This shouldn't be needed, as it is a standard property.
Will remove.
>
> > + description:
> > + Specify if it's USB remote wakeup capable.
>
> Now you have to explain in the bindings what is "USB remote wakeup".
"USB remote wakeup" is a standard concept in USB world/spec, change
the description like "if the USB phy can detect the remote wakeup
signal while the system sleep" make sense to you?
Thanks
Li Jun
>
> Best regards,
> Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property
2022-10-25 10:43 ` Jun Li
@ 2022-10-25 12:00 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-25 12:00 UTC (permalink / raw)
To: Jun Li, gregkh@linuxfoundation.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org
Cc: balbi@kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, Xu Yang
On 25/10/2022 06:43, Jun Li wrote:
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> Sent: Tuesday, October 25, 2022 8:23 AM
>> To: Jun Li <jun.li@nxp.com>; gregkh@linuxfoundation.org;
>> robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org
>> Cc: balbi@kernel.org; linux-usb@vger.kernel.org;
>> devicetree@vger.kernel.org; Xu Yang <xu.yang_2@nxp.com>
>> Subject: Re: [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source
>> property
>>
>> On 24/10/2022 01:17, Li Jun wrote:
>>> usb phy may be part of wakeup source, so add wakeup source property
>>
>> s/usb/USB/
>>
>> "part of wakeup source" is actually not descriptive. What do you want to
>> say here?
>
> Will change to be "USB phy may be a system wakeup source".
>
>>
>>> to keep its resource(e.g power domain) active to make usb remote
>>
>> space before (
>> s/e.g/e.g./
>> s/usb/USB/
>
> Okay.
>
>>
>>> wakeup work.
>>>
>>> Signed-off-by: Li Jun <jun.li@nxp.com>
>>> ---
>>> Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml | 5 +++++
>>> 1 file changed, 5 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
>>> b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
>>> index 2824c17285ee..7b71e32d1df0 100644
>>> --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
>>> @@ -39,6 +39,11 @@ properties:
>>> the VBus line.
>>> $ref: /schemas/types.yaml#/definitions/phandle
>>>
>>> + wakeup-source:
>>> + $ref: /schemas/types.yaml#/definitions/flag
>>
>> This shouldn't be needed, as it is a standard property.
>
> Will remove.
>
>>
>>> + description:
>>> + Specify if it's USB remote wakeup capable.
>>
>> Now you have to explain in the bindings what is "USB remote wakeup".
>
> "USB remote wakeup" is a standard concept in USB world/spec, change
> the description like "if the USB phy can detect the remote wakeup
> signal while the system sleep" make sense to you?
If it is a standard concept, keep it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-25 12:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 5:17 [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Li Jun
2022-10-24 5:17 ` [PATCH 2/2] usb: phy: generic: Add wakeup capability Li Jun
2022-10-25 0:23 ` [PATCH 1/2] dt-bindings: usb: usb-nop-xceiv: add wakeup-source property Krzysztof Kozlowski
2022-10-25 10:43 ` Jun Li
2022-10-25 12:00 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).