Skip to contentSkip to conversation

Remove ir-rx51 driver

PATCH Superseded Sean Young 2 participants 5 messages Aug 21, 2023

Subsystems (6)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Sean Young

author maintainer
#0 lore raw

cover Remove ir-rx51 driver

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

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

 .../devicetree/bindings/media/nokia,n900-ir   |  20 --
 arch/arm/boot/dts/ti/omap/omap3-n900.dts      |   2 +-
 arch/arm/configs/omap2plus_defconfig          |   1 -
 drivers/media/rc/Kconfig                      |  10 -
 drivers/media/rc/Makefile                     |   1 -
 drivers/media/rc/ir-rx51.c                    | 285 ------------------
 6 files changed, 1 insertion(+), 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 1/2 media: dt-bindings: nokia,n900-ir use generic pwm-ir-tx driver

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 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]>
---
 .../devicetree/bindings/media/nokia,n900-ir   | 20 -------------------
 arch/arm/boot/dts/ti/omap/omap3-n900.dts      |  2 +-
 2 files changed, 1 insertion(+), 21 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-ir
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 */
-	};
arch/arm/boot/dts/ti/omap/omap3-n900.dts +1 -1
index d33485341251..83ab2d6faee6 100644
@@ -165,7 +165,7 @@ pwm9: pwm-9 {
 	};
 
 	ir: n900-ir {
-		compatible = "nokia,n900-ir";
+		compatible = "pwm-ir-tx";
 		pwms = <&pwm9 0 26316 0>; /* 38000 Hz */
 	};
 
Signature · 1 line
2.41.0
maintainer
#2 lore raw

Re: [PATCH 1/2] media: dt-bindings: nokia,n900-ir use generic pwm-ir-tx driver

Please use get_maintainers.pl and send patches to the right place. Like the other DT maintainers and DT list...

Quoted 3 lines · Sean Young

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

How long has this been true? You are breaking users if they are on a version of OS where the pwm-ir-tx driver doesn't work (or didn't exist or wasn't enabled). I suspect this is a platform that will care about the ABI.

What you should do is make the "nokia,n900-ir" compatible work with the generic driver. Then old driver works still, the generic driver works on new OS versions, and the DTB doesn't change.

Rob

author maintainer
#3 lore raw

Re: [PATCH 1/2] media: dt-bindings: nokia,n900-ir use generic pwm-ir-tx driver

Quoted 2 lines · Rob Herring

Please use get_maintainers.pl and send patches to the right place. Like the other DT maintainers and DT list...

Noted, my bad.

Quoted 5 lines · Sean Young
Quoted 3 lines

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

Quoted 8 lines

How long has this been true? You are breaking users if they are on a version of OS where the pwm-ir-tx driver doesn't work (or didn't exist or wasn't enabled). I suspect this is a platform that will care about the ABI.

What you should do is make the "nokia,n900-ir" compatible work with the generic driver. Then old driver works still, the generic driver works on new OS versions, and the DTB doesn't change.

That makes a lot of sense. I'll re-roll.

Thanks for the feedback.

Sean

author maintainer
#4 lore raw

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

In reply to 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.

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 Sicelo <[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]>
---
 arch/arm/configs/omap2plus_defconfig |   1 -
 drivers/media/rc/Kconfig             |  10 -
 drivers/media/rc/Makefile            |   1 -
 drivers/media/rc/ir-rx51.c           | 285 ---------------------------
 4 files changed, 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

Signature · 1 line
2.41.0