On Thu, Feb 11, 2010 at 11:44 PM, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> wrote: > 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; Huh ? em28xx uses a I2C based implementation for the IR. There's no address associated with the IR stuff on the mantis, which is on something say like COM 0/1, which is more similar, rather than an I2C device or a polling based device. Also the protocol is not something that can be seen externally, It is all internal to the firmware on the micro. The micro auto detect's the relevant protocol. ie, what it outputs is all data, no messages. I don't follow what you tend to imply .. > - 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. Ah, i now understand what you are trying to say.. Unfortunately you can't do a protocol conversion or anything likewise on the Mantis IR device. It is all in hardware and the protocol type is all auto detected. All what you can change is the UART settings such as BPS, Parity and STOP bit. There's nothing the user can do to change anything in there. To put it short: whatever remote you use, if it is a supported remote by the firmware, it will output the relevant keycode directly, not messages such that the message needs to be decoded further. > 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. Ok, I will take a look, tomorrow evening. Regards, Manu -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html