Manu Abraham wrote:

> changeset 14166
> http://jusst.de/hg/mantis-v4l-dvb/rev/c2391fa88112
> Mantis: Remote Control for Mantis

+       ir_input_init(rc_dev, rc_state, IR_TYPE_OTHER);

...

+struct ir_scancode_table ir_codes_mantis_vp2040_table = {
+       .scan = ir_codes_mantis_vp2040,
+       .size = ARRAY_SIZE(ir_codes_mantis_vp2040),
+};
+EXPORT_SYMBOL_GPL(ir_codes_mantis_vp2040_table);

The non-declaration of the IR protocol and the definition of
incomplete IR codes is deprecated. Please, create a table with
the IR protocol type and add the IR address to each IR scancode
at the ir codes tables.

Please look at em28xx-input to see how to implement it right.
The change is minimal: 
- at the driver, you'll need to make sure that you're 
  using the full IR scan code, instead of just the 8 bits for IR cmd;

- at the table: you need to use IR address+command scan code,
  and declare the protocol associated with the table;

- at the driver: instead of using IR_TYPE_OTHER, just pass the
value that comes from the IR table.

A correct implementation allows the replacement of the IR by
universal ones, at userspace, the key re-definition and, if
the driver supports more protocol, the protocol changes,
all provided by the new IR input class.

I think I need to add add a macro to export the IR table, replacing
all *_table definitions, in order to avoid patches submitted with
the legacy way (and to remove a false-positive on checkpatch.pl).

Also there are some coding style troubles here, including bad
whitespaces. By running make whitespace, you'll be clearing most
of the warnings. 



-- 

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

Reply via email to