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

2018-07-13 Thread Sean Young
On Fri, Jul 13, 2018 at 01:13:20PM +0200, Pavel Machek wrote:
> Hi!
> 
> > Signed-off-by: Sean Young 
> > ---
> >  .../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
> > 
> > diff --git a/Documentation/devicetree/bindings/media/nokia,n900-ir 
> > b/Documentation/devicetree/bindings/media/nokia,n900-ir
> > deleted file mode 100644
> > index 13a18ce37dd1..
> > --- a/Documentation/devicetree/bindings/media/nokia,n900-ir
> > +++ /dev/null
> > @@ -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 */
> > -   };
> 
> 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


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

2018-07-13 Thread Pavel Machek
Hi!

> Signed-off-by: Sean Young 
> ---
>  .../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
> 
> diff --git a/Documentation/devicetree/bindings/media/nokia,n900-ir 
> b/Documentation/devicetree/bindings/media/nokia,n900-ir
> deleted file mode 100644
> index 13a18ce37dd1..
> --- a/Documentation/devicetree/bindings/media/nokia,n900-ir
> +++ /dev/null
> @@ -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 */
> - };

Removing documentation is bad idea, I guess. The binding still exists
and new kernels should still support it.


> diff --git a/arch/arm/boot/dts/omap3-n900.dts 
> b/arch/arm/boot/dts/omap3-n900.dts
> index 182a53991c90..fd12dea15799 100644
> --- a/arch/arm/boot/dts/omap3-n900.dts
> +++ b/arch/arm/boot/dts/omap3-n900.dts
> @@ -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.

> diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c
> index 27d0f5837a76..272947b430c8 100644
> --- a/drivers/media/rc/pwm-ir-tx.c
> +++ b/drivers/media/rc/pwm-ir-tx.c
> @@ -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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


signature.asc
Description: Digital signature


[PATCH v2 1/2] media: dt-bindings: bind nokia,n900-ir to generic pwm-ir-tx driver

2018-07-13 Thread Sean Young
The generic pwm-ir-tx driver should work for the Nokia n900.

Compile tested only.

Cc: Rob Herring 
Cc: Ivaylo Dimitrov 
Cc: Pali Rohár 
Cc: Pavel Machek 
Cc: Timo Kokkonen 
Cc: Tony Lindgren 
Signed-off-by: Sean Young 
---
 .../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

diff --git a/Documentation/devicetree/bindings/media/nokia,n900-ir 
b/Documentation/devicetree/bindings/media/nokia,n900-ir
deleted file mode 100644
index 13a18ce37dd1..
--- a/Documentation/devicetree/bindings/media/nokia,n900-ir
+++ /dev/null
@@ -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 */
-   };
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index 182a53991c90..fd12dea15799 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -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 */
};
 
diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c
index 27d0f5837a76..272947b430c8 100644
--- a/drivers/media/rc/pwm-ir-tx.c
+++ b/drivers/media/rc/pwm-ir-tx.c
@@ -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", },
{ },
 };
-- 
2.17.1