All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability
@ 2023-03-24 20:38 Florian Fainelli
  2023-03-24 20:38 ` [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Florian Fainelli @ 2023-03-24 20:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Sean Young, Sebastian Hesselbarth,
	Ravi Kumar V, open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Matthew Lear

This small patch series fixes the gpio-ir-recv binding and driver to
first indicate that it can be a wake-up source for the system, and
second actually make that happen.

Changes in v2:
- corrected the indentation of the description for "wakeup-source"

Florian Fainelli (2):
  dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property
  media: rc: gpio-ir-recv: Fix support for wake-up

 Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml | 3 +++
 drivers/media/rc/gpio-ir-recv.c                               | 2 ++
 2 files changed, 5 insertions(+)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property
  2023-03-24 20:38 [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
@ 2023-03-24 20:38 ` Florian Fainelli
  2023-03-25 11:18   ` Krzysztof Kozlowski
  2023-03-24 20:38 ` [PATCH v2 2/2] media: rc: gpio-ir-recv: Fix support for wake-up Florian Fainelli
  2023-04-03 22:06 ` [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
  2 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2023-03-24 20:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Sean Young, Sebastian Hesselbarth,
	Ravi Kumar V, open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Matthew Lear

The GPIO IR receiver can be used as a wake-up source for the system,
document that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml b/Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml
index 61072745b983..008c007ed702 100644
--- a/Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml
+++ b/Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml
@@ -23,6 +23,9 @@ properties:
     description: autosuspend delay time in milliseconds
     $ref: /schemas/types.yaml#/definitions/uint32
 
+  wakeup-source:
+    description: IR receiver can wake-up the system.
+
 required:
   - compatible
   - gpios
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] media: rc: gpio-ir-recv: Fix support for wake-up
  2023-03-24 20:38 [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
  2023-03-24 20:38 ` [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property Florian Fainelli
@ 2023-03-24 20:38 ` Florian Fainelli
  2023-04-03 22:06 ` [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
  2 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2023-03-24 20:38 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Matthew Lear, Mauro Carvalho Chehab,
	Rob Herring, Krzysztof Kozlowski, Sean Young,
	Sebastian Hesselbarth, Ravi Kumar V,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

The driver was intended from the start to be a wake-up source for the
system, however due to the absence of a suitable call to
device_set_wakeup_capable(), the device_may_wakeup() call used to decide
whether to enable the GPIO interrupt as a wake-up source would never
happen. Lookup the DT standard "wakeup-source" property and call
device_init_wakeup() to ensure the device is flagged as being wakeup
capable.

Reported-by: Matthew Lear <matthew.lear@broadcom.com>
Fixes: fd0f6851eb46 ("[media] rc: Add support for GPIO based IR Receiver driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/media/rc/gpio-ir-recv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c
index 8dbe780dae4e..41ef8cdba28c 100644
--- a/drivers/media/rc/gpio-ir-recv.c
+++ b/drivers/media/rc/gpio-ir-recv.c
@@ -103,6 +103,8 @@ static int gpio_ir_recv_probe(struct platform_device *pdev)
 		rcdev->map_name = RC_MAP_EMPTY;
 
 	gpio_dev->rcdev = rcdev;
+	if (of_property_read_bool(np, "wakeup-source"))
+		device_init_wakeup(dev, true);
 
 	rc = devm_rc_register_device(dev, rcdev);
 	if (rc < 0) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property
  2023-03-24 20:38 ` [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property Florian Fainelli
@ 2023-03-25 11:18   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-25 11:18 UTC (permalink / raw)
  To: Florian Fainelli, linux-kernel
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Sean Young, Sebastian Hesselbarth, Ravi Kumar V,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Matthew Lear

On 24/03/2023 21:38, Florian Fainelli wrote:
> The GPIO IR receiver can be used as a wake-up source for the system,
> document that.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  Documentation/devicetree/bindings/media/gpio-ir-receiver.yaml | 3 +++
>  1 file changed, 3 insertions(+)

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability
  2023-03-24 20:38 [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
  2023-03-24 20:38 ` [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property Florian Fainelli
  2023-03-24 20:38 ` [PATCH v2 2/2] media: rc: gpio-ir-recv: Fix support for wake-up Florian Fainelli
@ 2023-04-03 22:06 ` Florian Fainelli
  2023-04-04  7:57   ` Sean Young
  2 siblings, 1 reply; 6+ messages in thread
From: Florian Fainelli @ 2023-04-03 22:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Sean Young, Sebastian Hesselbarth, Ravi Kumar V,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Matthew Lear

On 3/24/23 13:38, Florian Fainelli wrote:
> This small patch series fixes the gpio-ir-recv binding and driver to
> first indicate that it can be a wake-up source for the system, and
> second actually make that happen.
> 
> Changes in v2:
> - corrected the indentation of the description for "wakeup-source"
> 
> Florian Fainelli (2):
>    dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property
>    media: rc: gpio-ir-recv: Fix support for wake-up

Ping? Someone maintaining this driver?
-- 
Florian


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability
  2023-04-03 22:06 ` [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
@ 2023-04-04  7:57   ` Sean Young
  0 siblings, 0 replies; 6+ messages in thread
From: Sean Young @ 2023-04-04  7:57 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Sebastian Hesselbarth, Ravi Kumar V,
	open list:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Matthew Lear

On Mon, Apr 03, 2023 at 03:06:44PM -0700, Florian Fainelli wrote:
> On 3/24/23 13:38, Florian Fainelli wrote:
> > This small patch series fixes the gpio-ir-recv binding and driver to
> > first indicate that it can be a wake-up source for the system, and
> > second actually make that happen.
> > 
> > Changes in v2:
> > - corrected the indentation of the description for "wakeup-source"
> > 
> > Florian Fainelli (2):
> >    dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property
> >    media: rc: gpio-ir-recv: Fix support for wake-up
> 
> Ping? Someone maintaining this driver?

That's me :) Applied, thanks for the reminder.


Sean

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-04-04  7:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 20:38 [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
2023-03-24 20:38 ` [PATCH v2 1/2] dt-bindings: media: gpio-ir-receiver: Document wakeup-souce property Florian Fainelli
2023-03-25 11:18   ` Krzysztof Kozlowski
2023-03-24 20:38 ` [PATCH v2 2/2] media: rc: gpio-ir-recv: Fix support for wake-up Florian Fainelli
2023-04-03 22:06 ` [PATCH v2 0/2] Correct gpio-ir-recv wakeup capability Florian Fainelli
2023-04-04  7:57   ` Sean Young

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.