Skip to contentSkip to conversation

Remove ir-rx51 driver

PATCH Superseded Sean Young 4 participants 7 messages Aug 22, 2023 – Sep 6, 2023

Subsystems (8)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Sean Young

author maintainer
#0 lore raw

v2 cover Remove ir-rx51 driver

The ir-rx51 driver is no longer necessary, pwm-ir-tx does the same job and is more generic.

changes:
v2:
- Fixed issues with pwm-ir-tx.yaml

v1:
- Made pwm-ir-tx compatible with nokia,n900-ir rather than changing the n900 devicetree

Sean Young (2):
media: rc: remove ir-rx51 in favour of generic pwm-ir-tx
media: dt-bindings: media: remove nokia,n900-ir as pwm-ir-tx is
compatible

 .../bindings/leds/irled/pwm-ir-tx.yaml        |   4 +-
 .../devicetree/bindings/media/nokia,n900-ir   |  20 --
 arch/arm/configs/omap2plus_defconfig          |   1 -
 drivers/media/rc/Kconfig                      |  10 -
 drivers/media/rc/Makefile                     |   1 -
 drivers/media/rc/ir-rx51.c                    | 285 ------------------
 drivers/media/rc/pwm-ir-tx.c                  |   1 +
 7 files changed, 4 insertions(+), 318 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-ir
 delete mode 100644 drivers/media/rc/ir-rx51.c
Signature · 1 line
2.41.0
author maintainer
#1 lore raw

PATCH v3 1/2 media: rc: remove ir-rx51 in favour of generic pwm-ir-tx

The ir-rx51 is a pwm-based TX driver specific to the N900. This can be handled entirely by the generic pwm-ir-tx driver, and in fact the pwm-ir-tx driver has been compatible with ir-rx51 from the start.

Note that the suspend code in the ir-rx51 driver is unnecessary, since during transmit, the process is not in interruptable sleep. The process is not put to sleep until the transmit completes.

Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Thierry Reding <[email protected]>
Cc "Uwe Kleine-König" <[email protected]>
Cc Ivaylo Dimitrov <[email protected]>
Cc Pali Rohár <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Timo Kokkonen <[email protected]>
---
 arch/arm/configs/omap2plus_defconfig |   1 -
 drivers/media/rc/Kconfig             |  10 -
 drivers/media/rc/Makefile            |   1 -
 drivers/media/rc/ir-rx51.c           | 285 ---------------------------
 drivers/media/rc/pwm-ir-tx.c         |   1 +
 5 files changed, 1 insertion(+), 297 deletions(-)
 delete mode 100644 drivers/media/rc/ir-rx51.c
arch/arm/configs/omap2plus_defconfig +0 -1
index 9bd36dd39bd0..b4e3a6d7b606 100644
@@ -484,7 +484,6 @@ CONFIG_LIRC=y
 CONFIG_RC_DEVICES=y
 CONFIG_IR_GPIO_TX=m
 CONFIG_IR_PWM_TX=m
-CONFIG_IR_RX51=m
 CONFIG_IR_SPI=m
 CONFIG_MEDIA_SUPPORT=m
 CONFIG_V4L_PLATFORM_DRIVERS=y
drivers/media/rc/Kconfig +0 -10
index 07bdf649c60d..2afe67ffa285 100644
@@ -338,16 +338,6 @@ config IR_REDRAT3
 	   To compile this driver as a module, choose M here: the
 	   module will be called redrat3.
 
-config IR_RX51
-	tristate "Nokia N900 IR transmitter diode"
-	depends on (OMAP_DM_TIMER && PWM_OMAP_DMTIMER && ARCH_OMAP2PLUS || COMPILE_TEST) && RC_CORE
-	help
-	   Say Y or M here if you want to enable support for the IR
-	   transmitter diode built in the Nokia N900 (RX51) device.
-
-	   The driver uses omap DM timers for generating the carrier
-	   wave and pulses.
-
 config IR_SERIAL
 	tristate "Homebrew Serial Port Receiver"
 	depends on HAS_IOPORT
drivers/media/rc/Makefile +0 -1
index a9285266e944..2bca6f7f07bc 100644
@@ -43,7 +43,6 @@ obj-$(CONFIG_IR_MTK) += mtk-cir.o
 obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o
 obj-$(CONFIG_IR_PWM_TX) += pwm-ir-tx.o
 obj-$(CONFIG_IR_REDRAT3) += redrat3.o
-obj-$(CONFIG_IR_RX51) += ir-rx51.o
 obj-$(CONFIG_IR_SERIAL) += serial_ir.o
 obj-$(CONFIG_IR_SPI) += ir-spi.o
 obj-$(CONFIG_IR_STREAMZAP) += streamzap.o
drivers/media/rc/ir-rx51.c deleted +0 -285

285 lines not on this page · raw message

drivers/media/rc/pwm-ir-tx.c +1 -0
index 7732054c4621..c5f37c03af9c 100644
@@ -23,6 +23,7 @@ struct pwm_ir {
 
 static const struct of_device_id pwm_ir_of_match[] = {
 	{ .compatible = "pwm-ir-tx", },
+	{ .compatible = "nokia,n900-ir" },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, pwm_ir_of_match);
Signature · 1 line
2.41.0
author maintainer
#4 lore raw

PATCH v3 2/2 media: dt-bindings: media: remove nokia,n900-ir as pwm-ir-tx is compatible

In reply to Sean Young

The generic pwm-ir-tx driver works for the Nokia n900, so nokia,n900-ir can be removed.

Cc Sicelo <[email protected]>
Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Ivaylo Dimitrov <[email protected]>
Cc Pali Rohár <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Timo Kokkonen <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 .../bindings/leds/irled/pwm-ir-tx.yaml        |  4 +++-
 .../devicetree/bindings/media/nokia,n900-ir   | 20 -------------------
 2 files changed, 3 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-ir
Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.yaml +3 -1
index f2a6fa140f38..dc19b6475ba8 100644
@@ -15,7 +15,9 @@ description:
 
 properties:
   compatible:
-    const: pwm-ir-tx
+    - const: pwm-ir-tx
+    - const: nokia,n900-ir
+      deprecated: true
 
   pwms:
     maxItems: 1
Documentation/devicetree/bindings/media/nokia,n900-ir deleted +0 -20
deleted file mode 100644
index 13a18ce37dd1..000000000000
@@ -1,20 +0,0 @@
-Device-Tree bindings for LIRC TX driver for Nokia N900(RX51)
-
-Required properties:
-	- compatible: should be "nokia,n900-ir".
-	- pwms: specifies PWM used for IR signal transmission.
-
-Example node:
-
-	pwm9: dmtimer-pwm@9 {
-		compatible = "ti,omap-dmtimer-pwm";
-		ti,timers = <&timer9>;
-		ti,clock-source = <0x00>; /* timer_sys_ck */
-		#pwm-cells = <3>;
-	};
-
-	ir: n900-ir {
-		compatible = "nokia,n900-ir";
-
-		pwms = <&pwm9 0 26316 0>; /* 38000 Hz */
-	};
Signature · 1 line
2.41.0
maintainer
#5 lore raw

Re: [PATCH v3 2/2] media: dt-bindings: media: remove nokia,n900-ir as pwm-ir-tx is compatible

Quoted 14 lines · Sean Young

The generic pwm-ir-tx driver works for the Nokia n900, so nokia,n900-ir can be removed.

Cc Sicelo <[email protected]>
Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>
Cc Ivaylo Dimitrov <[email protected]>
Cc Pali Rohár <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Timo Kokkonen <[email protected]>
Cc Tony Lindgren <[email protected]>
Quoted 6 lines
---
 .../bindings/leds/irled/pwm-ir-tx.yaml        |  4 +++-
 .../devicetree/bindings/media/nokia,n900-ir   | 20 -------------------
 2 files changed, 3 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-ir

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Traceback (most recent call last):
File "/usr/local/bin/dt-doc-validate", line 64, in <module>

    ret |= check_doc(f)
           ^^^^^^^^^^^^

File "/usr/local/bin/dt-doc-validate", line 32, in check_doc
for error in sorted(dtsch.iter_errors(), key=lambda e: e.linecol):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/dtschema/schema.py", line 135, in iter_errors
self.annotate_error(scherr, meta_schema, scherr.schema_path)
File "/usr/local/lib/python3.11/dist-packages/dtschema/schema.py", line 114, in annotate_error
schema = schema[p]
~~~~~~^^^
KeyError: 'type'
Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.example.dtb: /example-0/irled: failed to match any schema with compatible: ['pwm-ir-tx']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

#6 lore raw

Re: [PATCH v3 2/2] media: dt-bindings: media: remove nokia,n900-ir as pwm-ir-tx is compatible

In reply to Sean Young
Quoted 8 lines · Sean Young

The generic pwm-ir-tx driver works for the Nokia n900, so nokia,n900-ir can be removed.

Cc Sicelo <[email protected]>
Cc Rob Herring <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Conor Dooley <[email protected]>

BTW, There is no single need to store automated output of get_maintainers.pl in the git log. It can be easily re-created at any given time, thus its presence in the git history is redundant and obfuscates the log.

If you need it for your own patch management purposes, keep it under the --- separator.

Quoted 17 lines
Cc Ivaylo Dimitrov <[email protected]>
Cc Pali Rohár <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Timo Kokkonen <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 .../bindings/leds/irled/pwm-ir-tx.yaml        |  4 +++-
 .../devicetree/bindings/media/nokia,n900-ir   | 20 -------------------
 2 files changed, 3 insertions(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-ir
Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.yaml +0 -0
index f2a6fa140f38..dc19b6475ba8 100644

Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.yaml description: · line 20

Quoted 7 lines
Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.yaml +3 -1
@@ -15,7 +15,9 @@ description:
 
 properties:
   compatible:
-    const: pwm-ir-tx
+    - const: pwm-ir-tx
+    - const: nokia,n900-ir
+      deprecated: true

Please test your binding before sending. You miss oneOf.

Best regards,
Krzysztof

Acked-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] media: rc: remove ir-rx51 in favour of generic pwm-ir-tx

In reply to Sean Young

Hello,

Quoted 8 lines · Sean Young

The ir-rx51 is a pwm-based TX driver specific to the N900. This can be handled entirely by the generic pwm-ir-tx driver, and in fact the pwm-ir-tx driver has been compatible with ir-rx51 from the start.

Note that the suspend code in the ir-rx51 driver is unnecessary, since during transmit, the process is not in interruptable sleep. The process is not put to sleep until the transmit completes.

Quoted 13 lines
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Thierry Reding <[email protected]>
Cc "Uwe Kleine-König" <[email protected]>
Cc Ivaylo Dimitrov <[email protected]>
Cc Pali Rohár <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Timo Kokkonen <[email protected]>

Looks ok for me. I assume this will go in via the media tree and the pwm list was only Cc:d because drivers/media/rc/pwm-ir-tx.c uses pwm functions? I'll mark this patch as "handled-elsewhere" in the pwm patchwork. Please tell me if you object.

Thanks
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
author maintainer
#3 lore raw

Re: [PATCH v3 1/2] media: rc: remove ir-rx51 in favour of generic pwm-ir-tx

Quoted 23 lines · Uwe Kleine-König
Quoted 8 lines · Sean Young

The ir-rx51 is a pwm-based TX driver specific to the N900. This can be handled entirely by the generic pwm-ir-tx driver, and in fact the pwm-ir-tx driver has been compatible with ir-rx51 from the start.

Note that the suspend code in the ir-rx51 driver is unnecessary, since during transmit, the process is not in interruptable sleep. The process is not put to sleep until the transmit completes.

Quoted 13 lines
Cc Tony Lindgren <[email protected]>
Cc Russell King <[email protected]>
Cc Thierry Reding <[email protected]>
Cc "Uwe Kleine-König" <[email protected]>
Cc Ivaylo Dimitrov <[email protected]>
Cc Pali Rohár <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Timo Kokkonen <[email protected]>
Quoted 3 lines

Looks ok for me. I assume this will go in via the media tree and the pwm list was only Cc:d because drivers/media/rc/pwm-ir-tx.c uses pwm functions?

That is exactly right.

Quoted 4 lines

I'll mark this patch as "handled-elsewhere" in the pwm patchwork. Please tell me if you object.

That's perfect.

Thanks,

Sean

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel