mbox series

[v4,0/2] media: rc: add support for Amlogic Meson IR blaster

Message ID 20210712201732.31808-1-viktor.prutyanov@phystech.edu
Headers show
Series media: rc: add support for Amlogic Meson IR blaster | expand

Message

Viktor Prutyanov July 12, 2021, 8:17 p.m. UTC
Hi,

this is a driver for the IR transmitter (also called IR blaster)
available in some Amlogic Meson SoCs.

Viktor Prutyanov (2):
  media: rc: meson-ir-tx: document device tree bindings
  media: rc: introduce Meson IR TX driver

 .../bindings/media/amlogic,meson-ir-tx.yaml   |  65 +++
 drivers/media/rc/Kconfig                      |  10 +
 drivers/media/rc/Makefile                     |   1 +
 drivers/media/rc/meson-ir-tx.c                | 404 ++++++++++++++++++
 4 files changed, 480 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/amlogic,meson-ir-tx.yaml
 create mode 100644 drivers/media/rc/meson-ir-tx.c

Comments

Martin Blumenstingl July 13, 2021, 2:53 p.m. UTC | #1
Hi Viktor,

On Mon, Jul 12, 2021 at 10:17 PM Viktor Prutyanov
<viktor.prutyanov@phystech.edu> wrote:
[...]
> +  max-fifo-level:

> +    maxItems: 1

> +    description:

> +      Maximum IR TX FIFO fill level

From Documentation/devicetree/bindings/writing-bindings.rst:
"DO use a vendor prefix on device specific property names. Consider if
properties could be common among devices of the same class. Check
other existing bindings for similar devices."
I am not sure if there's a "common" fifo size property for IR
transmitters though.

Also in general I think it's good to write the schema for properties
in a way so the binding validation can detect issues.
For "common" properties (like clocks, interrupts, etc.) this is
inherited by default
However, for custom properties this needs to be defined manually.
For this property I would add:
  $ref: /schemas/types.yaml#/definitions/uint32
(I think this can replace maxItems)
And I would define the allowed value, from what I have seen in the
vendor driver (which I am not sure about though!) that would be:
  const: 1024


Best regards,
Martin