* [PATCH 1/2] dt-bindings: input: fsl,scu-key: add wakeup-source property
@ 2023-03-23 9:31 ` Peng Fan (OSS)
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2023-03-23 9:31 UTC (permalink / raw)
To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, aisheng.dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, linux-imx, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add wakeup-source to indicate whether it could work to wakeup the system
from suspend mode.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Documentation/devicetree/bindings/input/fsl,scu-key.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
index e5a3c355ee1f..037d4aa7364f 100644
--- a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
+++ b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
@@ -24,6 +24,10 @@ properties:
linux,keycodes:
maxItems: 1
+ wakeup-source:
+ description: pwr key can be used as a wakeup source
+ type: boolean
+
required:
- compatible
- linux,keycodes
--
2.37.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/2] dt-bindings: input: fsl,scu-key: add wakeup-source property
@ 2023-03-23 9:31 ` Peng Fan (OSS)
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2023-03-23 9:31 UTC (permalink / raw)
To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, aisheng.dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, linux-imx, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add wakeup-source to indicate whether it could work to wakeup the system
from suspend mode.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Documentation/devicetree/bindings/input/fsl,scu-key.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
index e5a3c355ee1f..037d4aa7364f 100644
--- a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
+++ b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
@@ -24,6 +24,10 @@ properties:
linux,keycodes:
maxItems: 1
+ wakeup-source:
+ description: pwr key can be used as a wakeup source
+ type: boolean
+
required:
- compatible
- linux,keycodes
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-03-23 9:31 ` Peng Fan (OSS)
@ 2023-03-23 9:31 ` Peng Fan (OSS)
-1 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2023-03-23 9:31 UTC (permalink / raw)
To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, aisheng.dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, linux-imx, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add support for waking up from system wide suspend.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/input/keyboard/imx_sc_key.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c
index d18839f1f4f6..234f23cf9990 100644
--- a/drivers/input/keyboard/imx_sc_key.c
+++ b/drivers/input/keyboard/imx_sc_key.c
@@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct platform_device *pdev)
priv->input = input;
platform_set_drvdata(pdev, priv);
+ device_init_wakeup(&pdev->dev, device_property_read_bool(&pdev->dev, "wakeup-source"));
+
error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE, SC_IRQ_BUTTON,
true);
if (error) {
--
2.37.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-03-23 9:31 ` Peng Fan (OSS)
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2023-03-23 9:31 UTC (permalink / raw)
To: dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, aisheng.dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, linux-imx, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add support for waking up from system wide suspend.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/input/keyboard/imx_sc_key.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c
index d18839f1f4f6..234f23cf9990 100644
--- a/drivers/input/keyboard/imx_sc_key.c
+++ b/drivers/input/keyboard/imx_sc_key.c
@@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct platform_device *pdev)
priv->input = input;
platform_set_drvdata(pdev, priv);
+ device_init_wakeup(&pdev->dev, device_property_read_bool(&pdev->dev, "wakeup-source"));
+
error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE, SC_IRQ_BUTTON,
true);
if (error) {
--
2.37.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: fsl,scu-key: add wakeup-source property
2023-03-23 9:31 ` Peng Fan (OSS)
@ 2023-03-24 11:40 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-24 11:40 UTC (permalink / raw)
To: Peng Fan (OSS), dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, aisheng.dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, linux-imx, Peng Fan
On 23/03/2023 10:31, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add wakeup-source to indicate whether it could work to wakeup the system
> from suspend mode.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 1/2] dt-bindings: input: fsl,scu-key: add wakeup-source property
@ 2023-03-24 11:40 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-24 11:40 UTC (permalink / raw)
To: Peng Fan (OSS), dmitry.torokhov, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, aisheng.dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, linux-imx, Peng Fan
On 23/03/2023 10:31, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add wakeup-source to indicate whether it could work to wakeup the system
> from suspend mode.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-03-23 9:31 ` Peng Fan (OSS)
@ 2023-04-10 2:30 ` Dmitry Torokhov
-1 siblings, 0 replies; 18+ messages in thread
From: Dmitry Torokhov @ 2023-04-10 2:30 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: robh+dt, krzysztof.kozlowski+dt, shawnguo, aisheng.dong,
linux-input, devicetree, linux-kernel, linux-arm-kernel, s.hauer,
kernel, festevam, linux-imx, Peng Fan
On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add support for waking up from system wide suspend.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/input/keyboard/imx_sc_key.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c
> index d18839f1f4f6..234f23cf9990 100644
> --- a/drivers/input/keyboard/imx_sc_key.c
> +++ b/drivers/input/keyboard/imx_sc_key.c
> @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct platform_device *pdev)
> priv->input = input;
> platform_set_drvdata(pdev, priv);
>
> + device_init_wakeup(&pdev->dev, device_property_read_bool(&pdev->dev, "wakeup-source"));
> +
I wonder - could we move this to the device core?
> error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE, SC_IRQ_BUTTON,
> true);
> if (error) {
> --
> 2.37.1
>
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-04-10 2:30 ` Dmitry Torokhov
0 siblings, 0 replies; 18+ messages in thread
From: Dmitry Torokhov @ 2023-04-10 2:30 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: robh+dt, krzysztof.kozlowski+dt, shawnguo, aisheng.dong,
linux-input, devicetree, linux-kernel, linux-arm-kernel, s.hauer,
kernel, festevam, linux-imx, Peng Fan
On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add support for waking up from system wide suspend.
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> drivers/input/keyboard/imx_sc_key.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/input/keyboard/imx_sc_key.c b/drivers/input/keyboard/imx_sc_key.c
> index d18839f1f4f6..234f23cf9990 100644
> --- a/drivers/input/keyboard/imx_sc_key.c
> +++ b/drivers/input/keyboard/imx_sc_key.c
> @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct platform_device *pdev)
> priv->input = input;
> platform_set_drvdata(pdev, priv);
>
> + device_init_wakeup(&pdev->dev, device_property_read_bool(&pdev->dev, "wakeup-source"));
> +
I wonder - could we move this to the device core?
> error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE, SC_IRQ_BUTTON,
> true);
> if (error) {
> --
> 2.37.1
>
Thanks.
--
Dmitry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-04-10 2:30 ` Dmitry Torokhov
@ 2023-04-12 12:19 ` Peng Fan
-1 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2023-04-12 12:19 UTC (permalink / raw)
To: Dmitry Torokhov, Peng Fan (OSS)
Cc: robh+dt, krzysztof.kozlowski+dt, shawnguo, Aisheng Dong,
linux-input, devicetree, linux-kernel, linux-arm-kernel, s.hauer,
kernel, festevam, dl-linux-imx
> Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
>
> On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add support for waking up from system wide suspend.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> > drivers/input/keyboard/imx_sc_key.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/input/keyboard/imx_sc_key.c
> b/drivers/input/keyboard/imx_sc_key.c
> > index d18839f1f4f6..234f23cf9990 100644
> > --- a/drivers/input/keyboard/imx_sc_key.c
> > +++ b/drivers/input/keyboard/imx_sc_key.c
> > @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> platform_device *pdev)
> > priv->input = input;
> > platform_set_drvdata(pdev, priv);
> >
> > + device_init_wakeup(&pdev->dev,
> device_property_read_bool(&pdev->dev, "wakeup-source"));
> > +
>
> I wonder - could we move this to the device core?
I see lots device drivers parse wakeup-source, so I also follow
That. Not sure whether could move this feature to device core,
but anyway I could give a try.
Thanks,
Peng.
>
> > error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE,
> SC_IRQ_BUTTON,
> > true);
> > if (error) {
> > --
> > 2.37.1
> >
>
> Thanks.
>
> --
> Dmitry
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-04-12 12:19 ` Peng Fan
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2023-04-12 12:19 UTC (permalink / raw)
To: Dmitry Torokhov, Peng Fan (OSS)
Cc: robh+dt, krzysztof.kozlowski+dt, shawnguo, Aisheng Dong,
linux-input, devicetree, linux-kernel, linux-arm-kernel, s.hauer,
kernel, festevam, dl-linux-imx
> Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
>
> On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > Add support for waking up from system wide suspend.
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> > drivers/input/keyboard/imx_sc_key.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/input/keyboard/imx_sc_key.c
> b/drivers/input/keyboard/imx_sc_key.c
> > index d18839f1f4f6..234f23cf9990 100644
> > --- a/drivers/input/keyboard/imx_sc_key.c
> > +++ b/drivers/input/keyboard/imx_sc_key.c
> > @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> platform_device *pdev)
> > priv->input = input;
> > platform_set_drvdata(pdev, priv);
> >
> > + device_init_wakeup(&pdev->dev,
> device_property_read_bool(&pdev->dev, "wakeup-source"));
> > +
>
> I wonder - could we move this to the device core?
I see lots device drivers parse wakeup-source, so I also follow
That. Not sure whether could move this feature to device core,
but anyway I could give a try.
Thanks,
Peng.
>
> > error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE,
> SC_IRQ_BUTTON,
> > true);
> > if (error) {
> > --
> > 2.37.1
> >
>
> Thanks.
>
> --
> Dmitry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-04-12 12:19 ` Peng Fan
@ 2023-04-12 15:58 ` Peng Fan
-1 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2023-04-12 15:58 UTC (permalink / raw)
To: Dmitry Torokhov, Ulf Hansson
Cc: robh+dt, krzysztof.kozlowski+dt, shawnguo, Aisheng Dong,
linux-input, devicetree, linux-kernel, linux-arm-kernel, s.hauer,
kernel, festevam, dl-linux-imx
+Ulf
> Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
>
> > Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >
> > On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > Add support for waking up from system wide suspend.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > > drivers/input/keyboard/imx_sc_key.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/input/keyboard/imx_sc_key.c
> > b/drivers/input/keyboard/imx_sc_key.c
> > > index d18839f1f4f6..234f23cf9990 100644
> > > --- a/drivers/input/keyboard/imx_sc_key.c
> > > +++ b/drivers/input/keyboard/imx_sc_key.c
> > > @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> > platform_device *pdev)
> > > priv->input = input;
> > > platform_set_drvdata(pdev, priv);
> > >
> > > + device_init_wakeup(&pdev->dev,
> > device_property_read_bool(&pdev->dev, "wakeup-source"));
> > > +
> >
> > I wonder - could we move this to the device core?
>
> I see lots device drivers parse wakeup-source, so I also follow That. Not sure
> whether could move this feature to device core, but anyway I could give a
> try.
Do you think it is feasible to move device_init_wakeup into device core
part?
Thanks,
Peng.
>
> Thanks,
> Peng.
> >
> > > error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE,
> > SC_IRQ_BUTTON,
> > > true);
> > > if (error) {
> > > --
> > > 2.37.1
> > >
> >
> > Thanks.
> >
> > --
> > Dmitry
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-04-12 15:58 ` Peng Fan
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2023-04-12 15:58 UTC (permalink / raw)
To: Dmitry Torokhov, Ulf Hansson
Cc: robh+dt, krzysztof.kozlowski+dt, shawnguo, Aisheng Dong,
linux-input, devicetree, linux-kernel, linux-arm-kernel, s.hauer,
kernel, festevam, dl-linux-imx
+Ulf
> Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
>
> > Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >
> > On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > Add support for waking up from system wide suspend.
> > >
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > > drivers/input/keyboard/imx_sc_key.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/drivers/input/keyboard/imx_sc_key.c
> > b/drivers/input/keyboard/imx_sc_key.c
> > > index d18839f1f4f6..234f23cf9990 100644
> > > --- a/drivers/input/keyboard/imx_sc_key.c
> > > +++ b/drivers/input/keyboard/imx_sc_key.c
> > > @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> > platform_device *pdev)
> > > priv->input = input;
> > > platform_set_drvdata(pdev, priv);
> > >
> > > + device_init_wakeup(&pdev->dev,
> > device_property_read_bool(&pdev->dev, "wakeup-source"));
> > > +
> >
> > I wonder - could we move this to the device core?
>
> I see lots device drivers parse wakeup-source, so I also follow That. Not sure
> whether could move this feature to device core, but anyway I could give a
> try.
Do you think it is feasible to move device_init_wakeup into device core
part?
Thanks,
Peng.
>
> Thanks,
> Peng.
> >
> > > error = imx_scu_irq_group_enable(SC_IRQ_GROUP_WAKE,
> > SC_IRQ_BUTTON,
> > > true);
> > > if (error) {
> > > --
> > > 2.37.1
> > >
> >
> > Thanks.
> >
> > --
> > Dmitry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-04-12 15:58 ` Peng Fan
@ 2023-04-18 8:32 ` Ulf Hansson
-1 siblings, 0 replies; 18+ messages in thread
From: Ulf Hansson @ 2023-04-18 8:32 UTC (permalink / raw)
To: Peng Fan
Cc: Dmitry Torokhov, robh+dt, krzysztof.kozlowski+dt, shawnguo,
Aisheng Dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, dl-linux-imx
On Wed, 12 Apr 2023 at 17:58, Peng Fan <peng.fan@nxp.com> wrote:
>
> +Ulf
>
> > Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >
> > > Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
> > >
> > > On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> > > > From: Peng Fan <peng.fan@nxp.com>
> > > >
> > > > Add support for waking up from system wide suspend.
> > > >
> > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > ---
> > > > drivers/input/keyboard/imx_sc_key.c | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/input/keyboard/imx_sc_key.c
> > > b/drivers/input/keyboard/imx_sc_key.c
> > > > index d18839f1f4f6..234f23cf9990 100644
> > > > --- a/drivers/input/keyboard/imx_sc_key.c
> > > > +++ b/drivers/input/keyboard/imx_sc_key.c
> > > > @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> > > platform_device *pdev)
> > > > priv->input = input;
> > > > platform_set_drvdata(pdev, priv);
> > > >
> > > > + device_init_wakeup(&pdev->dev,
> > > device_property_read_bool(&pdev->dev, "wakeup-source"));
> > > > +
> > >
> > > I wonder - could we move this to the device core?
> >
> > I see lots device drivers parse wakeup-source, so I also follow That. Not sure
> > whether could move this feature to device core, but anyway I could give a
> > try.
>
> Do you think it is feasible to move device_init_wakeup into device core
> part?
Not sure it would really improve things that much. Subsystems/drivers
need to make additional configurations based upon whether this DT
property is set anyway.
Perhaps an option is to make this a part of the common input subsystem
helper functions instead? Other subsystems do this, but I am not sure
how feasible that would be in the input case.
Kind regards
Uffe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-04-18 8:32 ` Ulf Hansson
0 siblings, 0 replies; 18+ messages in thread
From: Ulf Hansson @ 2023-04-18 8:32 UTC (permalink / raw)
To: Peng Fan
Cc: Dmitry Torokhov, robh+dt, krzysztof.kozlowski+dt, shawnguo,
Aisheng Dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, dl-linux-imx
On Wed, 12 Apr 2023 at 17:58, Peng Fan <peng.fan@nxp.com> wrote:
>
> +Ulf
>
> > Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >
> > > Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
> > >
> > > On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> > > > From: Peng Fan <peng.fan@nxp.com>
> > > >
> > > > Add support for waking up from system wide suspend.
> > > >
> > > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > > ---
> > > > drivers/input/keyboard/imx_sc_key.c | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/drivers/input/keyboard/imx_sc_key.c
> > > b/drivers/input/keyboard/imx_sc_key.c
> > > > index d18839f1f4f6..234f23cf9990 100644
> > > > --- a/drivers/input/keyboard/imx_sc_key.c
> > > > +++ b/drivers/input/keyboard/imx_sc_key.c
> > > > @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> > > platform_device *pdev)
> > > > priv->input = input;
> > > > platform_set_drvdata(pdev, priv);
> > > >
> > > > + device_init_wakeup(&pdev->dev,
> > > device_property_read_bool(&pdev->dev, "wakeup-source"));
> > > > +
> > >
> > > I wonder - could we move this to the device core?
> >
> > I see lots device drivers parse wakeup-source, so I also follow That. Not sure
> > whether could move this feature to device core, but anyway I could give a
> > try.
>
> Do you think it is feasible to move device_init_wakeup into device core
> part?
Not sure it would really improve things that much. Subsystems/drivers
need to make additional configurations based upon whether this DT
property is set anyway.
Perhaps an option is to make this a part of the common input subsystem
helper functions instead? Other subsystems do this, but I am not sure
how feasible that would be in the input case.
Kind regards
Uffe
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-04-18 8:32 ` Ulf Hansson
@ 2023-04-20 7:54 ` Peng Fan
-1 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2023-04-20 7:54 UTC (permalink / raw)
To: Ulf Hansson, Peng Fan
Cc: Dmitry Torokhov, robh+dt, krzysztof.kozlowski+dt, shawnguo,
Aisheng Dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, dl-linux-imx
Dmitry,Ulf
On 4/18/2023 4:32 PM, Ulf Hansson wrote:
> On Wed, 12 Apr 2023 at 17:58, Peng Fan <peng.fan@nxp.com> wrote:
>>
>> +Ulf
>>
>>> Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
>>>
>>>> Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
>>>>
>>>> On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
>>>>> From: Peng Fan <peng.fan@nxp.com>
>>>>>
>>>>> Add support for waking up from system wide suspend.
>>>>>
>>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>>>> ---
>>>>> drivers/input/keyboard/imx_sc_key.c | 2 ++
>>>>> 1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/drivers/input/keyboard/imx_sc_key.c
>>>> b/drivers/input/keyboard/imx_sc_key.c
>>>>> index d18839f1f4f6..234f23cf9990 100644
>>>>> --- a/drivers/input/keyboard/imx_sc_key.c
>>>>> +++ b/drivers/input/keyboard/imx_sc_key.c
>>>>> @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
>>>> platform_device *pdev)
>>>>> priv->input = input;
>>>>> platform_set_drvdata(pdev, priv);
>>>>>
>>>>> + device_init_wakeup(&pdev->dev,
>>>> device_property_read_bool(&pdev->dev, "wakeup-source"));
>>>>> +
>>>>
>>>> I wonder - could we move this to the device core?
>>>
>>> I see lots device drivers parse wakeup-source, so I also follow That. Not sure
>>> whether could move this feature to device core, but anyway I could give a
>>> try.
>>
>> Do you think it is feasible to move device_init_wakeup into device core
>> part?
>
> Not sure it would really improve things that much. Subsystems/drivers
> need to make additional configurations based upon whether this DT
> property is set anyway.
>
> Perhaps an option is to make this a part of the common input subsystem
> helper functions instead? Other subsystems do this, but I am not sure
> how feasible that would be in the input case.
How do you think of below patch?
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 37e876d45eb9..a98a9f37e1f5 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -2402,6 +2402,10 @@ int input_register_device(struct input_dev *dev)
__func__, dev_name(&dev->dev));
devres_add(dev->dev.parent, devres);
}
+
+ if (device_property_read_bool(input->dev.parent, "wakeup-source"))
+ device_init_wakeup(&pdev->dev, true);
+
return 0;
err_device_del:
Thanks,
Peng.
>
> Kind regards
> Uffe
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-04-20 7:54 ` Peng Fan
0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan @ 2023-04-20 7:54 UTC (permalink / raw)
To: Ulf Hansson, Peng Fan
Cc: Dmitry Torokhov, robh+dt, krzysztof.kozlowski+dt, shawnguo,
Aisheng Dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, dl-linux-imx
Dmitry,Ulf
On 4/18/2023 4:32 PM, Ulf Hansson wrote:
> On Wed, 12 Apr 2023 at 17:58, Peng Fan <peng.fan@nxp.com> wrote:
>>
>> +Ulf
>>
>>> Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
>>>
>>>> Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
>>>>
>>>> On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
>>>>> From: Peng Fan <peng.fan@nxp.com>
>>>>>
>>>>> Add support for waking up from system wide suspend.
>>>>>
>>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>>>>> ---
>>>>> drivers/input/keyboard/imx_sc_key.c | 2 ++
>>>>> 1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/drivers/input/keyboard/imx_sc_key.c
>>>> b/drivers/input/keyboard/imx_sc_key.c
>>>>> index d18839f1f4f6..234f23cf9990 100644
>>>>> --- a/drivers/input/keyboard/imx_sc_key.c
>>>>> +++ b/drivers/input/keyboard/imx_sc_key.c
>>>>> @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
>>>> platform_device *pdev)
>>>>> priv->input = input;
>>>>> platform_set_drvdata(pdev, priv);
>>>>>
>>>>> + device_init_wakeup(&pdev->dev,
>>>> device_property_read_bool(&pdev->dev, "wakeup-source"));
>>>>> +
>>>>
>>>> I wonder - could we move this to the device core?
>>>
>>> I see lots device drivers parse wakeup-source, so I also follow That. Not sure
>>> whether could move this feature to device core, but anyway I could give a
>>> try.
>>
>> Do you think it is feasible to move device_init_wakeup into device core
>> part?
>
> Not sure it would really improve things that much. Subsystems/drivers
> need to make additional configurations based upon whether this DT
> property is set anyway.
>
> Perhaps an option is to make this a part of the common input subsystem
> helper functions instead? Other subsystems do this, but I am not sure
> how feasible that would be in the input case.
How do you think of below patch?
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 37e876d45eb9..a98a9f37e1f5 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -2402,6 +2402,10 @@ int input_register_device(struct input_dev *dev)
__func__, dev_name(&dev->dev));
devres_add(dev->dev.parent, devres);
}
+
+ if (device_property_read_bool(input->dev.parent, "wakeup-source"))
+ device_init_wakeup(&pdev->dev, true);
+
return 0;
err_device_del:
Thanks,
Peng.
>
> Kind regards
> Uffe
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
2023-04-20 7:54 ` Peng Fan
@ 2023-05-02 14:53 ` Ulf Hansson
-1 siblings, 0 replies; 18+ messages in thread
From: Ulf Hansson @ 2023-05-02 14:53 UTC (permalink / raw)
To: Dmitry Torokhov, Peng Fan
Cc: Peng Fan, robh+dt, krzysztof.kozlowski+dt, shawnguo,
Aisheng Dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, dl-linux-imx
On Thu, 20 Apr 2023 at 09:54, Peng Fan <peng.fan@oss.nxp.com> wrote:
>
> Dmitry,Ulf
>
> On 4/18/2023 4:32 PM, Ulf Hansson wrote:
> > On Wed, 12 Apr 2023 at 17:58, Peng Fan <peng.fan@nxp.com> wrote:
> >>
> >> +Ulf
> >>
> >>> Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >>>
> >>>> Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >>>>
> >>>> On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> >>>>> From: Peng Fan <peng.fan@nxp.com>
> >>>>>
> >>>>> Add support for waking up from system wide suspend.
> >>>>>
> >>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >>>>> ---
> >>>>> drivers/input/keyboard/imx_sc_key.c | 2 ++
> >>>>> 1 file changed, 2 insertions(+)
> >>>>>
> >>>>> diff --git a/drivers/input/keyboard/imx_sc_key.c
> >>>> b/drivers/input/keyboard/imx_sc_key.c
> >>>>> index d18839f1f4f6..234f23cf9990 100644
> >>>>> --- a/drivers/input/keyboard/imx_sc_key.c
> >>>>> +++ b/drivers/input/keyboard/imx_sc_key.c
> >>>>> @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> >>>> platform_device *pdev)
> >>>>> priv->input = input;
> >>>>> platform_set_drvdata(pdev, priv);
> >>>>>
> >>>>> + device_init_wakeup(&pdev->dev,
> >>>> device_property_read_bool(&pdev->dev, "wakeup-source"));
> >>>>> +
> >>>>
> >>>> I wonder - could we move this to the device core?
> >>>
> >>> I see lots device drivers parse wakeup-source, so I also follow That. Not sure
> >>> whether could move this feature to device core, but anyway I could give a
> >>> try.
> >>
> >> Do you think it is feasible to move device_init_wakeup into device core
> >> part?
> >
> > Not sure it would really improve things that much. Subsystems/drivers
> > need to make additional configurations based upon whether this DT
> > property is set anyway.
> >
> > Perhaps an option is to make this a part of the common input subsystem
> > helper functions instead? Other subsystems do this, but I am not sure
> > how feasible that would be in the input case.
>
> How do you think of below patch?
Seems reasonable to me, but I can't really tell if this makes sense
for all input drivers.
Dmitry?
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 37e876d45eb9..a98a9f37e1f5 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -2402,6 +2402,10 @@ int input_register_device(struct input_dev *dev)
> __func__, dev_name(&dev->dev));
> devres_add(dev->dev.parent, devres);
> }
> +
> + if (device_property_read_bool(input->dev.parent, "wakeup-source"))
> + device_init_wakeup(&pdev->dev, true);
> +
> return 0;
>
> err_device_del:
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
@ 2023-05-02 14:53 ` Ulf Hansson
0 siblings, 0 replies; 18+ messages in thread
From: Ulf Hansson @ 2023-05-02 14:53 UTC (permalink / raw)
To: Dmitry Torokhov, Peng Fan
Cc: Peng Fan, robh+dt, krzysztof.kozlowski+dt, shawnguo,
Aisheng Dong, linux-input, devicetree, linux-kernel,
linux-arm-kernel, s.hauer, kernel, festevam, dl-linux-imx
On Thu, 20 Apr 2023 at 09:54, Peng Fan <peng.fan@oss.nxp.com> wrote:
>
> Dmitry,Ulf
>
> On 4/18/2023 4:32 PM, Ulf Hansson wrote:
> > On Wed, 12 Apr 2023 at 17:58, Peng Fan <peng.fan@nxp.com> wrote:
> >>
> >> +Ulf
> >>
> >>> Subject: RE: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >>>
> >>>> Subject: Re: [PATCH 2/2] input: imx_sc_key: add wakeup support
> >>>>
> >>>> On Thu, Mar 23, 2023 at 05:31:41PM +0800, Peng Fan (OSS) wrote:
> >>>>> From: Peng Fan <peng.fan@nxp.com>
> >>>>>
> >>>>> Add support for waking up from system wide suspend.
> >>>>>
> >>>>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> >>>>> ---
> >>>>> drivers/input/keyboard/imx_sc_key.c | 2 ++
> >>>>> 1 file changed, 2 insertions(+)
> >>>>>
> >>>>> diff --git a/drivers/input/keyboard/imx_sc_key.c
> >>>> b/drivers/input/keyboard/imx_sc_key.c
> >>>>> index d18839f1f4f6..234f23cf9990 100644
> >>>>> --- a/drivers/input/keyboard/imx_sc_key.c
> >>>>> +++ b/drivers/input/keyboard/imx_sc_key.c
> >>>>> @@ -151,6 +151,8 @@ static int imx_sc_key_probe(struct
> >>>> platform_device *pdev)
> >>>>> priv->input = input;
> >>>>> platform_set_drvdata(pdev, priv);
> >>>>>
> >>>>> + device_init_wakeup(&pdev->dev,
> >>>> device_property_read_bool(&pdev->dev, "wakeup-source"));
> >>>>> +
> >>>>
> >>>> I wonder - could we move this to the device core?
> >>>
> >>> I see lots device drivers parse wakeup-source, so I also follow That. Not sure
> >>> whether could move this feature to device core, but anyway I could give a
> >>> try.
> >>
> >> Do you think it is feasible to move device_init_wakeup into device core
> >> part?
> >
> > Not sure it would really improve things that much. Subsystems/drivers
> > need to make additional configurations based upon whether this DT
> > property is set anyway.
> >
> > Perhaps an option is to make this a part of the common input subsystem
> > helper functions instead? Other subsystems do this, but I am not sure
> > how feasible that would be in the input case.
>
> How do you think of below patch?
Seems reasonable to me, but I can't really tell if this makes sense
for all input drivers.
Dmitry?
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 37e876d45eb9..a98a9f37e1f5 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -2402,6 +2402,10 @@ int input_register_device(struct input_dev *dev)
> __func__, dev_name(&dev->dev));
> devres_add(dev->dev.parent, devres);
> }
> +
> + if (device_property_read_bool(input->dev.parent, "wakeup-source"))
> + device_init_wakeup(&pdev->dev, true);
> +
> return 0;
>
> err_device_del:
>
Kind regards
Uffe
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-05-02 14:54 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 9:31 [PATCH 1/2] dt-bindings: input: fsl,scu-key: add wakeup-source property Peng Fan (OSS)
2023-03-23 9:31 ` Peng Fan (OSS)
2023-03-23 9:31 ` [PATCH 2/2] input: imx_sc_key: add wakeup support Peng Fan (OSS)
2023-03-23 9:31 ` Peng Fan (OSS)
2023-04-10 2:30 ` Dmitry Torokhov
2023-04-10 2:30 ` Dmitry Torokhov
2023-04-12 12:19 ` Peng Fan
2023-04-12 12:19 ` Peng Fan
2023-04-12 15:58 ` Peng Fan
2023-04-12 15:58 ` Peng Fan
2023-04-18 8:32 ` Ulf Hansson
2023-04-18 8:32 ` Ulf Hansson
2023-04-20 7:54 ` Peng Fan
2023-04-20 7:54 ` Peng Fan
2023-05-02 14:53 ` Ulf Hansson
2023-05-02 14:53 ` Ulf Hansson
2023-03-24 11:40 ` [PATCH 1/2] dt-bindings: input: fsl,scu-key: add wakeup-source property Krzysztof Kozlowski
2023-03-24 11:40 ` Krzysztof Kozlowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.