diff mbox

[RFC] Documentation: media, leds: move IR LED remote controllers from media to LED

Message ID 20161110132650.5109-1-andi.shyti@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andi Shyti Nov. 10, 2016, 1:26 p.m. UTC
Hi,

this is purely a request for comments after a discussion had with
Rob and Jacek [*] about where to place the ir leds binding. Rob wants
the binding to be under led, while Jacek wants it in media...
"Ubi maior minor cessat": it goes to LED and they can be organized
in a subdirectory.

Standing to Rob "Bindings are grouped by types of h/w and IR LEDs
are a type of LED": all remote controllers have an IR LED as core
device, even though the framework is under drivers/media/rc/, thus
they naturally belong to the LED binding group.

Please, let me know if this is the right approach.

Thanks,
Andi

[*] https://lkml.org/lkml/2016/9/12/380
    https://lkml.org/lkml/2016/11/9/622
---
 .../devicetree/bindings/{media => leds/ir-leds}/gpio-ir-receiver.txt      | 0
 Documentation/devicetree/bindings/{media => leds/ir-leds}/hix5hd2-ir.txt  | 0
 Documentation/devicetree/bindings/{media => leds/ir-leds}/img-ir-rev1.txt | 0
 Documentation/devicetree/bindings/{media => leds/ir-leds}/meson-ir.txt    | 0
 Documentation/devicetree/bindings/{media => leds/ir-leds}/nokia,n900-ir   | 0
 Documentation/devicetree/bindings/{media => leds/ir-leds}/st-rc.txt       | 0
 Documentation/devicetree/bindings/{media => leds/ir-leds}/sunxi-ir.txt    | 0
 7 files changed, 0 insertions(+), 0 deletions(-)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/gpio-ir-receiver.txt (100%)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/hix5hd2-ir.txt (100%)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/img-ir-rev1.txt (100%)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/meson-ir.txt (100%)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/nokia,n900-ir (100%)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/st-rc.txt (100%)
 rename Documentation/devicetree/bindings/{media => leds/ir-leds}/sunxi-ir.txt (100%)

Comments

Mauro Carvalho Chehab Nov. 22, 2016, 2:14 p.m. UTC | #1
Em Thu, 10 Nov 2016 22:26:50 +0900
Andi Shyti <andi.shyti@samsung.com> escreveu:

> Hi,
> 
> this is purely a request for comments after a discussion had with
> Rob and Jacek [*] about where to place the ir leds binding. Rob wants
> the binding to be under led, while Jacek wants it in media...
> "Ubi maior minor cessat": it goes to LED and they can be organized
> in a subdirectory.
> 
> Standing to Rob "Bindings are grouped by types of h/w and IR LEDs
> are a type of LED": all remote controllers have an IR LED as core
> device, even though the framework is under drivers/media/rc/, thus
> they naturally belong to the LED binding group.
> 
> Please, let me know if this is the right approach.

IMHO, this is wrong. 

Ok, if you look at just the diode, the physics of an IR Light-emitting Diode
(LED) is identical  to the one for a visible light LED, just like the physics
of the LED diodes inside a display. Btw, the physics of an IR detector
diode is almost identical to the physics of a LED.

Yet, the hardware where those diodes are connected are very different,
and so their purpose.

The same way I don't think it would make sense to represent a LED
display using the same approach as a flash light, I don't think we
should to it for IR LEDs.

A visible light LED is used either to work as a flash light for a camera
or as a way to indicate a status. No machine2machine protocol there.
The circuitry for them is usually just a gatway that will turn it on
or off.

With regards to the IR hardware, an IR LED is used for machine2machine
signaling. It is part of a modulator circuit that uses a carrier of about
40kHz to modulate 16 or 32 bits words.

The IR device hardware usually also have another diode (the IR detector)
that receives IR rays. Visually, they look identical.

IMHO, it makes much more sense to keep both IR detector and light-emitting
diodes described together, as they are part of the same circuitry and
have a way more similarities than a flash light or a LED display.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andi Shyti Nov. 23, 2016, 2:28 a.m. UTC | #2
Hi Mauro,

> > this is purely a request for comments after a discussion had with
> > Rob and Jacek [*] about where to place the ir leds binding. Rob wants
> > the binding to be under led, while Jacek wants it in media...
> > "Ubi maior minor cessat": it goes to LED and they can be organized
> > in a subdirectory.
> > 
> > Standing to Rob "Bindings are grouped by types of h/w and IR LEDs
> > are a type of LED": all remote controllers have an IR LED as core
> > device, even though the framework is under drivers/media/rc/, thus
> > they naturally belong to the LED binding group.
> > 
> > Please, let me know if this is the right approach.
> 
> IMHO, this is wrong. 
> 
> Ok, if you look at just the diode, the physics of an IR Light-emitting Diode
> (LED) is identical  to the one for a visible light LED, just like the physics
> of the LED diodes inside a display. Btw, the physics of an IR detector
> diode is almost identical to the physics of a LED.
> 
> Yet, the hardware where those diodes are connected are very different,
> and so their purpose.
> 
> The same way I don't think it would make sense to represent a LED
> display using the same approach as a flash light, I don't think we
> should to it for IR LEDs.
> 
> A visible light LED is used either to work as a flash light for a camera
> or as a way to indicate a status. No machine2machine protocol there.
> The circuitry for them is usually just a gatway that will turn it on
> or off.
> 
> With regards to the IR hardware, an IR LED is used for machine2machine
> signaling. It is part of a modulator circuit that uses a carrier of about
> 40kHz to modulate 16 or 32 bits words.
> 
> The IR device hardware usually also have another diode (the IR detector)
> that receives IR rays. Visually, they look identical.
> 
> IMHO, it makes much more sense to keep both IR detector and light-emitting
> diodes described together, as they are part of the same circuitry and
> have a way more similarities than a flash light or a LED display.

thanks for the reply, I agree with you, that's why I first put
the ir-spi of tm2 in the media directory where all the ir leds
devices are. That's what Jacek recommended and what you are
recommending (that's also why this is an RFC and not a patch).

Rob, if I place the tm2 ir-spi in the led bindings in a
sub-directory it will be the only device there for the time
being. But the ir-spi it's not unique in its kind, there are many
others and they are all under the media directory. My opinion is
that all the ir-leds devices should be in the same place.

Would, then, make sense to split the ir-leds devices in two
different locations?

Would it be a valid alternative to create instead an 'rc'
directory for the ir-leds bindings that can either be under
media or in the higher directory?

Thanks,
Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/media/gpio-ir-receiver.txt b/Documentation/devicetree/bindings/leds/ir-leds/gpio-ir-receiver.txt
similarity index 100%
rename from Documentation/devicetree/bindings/media/gpio-ir-receiver.txt
rename to Documentation/devicetree/bindings/leds/ir-leds/gpio-ir-receiver.txt
diff --git a/Documentation/devicetree/bindings/media/hix5hd2-ir.txt b/Documentation/devicetree/bindings/leds/ir-leds/hix5hd2-ir.txt
similarity index 100%
rename from Documentation/devicetree/bindings/media/hix5hd2-ir.txt
rename to Documentation/devicetree/bindings/leds/ir-leds/hix5hd2-ir.txt
diff --git a/Documentation/devicetree/bindings/media/img-ir-rev1.txt b/Documentation/devicetree/bindings/leds/ir-leds/img-ir-rev1.txt
similarity index 100%
rename from Documentation/devicetree/bindings/media/img-ir-rev1.txt
rename to Documentation/devicetree/bindings/leds/ir-leds/img-ir-rev1.txt
diff --git a/Documentation/devicetree/bindings/media/meson-ir.txt b/Documentation/devicetree/bindings/leds/ir-leds/meson-ir.txt
similarity index 100%
rename from Documentation/devicetree/bindings/media/meson-ir.txt
rename to Documentation/devicetree/bindings/leds/ir-leds/meson-ir.txt
diff --git a/Documentation/devicetree/bindings/media/nokia,n900-ir b/Documentation/devicetree/bindings/leds/ir-leds/nokia,n900-ir
similarity index 100%
rename from Documentation/devicetree/bindings/media/nokia,n900-ir
rename to Documentation/devicetree/bindings/leds/ir-leds/nokia,n900-ir
diff --git a/Documentation/devicetree/bindings/media/st-rc.txt b/Documentation/devicetree/bindings/leds/ir-leds/st-rc.txt
similarity index 100%
rename from Documentation/devicetree/bindings/media/st-rc.txt
rename to Documentation/devicetree/bindings/leds/ir-leds/st-rc.txt
diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt b/Documentation/devicetree/bindings/leds/ir-leds/sunxi-ir.txt
similarity index 100%
rename from Documentation/devicetree/bindings/media/sunxi-ir.txt
rename to Documentation/devicetree/bindings/leds/ir-leds/sunxi-ir.txt