media: dt-bindings: bind nokia,n900-ir to generic pwm-ir-tx driver
Subsystems (6)
Sean Young
maintainerPATCH v2 1/2 media: dt-bindings: bind nokia,n900-ir to generic pwm-ir-tx driver
The generic pwm-ir-tx driver should work for the Nokia n900.
Compile tested only.
--- .../devicetree/bindings/media/nokia,n900-ir | 20 ------------------- arch/arm/boot/dts/omap3-n900.dts | 2 +- drivers/media/rc/pwm-ir-tx.c | 1 + 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-ir
Documentation/devicetree/bindings/media/nokia,n900-ir deleted +0 -20
@@ -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/omap3-n900.dts +1 -1
@@ -154,7 +154,7 @@ }; ir: n900-ir { - compatible = "nokia,n900-ir"; + compatible = "nokia,n900-ir", "pwm-ir-tx"; pwms = <&pwm9 0 26316 0>; /* 38000 Hz */ };
drivers/media/rc/pwm-ir-tx.c +1 -0
@@ -30,6 +30,7 @@ struct pwm_ir { };static const struct of_device_id pwm_ir_of_match[] = { + { .compatible ="nokia,n900-ir" }, { .compatible ="pwm-ir-tx" , }, { }, };
Signature · 1 line
2.17.1
Sean Young
maintainerPATCH v2 2/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.
Note that the suspend code in the ir-rx51 driver is unnecessary, since during transmit, the current process is not in interruptable sleep. The process is not put to sleep until the transmit completes.
Compile tested only.
--- arch/arm/configs/omap2plus_defconfig | 1 - drivers/media/rc/Kconfig | 10 - drivers/media/rc/Makefile | 1 - drivers/media/rc/ir-rx51.c | 305 --------------------------- 4 files changed, 317 deletions(-) delete mode 100644 drivers/media/rc/ir-rx51.c
arch/arm/configs/omap2plus_defconfig +0 -1
@@ -325,7 +325,6 @@ CONFIG_RC_CORE=m CONFIG_LIRC=y CONFIG_RC_DEVICES=y CONFIG_IR_SPI=m -CONFIG_IR_RX51=m CONFIG_IR_GPIO_TX=m CONFIG_IR_PWM_TX=m CONFIG_MEDIA_SUPPORT=m
drivers/media/rc/Kconfig +0 -10
@@ -377,16 +377,6 @@ config IR_TTUSBIR To compile this driver as a module, choose M here: the module will be called ttusbir. -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. - source "drivers/media/rc/img-ir/Kconfig" config RC_LOOPBACK
drivers/media/rc/Makefile +0 -1
@@ -29,7 +29,6 @@ obj-$(CONFIG_IR_MESON) += meson-ir.o obj-$(CONFIG_IR_NUVOTON) += nuvoton-cir.o obj-$(CONFIG_IR_ENE) += ene_ir.o obj-$(CONFIG_IR_REDRAT3) += redrat3.o -obj-$(CONFIG_IR_RX51) += ir-rx51.o obj-$(CONFIG_IR_SPI) += ir-spi.o obj-$(CONFIG_IR_STREAMZAP) += streamzap.o obj-$(CONFIG_IR_WINBOND_CIR) += winbond-cir.o
drivers/media/rc/ir-rx51.c deleted +0 -305
305 lines not on this page · raw message
Signature · 1 line
2.17.1
Hi!
Quoted 24 lines
Signed-off-by Sean Young <[email protected]>--- .../devicetree/bindings/media/nokia,n900-ir | 20 ------------------- arch/arm/boot/dts/omap3-n900.dts | 2 +- drivers/media/rc/pwm-ir-tx.c | 1 + 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-irDocumentation/devicetree/bindings/media/nokia,n900-ir deleted +0
-10@@ -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";
Documentation/devicetree/bindings/media/nokia,n900-ir line 20
Quoted 10 lines
Documentation/devicetree/bindings/media/nokia,n900-ir deleted +0
-10- 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 */ - };
Removing documentation is bad idea, I guess. The binding still exists and new kernels should still support it.
arch/arm/boot/dts/omap3-n900.dts line 160
Quoted 13 lines
arch/arm/boot/dts/omap3-n900.dts +1
-1@@ -154,7 +154,7 @@ }; ir: n900-ir { - compatible = "nokia,n900-ir"; + compatible = "nokia,n900-ir", "pwm-ir-tx"; pwms = <&pwm9 0 26316 0>; /* 38000 Hz */ };
No problem.
drivers/media/rc/pwm-ir-tx.c struct pwm_ir { · line 36
Quoted 12 lines
drivers/media/rc/pwm-ir-tx.c +1
-0@@ -30,6 +30,7 @@ struct pwm_ir { };static const struct of_device_id pwm_ir_of_match[] = { + { .compatible ="nokia,n900-ir" }, { .compatible ="pwm-ir-tx" , }, { }, };
Good idea.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Sean Young
maintainerQuoted 31 lines · Pavel Machek
Hi!
Quoted 29 lines
Signed-off-by Sean Young <[email protected]>--- .../devicetree/bindings/media/nokia,n900-ir | 20 ------------------- arch/arm/boot/dts/omap3-n900.dts | 2 +- drivers/media/rc/pwm-ir-tx.c | 1 + 3 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/nokia,n900-irDocumentation/devicetree/bindings/media/nokia,n900-ir deleted +0
-15@@ -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>; - }; -
Quoted 8 lines
Documentation/devicetree/bindings/media/nokia,n900-ir line 20
Quoted 5 lines
Documentation/devicetree/bindings/media/nokia,n900-ir deleted +0
-5- ir: n900-ir { - compatible = "nokia,n900-ir"; - - pwms = <&pwm9 0 26316 0>; /* 38000 Hz */ - };Removing documentation is bad idea, I guess. The binding still exists and new kernels should still support it.
I've sent out a v3 correcting this.
Thank you for the review!
Sean